mirror of
https://github.com/chinchang/web-maker.git
synced 2025-05-07 02:55:19 +02:00
1 line
1.2 MiB
1 line
1.2 MiB
(function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(r,s,l){for(var d=0,i=[],p,c,u;d<r.length;d++)c=r[d],o[c]&&i.push(o[c][0]),o[c]=0;for(p in s)Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);for(n&&n(r,s,l);i.length;)i.shift()();if(l)for(d=0;d<l.length;d++)u=t(t.s=l[d]);return u};var r={},o={2:0};t.m=e,t.c=r,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t.oe=function(e){throw console.error(e),e}})({"+BLB":function(e,t,n){"use strict";function r(e,t){return e.msg=A[t],t}function o(e){return(e<<1)-(4<e?9:0)}function i(e){for(var t=e.length;0<=--t;)e[t]=0}function l(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0===n||(C.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function d(e,t){T._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,l(e.strm)}function p(e,t){e.pending_buf[e.pending++]=t}function c(e,t){e.pending_buf[e.pending++]=255&t>>>8,e.pending_buf[e.pending++]=255&t}function u(e,t,n,r){var o=e.avail_in;return(o>r&&(o=r),0===o)?0:(e.avail_in-=o,C.arraySet(t,e.input,e.next_in,o,n),1===e.state.wrap?e.adler=_(e.adler,t,o,n):2===e.state.wrap&&(e.adler=E(e.adler,t,o,n)),e.next_in+=o,e.total_in+=o,o)}function h(e,t){var n=e.max_chain_length,r=e.strstart,o=e.prev_length,i=e.nice_match,s=e.strstart>e.w_size-Y?e.strstart-(e.w_size-Y):0,l=e.window,d=e.w_mask,p=e.prev,c=e.strstart+Q,u=l[r+o-1],h=l[r+o],m,g;e.prev_length>=e.good_match&&(n>>=2),i>e.lookahead&&(i=e.lookahead);do{if(m=t,l[m+o]!==h||l[m+o-1]!==u||l[m]!==l[r]||l[++m]!==l[r+1])continue;r+=2,m++;do;while(l[++r]===l[++m]&&l[++r]===l[++m]&&l[++r]===l[++m]&&l[++r]===l[++m]&&l[++r]===l[++m]&&l[++r]===l[++m]&&l[++r]===l[++m]&&l[++r]===l[++m]&&r<c);if(g=Q-(c-r),r=c-Q,g>o){if(e.match_start=t,o=g,g>=i)break;u=l[r+o-1],h=l[r+o]}}while((t=p[t&d])>s&&0!=--n);return o<=e.lookahead?o:e.lookahead}function m(e){var t=e.w_size,r,o,n,i,s;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Y)){C.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,o=e.hash_size,r=o;do n=e.head[--r],e.head[r]=n>=t?n-t:0;while(--o);o=t,r=o;do n=e.prev[--r],e.prev[r]=n>=t?n-t:0;while(--o);i+=t}if(0===e.strm.avail_in)break;if(o=u(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=o,e.lookahead+e.insert>=X)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+X-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<X)););}while(e.lookahead<Y&&0!==e.strm.avail_in)}function s(e,t){for(var n,r;;){if(e.lookahead<Y){if(m(e),e.lookahead<Y&&t===I)return oe;if(0===e.lookahead)break}if(n=0,e.lookahead>=X&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+X-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-Y&&(e.match_length=h(e,n)),!(e.match_length>=X))r=T._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;else if(r=T._tr_tally(e,e.strstart-e.match_start,e.match_length-X),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=X){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+X-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;if(r&&(d(e,!1),0===e.strm.avail_out))return oe}return e.insert=e.strstart<X-1?e.strstart:X-1,t===N?(d(e,!0),0===e.strm.avail_out?ie:se):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?oe:ae}function g(e,t){for(var n,r,o;;){if(e.lookahead<Y){if(m(e),e.lookahead<Y&&t===I)return oe;if(0===e.lookahead)break}if(n=0,e.lookahead>=X&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+X-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=X-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Y&&(e.match_length=h(e,n),5>=e.match_length&&(e.strategy===B||e.match_length===X&&4096<e.strstart-e.match_start)&&(e.match_length=X-1)),e.prev_length>=X&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-X,r=T._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-X),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+X-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(0!=--e.prev_length);if(e.match_available=0,e.match_length=X-1,e.strstart++,r&&(d(e,!1),0===e.strm.avail_out))return oe}else if(!e.match_available)e.match_available=1,e.strstart++,e.lookahead--;else if(r=T._tr_tally(e,0,e.window[e.strstart-1]),r&&d(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return oe}return e.match_available&&(r=T._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<X-1?e.strstart:X-1,t===N?(d(e,!0),0===e.strm.avail_out?ie:se):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?oe:ae}function f(e,t){for(var n=e.window,r,o,i,s;;){if(e.lookahead<=Q){if(m(e),e.lookahead<=Q&&t===I)return oe;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=X&&0<e.strstart&&(i=e.strstart-1,o=n[i],o===n[++i]&&o===n[++i]&&o===n[++i])){s=e.strstart+Q;do;while(o===n[++i]&&o===n[++i]&&o===n[++i]&&o===n[++i]&&o===n[++i]&&o===n[++i]&&o===n[++i]&&o===n[++i]&&i<s);e.match_length=Q-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=X?(r=T._tr_tally(e,1,e.match_length-X),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=T._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(d(e,!1),0===e.strm.avail_out))return oe}return e.insert=0,t===N?(d(e,!0),0===e.strm.avail_out?ie:se):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?oe:ae}function y(e,t){for(var n;;){if(0===e.lookahead&&(m(e),0===e.lookahead)){if(t===I)return oe;break}if(e.match_length=0,n=T._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(d(e,!1),0===e.strm.avail_out))return oe}return e.insert=0,t===N?(d(e,!0),0===e.strm.avail_out?ie:se):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?oe:ae}function b(e,t,n,r,o){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=o}function x(e){e.window_size=2*e.w_size,i(e.head),e.max_lazy_match=le[e.level].max_lazy,e.good_match=le[e.level].good_length,e.nice_match=le[e.level].nice_length,e.max_chain_length=le[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=X-1,e.match_available=0,e.ins_h=0}function v(){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=j,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 C.Buf16(2*K),this.dyn_dtree=new C.Buf16(2*(2*W+1)),this.bl_tree=new C.Buf16(2*(2*H+1)),i(this.dyn_ltree),i(this.dyn_dtree),i(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(G+1),this.heap=new C.Buf16(2*V+1),i(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*V+1),i(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 k(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=z,t=e.state,t.pending=0,t.pending_out=0,0>t.wrap&&(t.wrap=-t.wrap),t.status=t.wrap?J:ne,e.adler=2===t.wrap?0:1,t.last_flush=I,T._tr_init(t),O):r(e,D)}function S(e){var t=k(e);return t===O&&x(e.state),t}function w(e,t,n,o,i,l){if(!e)return D;var d=1;if(t===P&&(t=6),0>o?(d=0,o=-o):15<o&&(d=2,o-=16),1>i||i>q||n!==j||8>o||15<o||0>t||9<t||0>l||l>U)return r(e,D);8===o&&(o=9);var p=new v;return e.state=p,p.strm=e,p.wrap=d,p.gzhead=null,p.w_bits=o,p.w_size=1<<p.w_bits,p.w_mask=p.w_size-1,p.hash_bits=i+7,p.hash_size=1<<p.hash_bits,p.hash_mask=p.hash_size-1,p.hash_shift=~~((p.hash_bits+X-1)/X),p.window=new C.Buf8(2*p.w_size),p.head=new C.Buf16(p.hash_size),p.prev=new C.Buf16(p.w_size),p.lit_bufsize=1<<i+6,p.pending_buf_size=4*p.lit_bufsize,p.pending_buf=new C.Buf8(p.pending_buf_size),p.d_buf=1*p.lit_bufsize,p.l_buf=3*p.lit_bufsize,p.level=t,p.strategy=l,p.method=n,S(e)}var C=n("tbG5"),T=n("+sRJ"),_=n("uxo6"),E=n("X4kj"),A=n("gMAY"),I=0,N=4,L=5,O=0,M=1,D=-2,R=-5,P=-1,B=1,F=2,U=4,z=2,j=8,q=9,V=256+1+29,W=30,H=19,K=2*V+1,G=15,X=3,Q=258,Y=Q+X+1,J=42,$=69,Z=73,ee=91,te=103,ne=113,re=666,oe=1,ae=2,ie=3,se=4,le;le=[new b(0,0,0,0,function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(1>=e.lookahead){if(m(e),0===e.lookahead&&t===I)return oe;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,d(e,!1),0===e.strm.avail_out))return oe;if(e.strstart-e.block_start>=e.w_size-Y&&(d(e,!1),0===e.strm.avail_out))return oe}return e.insert=0,t===N?(d(e,!0),0===e.strm.avail_out?ie:se):e.strstart>e.block_start&&(d(e,!1),0===e.strm.avail_out)?oe:oe}),new b(4,4,8,4,s),new b(4,5,16,8,s),new b(4,6,32,32,s),new b(4,4,16,16,g),new b(8,16,32,32,g),new b(8,16,128,128,g),new b(8,32,128,256,g),new b(32,128,258,1024,g),new b(32,258,258,4096,g)],t.deflateInit=function(e,t){return w(e,t,j,15,8,0)},t.deflateInit2=w,t.deflateReset=S,t.deflateResetKeep=k,t.deflateSetHeader=function(e,t){return e&&e.state?2===e.state.wrap?(e.state.gzhead=t,O):D:D},t.deflate=function(e,t){var n,d,s,u;if(!e||!e.state||t>L||0>t)return e?r(e,D):D;if(d=e.state,!e.output||!e.input&&0!==e.avail_in||d.status===re&&t!==N)return r(e,0===e.avail_out?R:D);if(d.strm=e,n=d.last_flush,d.last_flush=t,d.status===J)if(2===d.wrap)e.adler=0,p(d,31),p(d,139),p(d,8),d.gzhead?(p(d,(d.gzhead.text?1:0)+(d.gzhead.hcrc?2:0)+(d.gzhead.extra?4:0)+(d.gzhead.name?8:0)+(d.gzhead.comment?16:0)),p(d,255&d.gzhead.time),p(d,255&d.gzhead.time>>8),p(d,255&d.gzhead.time>>16),p(d,255&d.gzhead.time>>24),p(d,9===d.level?2:d.strategy>=F||2>d.level?4:0),p(d,255&d.gzhead.os),d.gzhead.extra&&d.gzhead.extra.length&&(p(d,255&d.gzhead.extra.length),p(d,255&d.gzhead.extra.length>>8)),d.gzhead.hcrc&&(e.adler=E(e.adler,d.pending_buf,d.pending,0)),d.gzindex=0,d.status=$):(p(d,0),p(d,0),p(d,0),p(d,0),p(d,0),p(d,9===d.level?2:d.strategy>=F||2>d.level?4:0),p(d,3),d.status=ne);else{var h=j+(d.w_bits-8<<4)<<8,m=-1;m=d.strategy>=F||2>d.level?0:6>d.level?1:6===d.level?2:3,h|=m<<6,0!==d.strstart&&(h|=32),h+=31-h%31,d.status=ne,c(d,h),0!==d.strstart&&(c(d,e.adler>>>16),c(d,65535&e.adler)),e.adler=1}if(d.status===$)if(d.gzhead.extra){for(s=d.pending;d.gzindex<(65535&d.gzhead.extra.length)&&!(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>s&&(e.adler=E(e.adler,d.pending_buf,d.pending-s,s)),l(e),s=d.pending,d.pending===d.pending_buf_size));)p(d,255&d.gzhead.extra[d.gzindex]),d.gzindex++;d.gzhead.hcrc&&d.pending>s&&(e.adler=E(e.adler,d.pending_buf,d.pending-s,s)),d.gzindex===d.gzhead.extra.length&&(d.gzindex=0,d.status=Z)}else d.status=Z;if(d.status===Z)if(d.gzhead.name){s=d.pending;do{if(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>s&&(e.adler=E(e.adler,d.pending_buf,d.pending-s,s)),l(e),s=d.pending,d.pending===d.pending_buf_size)){u=1;break}u=d.gzindex<d.gzhead.name.length?255&d.gzhead.name.charCodeAt(d.gzindex++):0,p(d,u)}while(0!==u);d.gzhead.hcrc&&d.pending>s&&(e.adler=E(e.adler,d.pending_buf,d.pending-s,s)),0===u&&(d.gzindex=0,d.status=ee)}else d.status=ee;if(d.status===ee)if(d.gzhead.comment){s=d.pending;do{if(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>s&&(e.adler=E(e.adler,d.pending_buf,d.pending-s,s)),l(e),s=d.pending,d.pending===d.pending_buf_size)){u=1;break}u=d.gzindex<d.gzhead.comment.length?255&d.gzhead.comment.charCodeAt(d.gzindex++):0,p(d,u)}while(0!==u);d.gzhead.hcrc&&d.pending>s&&(e.adler=E(e.adler,d.pending_buf,d.pending-s,s)),0===u&&(d.status=te)}else d.status=te;if(d.status===te&&(d.gzhead.hcrc?(d.pending+2>d.pending_buf_size&&l(e),d.pending+2<=d.pending_buf_size&&(p(d,255&e.adler),p(d,255&e.adler>>8),e.adler=0,d.status=ne)):d.status=ne),0!==d.pending){if(l(e),0===e.avail_out)return d.last_flush=-1,O;}else if(0===e.avail_in&&o(t)<=o(n)&&t!==N)return r(e,R);if(d.status===re&&0!==e.avail_in)return r(e,R);if(0!==e.avail_in||0!==d.lookahead||t!==I&&d.status!==re){var g=d.strategy===F?y(d,t):d.strategy===3?f(d,t):le[d.level].func(d,t);if((g===ie||g===se)&&(d.status=re),g===oe||g===ie)return 0===e.avail_out&&(d.last_flush=-1),O;if(g===ae&&(t===1?T._tr_align(d):t!==L&&(T._tr_stored_block(d,0,0,!1),t===3&&(i(d.head),0===d.lookahead&&(d.strstart=0,d.block_start=0,d.insert=0))),l(e),0===e.avail_out))return d.last_flush=-1,O}return t===N?0>=d.wrap?M:(2===d.wrap?(p(d,255&e.adler),p(d,255&e.adler>>8),p(d,255&e.adler>>16),p(d,255&e.adler>>24),p(d,255&e.total_in),p(d,255&e.total_in>>8),p(d,255&e.total_in>>16),p(d,255&e.total_in>>24)):(c(d,e.adler>>>16),c(d,65535&e.adler)),l(e),0<d.wrap&&(d.wrap=-d.wrap),0===d.pending?M:O):O},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status,t!==J&&t!==$&&t!==Z&&t!==ee&&t!==te&&t!==ne&&t!==re)?r(e,D):(e.state=null,t===ne?r(e,-3):O):D},t.deflateSetDictionary=function(e,t){var r=t.length,o,s,l,n,d,p,c,u;if(!e||!e.state)return D;if(o=e.state,n=o.wrap,2===n||1===n&&o.status!==J||o.lookahead)return D;for(1===n&&(e.adler=_(e.adler,t,r,0)),o.wrap=0,r>=o.w_size&&(0===n&&(i(o.head),o.strstart=0,o.block_start=0,o.insert=0),u=new C.Buf8(o.w_size),C.arraySet(u,t,r-o.w_size,o.w_size,0),t=u,r=o.w_size),d=e.avail_in,p=e.next_in,c=e.input,e.avail_in=r,e.next_in=0,e.input=t,m(o);o.lookahead>=X;){s=o.strstart,l=o.lookahead-(X-1);do o.ins_h=(o.ins_h<<o.hash_shift^o.window[s+X-1])&o.hash_mask,o.prev[s&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=s,s++;while(--l);o.strstart=s,o.lookahead=X-1,m(o)}return o.strstart+=o.lookahead,o.block_start=o.strstart,o.insert=o.lookahead,o.lookahead=0,o.match_length=o.prev_length=X-1,o.match_available=0,e.next_in=p,e.input=c,e.avail_in=d,o.wrap=n,O},t.deflateInfo="pako deflate (from Nodeca project)"},"+sRJ":function(e,t,n){"use strict";function r(e){for(var t=e.length;0<=--t;)e[t]=0}function o(e,t,n,r,o){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=o,this.has_stree=e&&e.length}function i(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function l(e){return 256>e?Z[e]:Z[256+(e>>>7)]}function d(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=255&t>>>8}function p(e,t,n){e.bi_valid>j-n?(e.bi_buf|=65535&t<<e.bi_valid,d(e,e.bi_buf),e.bi_buf=t>>j-e.bi_valid,e.bi_valid+=n-j):(e.bi_buf|=65535&t<<e.bi_valid,e.bi_valid+=n)}function c(e,t,n){p(e,n[2*t],n[2*t+1])}function s(e,t){var n=0;do n|=1&e,e>>>=1,n<<=1;while(0<--t);return n>>>1}function u(e){16===e.bi_valid?(d(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function h(e,t){var r=t.dyn_tree,o=t.max_code,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,c=0,u,h,n,m,g,y;for(m=0;m<=z;m++)e.bl_count[m]=0;for(r[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<U;u++)(h=e.heap[u],m=r[2*r[2*h+1]+1]+1,m>p&&(m=p,c++),r[2*h+1]=m,!(h>o))&&(e.bl_count[m]++,g=0,h>=d&&(g=l[h-d]),y=r[2*h],e.opt_len+=y*(m+g),s&&(e.static_len+=y*(i[2*h+1]+g)));if(0!=c){do{for(m=p-1;0===e.bl_count[m];)m--;e.bl_count[m]--,e.bl_count[m+1]+=2,e.bl_count[p]--,c-=2}while(0<c);for(m=p;0!==m;m--)for(h=e.bl_count[m];0!==h;)(n=e.heap[--u],!(n>o))&&(r[2*n+1]!==m&&(e.opt_len+=(m-r[2*n+1])*r[2*n],r[2*n+1]=m),h--)}}function g(e,t,r){var o=Array(z+1),i=0,l,d;for(l=1;l<=z;l++)o[l]=i=i+r[l-1]<<1;for(d=0;d<=t;d++){var n=e[2*d+1];0!==n&&(e[2*d]=s(o[n]++,n))}}function m(){var e=Array(z+1),t,n,r,i,l;for(r=0,i=0;i<D-1;i++)for(te[i]=r,t=0;t<1<<G[i];t++)ee[r++]=i;for(ee[r-1]=i,l=0,i=0;16>i;i++)for(ne[i]=l,t=0;t<1<<X[i];t++)Z[l++]=i;for(l>>=7;i<B;i++)for(ne[i]=l<<7,t=0;t<1<<X[i]-7;t++)Z[256+l++]=i;for(n=0;n<=z;n++)e[n]=0;for(t=0;143>=t;)J[2*t+1]=8,t++,e[8]++;for(;255>=t;)J[2*t+1]=9,t++,e[9]++;for(;279>=t;)J[2*t+1]=7,t++,e[7]++;for(;287>=t;)J[2*t+1]=8,t++,e[8]++;for(g(J,P+1,e),t=0;t<B;t++)$[2*t+1]=5,$[2*t]=s(t,5);oe=new o(J,G,R+1,P,z),ae=new o($,X,0,B,z),ie=new o([],Q,0,F,q)}function f(e){var t;for(t=0;t<P;t++)e.dyn_ltree[2*t]=0;for(t=0;t<B;t++)e.dyn_dtree[2*t]=0;for(t=0;t<F;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*V]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function y(e){8<e.bi_valid?d(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function b(e,t,n,r){y(e),r&&(d(e,n),d(e,~n)),I.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function x(e,t,n,r){var o=2*t,i=2*n;return e[o]<e[i]||e[o]===e[i]&&r[t]<=r[n]}function v(e,t,n){for(var r=e.heap[n],o=n<<1;o<=e.heap_len&&(o<e.heap_len&&x(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!x(t,r,e.heap[o],e.depth));)e.heap[n]=e.heap[o],n=o,o<<=1;e.heap[n]=r}function k(e,t,n){var r=0,o,i,s,d;if(0!==e.last_lit)do o=e.pending_buf[e.d_buf+2*r]<<8|e.pending_buf[e.d_buf+2*r+1],i=e.pending_buf[e.l_buf+r],r++,0===o?c(e,i,t):(s=ee[i],c(e,s+R+1,t),d=G[s],0!==d&&(i-=te[s],p(e,i,d)),o--,s=l(o),c(e,s,n),d=X[s],0!==d&&(o-=ne[s],p(e,o,d)));while(r<e.last_lit);c(e,V,t)}function S(e,t){var r=t.dyn_tree,o=t.stat_desc.static_tree,i=t.stat_desc.has_stree,s=t.stat_desc.elems,l=-1,d,n,p;for(e.heap_len=0,e.heap_max=U,d=0;d<s;d++)0===r[2*d]?r[2*d+1]=0:(e.heap[++e.heap_len]=l=d,e.depth[d]=0);for(;2>e.heap_len;)p=e.heap[++e.heap_len]=2>l?++l:0,r[2*p]=1,e.depth[p]=0,e.opt_len--,i&&(e.static_len-=o[2*p+1]);for(t.max_code=l,d=e.heap_len>>1;1<=d;d--)v(e,r,d);p=s;do d=e.heap[1],e.heap[1]=e.heap[e.heap_len--],v(e,r,1),n=e.heap[1],e.heap[--e.heap_max]=d,e.heap[--e.heap_max]=n,r[2*p]=r[2*d]+r[2*n],e.depth[p]=(e.depth[d]>=e.depth[n]?e.depth[d]:e.depth[n])+1,r[2*d+1]=r[2*n+1]=p,e.heap[1]=p++,v(e,r,1);while(2<=e.heap_len);e.heap[--e.heap_max]=e.heap[1],h(e,t),g(r,l,e.bl_count)}function w(e,t,r){var o=-1,i=t[1],s=0,l=7,d=4,p,n;for(0===i&&(l=138,d=3),t[2*(r+1)+1]=65535,p=0;p<=r;p++){if(n=i,i=t[2*(p+1)+1],++s<l&&n===i)continue;else s<d?e.bl_tree[2*n]+=s:0===n?10>=s?e.bl_tree[2*H]++:e.bl_tree[2*K]++:(n!==o&&e.bl_tree[2*n]++,e.bl_tree[2*W]++);s=0,o=n,0===i?(l=138,d=3):n===i?(l=6,d=3):(l=7,d=4)}}function C(e,t,r){var o=-1,i=t[1],s=0,l=7,d=4,u,n;for(0===i&&(l=138,d=3),u=0;u<=r;u++){if(n=i,i=t[2*(u+1)+1],++s<l&&n===i)continue;else if(s<d)do c(e,n,e.bl_tree);while(0!=--s);else 0===n?10>=s?(c(e,H,e.bl_tree),p(e,s-3,3)):(c(e,K,e.bl_tree),p(e,s-11,7)):(n!==o&&(c(e,n,e.bl_tree),s--),c(e,W,e.bl_tree),p(e,s-3,2));s=0,o=n,0===i?(l=138,d=3):n===i?(l=6,d=3):(l=7,d=4)}}function T(e){var t;for(w(e,e.dyn_ltree,e.l_desc.max_code),w(e,e.dyn_dtree,e.d_desc.max_code),S(e,e.bl_desc),t=F-1;3<=t&&0===e.bl_tree[2*Y[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function _(e,t,n,r){var o;for(p(e,t-257,5),p(e,n-1,5),p(e,r-4,4),o=0;o<r;o++)p(e,e.bl_tree[2*Y[o]+1],3);C(e,e.dyn_ltree,t-1),C(e,e.dyn_dtree,n-1)}function E(e){var t=4093624447,r;for(r=0;31>=r;r++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*r])return N;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return L;for(r=32;r<R;r++)if(0!==e.dyn_ltree[2*r])return L;return N}function A(e,t,n,r){p(e,(O<<1)+(r?1:0),3),b(e,t,n,!0)}var I=n("tbG5"),N=0,L=1,O=0,M=1,D=29,R=256,P=R+1+D,B=30,F=19,U=2*P+1,z=15,j=16,q=7,V=256,W=16,H=17,K=18,G=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],X=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Q=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Y=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],J=Array(2*(P+2));r(J);var $=Array(2*B);r($);var Z=Array(512);r(Z);var ee=Array(258-3+1);r(ee);var te=Array(D);r(te);var ne=Array(B);r(ne);var re=!1,oe,ae,ie;t._tr_init=function(e){re||(m(),re=!0),e.l_desc=new i(e.dyn_ltree,oe),e.d_desc=new i(e.dyn_dtree,ae),e.bl_desc=new i(e.bl_tree,ie),e.bi_buf=0,e.bi_valid=0,f(e)},t._tr_stored_block=A,t._tr_flush_block=function(e,t,n,r){var o=0,i,s;0<e.level?(e.strm.data_type===2&&(e.strm.data_type=E(e)),S(e,e.l_desc),S(e,e.d_desc),o=T(e),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==t?A(e,t,n,r):e.strategy===4||s===i?(p(e,(M<<1)+(r?1:0),3),k(e,J,$)):(p(e,(2<<1)+(r?1:0),3),_(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),k(e,e.dyn_ltree,e.dyn_dtree)),f(e),r&&y(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=255&t>>>8,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(ee[n]+R+1)]++,e.dyn_dtree[2*l(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){p(e,M<<1,3),c(e,V,J),u(e)}},"/+WI":function(e){"use strict";e.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(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t,n){t=t||e.getCursor();var r=d(e,t),o=(0,ce.default)(de({field:we},e.getOption("emmet"),n),{syntax:r}),i=e.getModeAt(t);return"jsx"===r?(o.profile=de({selfClosingStyle:"xml"},o.profile),o.options=de({jsx:!0},o.options)):"xml"===i.name&&(o.profile=de({selfClosingStyle:i.configuration},o.profile)),o}function d(e,t){var n=e.getMode();if("jsx"===n.name||"javascript"===n.name)return n.name;var r=e.getModeAt(t);return"xml"===r.name?"html":r.name}function p(e,t){return e.line-t.line||e.ch-t.ch}function c(e){return e.getOption("indentWithTabs")?"\t":m(" ",e.getOption("indentUnit"))}function u(e,t,n){var r=h(t),o=c(e);return"\t"!==o&&(r=r.map(function(e){return e.replace(/^\t+/,function(e){return m(o,e.length)})})),n&&(r=r.map(function(e,t){return t?n+e:e})),r.join("\n")}function h(e){return Array.isArray(e)?e:e.split(/\r\n|\r|\n/g)}function m(e,t){for(var n="";0<t--;)n+=e;return n}function g(e){return(0,ge.default)(e).string}function f(e,t,n){return n?0<y(t,e.from)&&0>y(t,e.to):0<=y(t,e.from)&&0>=y(t,e.to)}function y(e,t){return e.line-t.line||e.ch-t.ch}function b(e){return{from:e.start,to:e.end}}function x(e,t,n){var r=new Ce(e,t);if(r.eatWhile(fe.isSpace),t=r.pos,n){for(r.pos=n,r.backUp();!r.sof()&&(0,fe.isSpace)(r.peek());)r.backUp();r.next(),n=r.pos}else n=t;return{from:t,to:n}}function v(e,t){for(var n=t.line,r=t.ch,o=void 0;0<=r;){if(o=e.getTokenAt({line:n,ch:r}),"property"===o.type)return o.string;if(o.start!==r)r=o.start;else break}}function k(e,t){var n=e.getModeAt(t);if(n&&"css"===n.name){var r=e.getTokenAt(t),o=r.state&&r.state.localState||r.state;return o&&o.context&&"prop"===o.context.type}return!1}function S(e,t,n){var r=l(e,t);if(n&&!w(e,t,r))return null;var o=(0,be.default)(e.getLine(t.line),t.ch,{lookAhead:!0,syntax:r.type,prefix:"jsx"===r.syntax&&e.getOption("jsxBracket")?"<":""});if(o){var i={line:t.line,ch:o.start},s={line:t.line,ch:o.end};return"stylesheet"===r.type&&n&&k(e,t)&&(r.options=de({property:v(e,t)},r.options)),{abbreviation:o.abbreviation,range:{from:i,to:s},config:r}}}function w(e,t,n){var r=e.getTokenTypeAt(t);return"stylesheet"===n.type?"comment"!==r&&"string"!==r:"html"===n.syntax?null===r:"slim"===n.syntax||"pug"===n.syntax?null===r||"tag"===r||r&&/attribute/.test(r):"haml"===n.syntax?null===r||"attribute"===r:"jsx"===n.syntax}function C(e,t,n){var r=e.getLine(t.from.line),o=r.match(/^\s+/),i=u(e,n,o&&o[0]),s=(0,ge.default)(i);return e.operation(function(){e.replaceRange(s.string,t.from,t.to);var n=e.indexFromPos(t.from);if(s.fields.length){var r=s.fields[0],o=e.posFromIndex(r.location+n),i=e.posFromIndex(r.location+r.length+n);e.setSelection(o,i)}else e.setCursor(e.posFromIndex(n+s.string.length));return!0})}function T(e,t,n){var r=_(e,t);if(r&&r.model)return r.model;var o=S(e,t,n);if(o)try{var i=new _e(o.abbreviation,o.range,o.config);return i.valid(e,n)?i:null}catch(e){}}function _(e,t){for(var n=e.findMarksAt(t),r=0,o;r<n.length;r++)if(o=n[r],o.className===Te){if(I(e,o))return o;o.clear()}}function E(e){for(var t=e.getAllMarks(),n=0;n<t.length;n++)t[n].className===Te&&t[n].clear()}function A(e,t){var n=t.range,r=n.from,o=n.to,i=e.markText(r,o,{inclusiveLeft:!0,inclusiveRight:!0,clearWhenEmpty:!0,className:Te});return i.model=t,i}function I(e,t){var n=t.find();if(n.from.line!==n.to.line)return!1;var r=e.getRange(n.from,n.to);if(!r||/^\s|\s$/g.test(r))return!1;if(t.model&&"jsx"===t.model.config.syntax&&"<"===r[0]&&(r=r.slice(1)),!t.model||t.model.abbreviation!==r)try{t.model=new _e(r,n,t.model.config),t.model.valid(e,!0)||(t.model=null)}catch(e){console.warn(e),t.model=null}return!!(t.model&&t.model.snippet)}function N(e,t){if(e.somethingSelected())return e.constructor.Pass;var n=T(e,e.getCursor(),t);return n?(n.insert(e),E(e),!0):e.constructor.Pass}function L(e){var t=e.listSelections().map(function(t){return O(e,t)});return t.some(Boolean)?void e.operation(function(){for(var n=e.listSelections(),r=e.doc.lineSeparator(),o=n.length-1;0<=o;o--)e.replaceRange(t[o]?r+r:r,n[o].anchor,n[o].head,"+newline");n=e.listSelections();for(var i=0;i<n.length;i++)e.indentLine(n[i].from().line,null,!0),t[i]&&e.indentLine(n[i].from().line-1,null,!0);e.setSelections(e.listSelections().map(function(n,r){if(t[r]){var o=n.from().line-1,i={line:o,ch:e.getLine(o).length};return{anchor:i,head:i}}return n}))}):e.constructor.Pass}function O(e,t){if(D(t.anchor,t.head)){var n=t.anchor,r=e.getModeAt(n);if("xml"===r.name){var o=e.getTokenAt(n),i=e.getTokenAt(de({},n,{ch:n.ch+1}));return"tag bracket"===o.type&&">"===o.string&&"tag bracket"===i.type&&"</"===i.string}}}function M(e,t){return e.line-t.line||e.ch-t.ch}function D(e,t){return e.sticky===t.sticky&&0===M(e,t)}function R(e){var t=P(e);if(t){var n=e.getOption("emmetPrompt")||U,r=e.getRange(t.from,t.to,"\n").split("\n").map(function(e){return e.trim()});n(e,"Enter abbreviation to wrap with:",function(n){if(n){var o=new _e(n,t,l(e,t.from,{text:r}));o.insert(e)}})}else console.warn("Nothing to wrap")}function P(e){if(e.somethingSelected()){var t=e.listSelections().filter(function(e){return e.anchor!==e.head})[0];if(t)return 0>y(t.anchor,t.head)?{from:t.anchor,to:t.head}:{from:t.head,to:t.anchor}}return B(e,e.getCursor())}function B(e,t){var n=e.getEmmetDocumentModel(),r=n&&n.nodeForPoint(t);if(!r)return null;if(F(r.open,t)||F(r.close,t))return b(r);var o=r.open.end,i=r.close?r.close.start:r.open.end;return x(e,o,i)}function F(e,t){return e&&f(b(e),t)}function U(e,t,n){n(window.prompt(t))}function z(e,t){var n=_(e,t);if(n)return n;E(e);var r=T(e,t,!0);if(r)return A(e,r)}function j(e,t){t=t||e.getCursor();var n=[],r=T(e,t,!0);r&&r.abbreviation!==r.snippet&&n.push(G(e,t,r));var o=r?r.config:l(e,t);return n="stylesheet"===o.type?n.concat(V(e,t,o)):n.concat(q(e,t,o)),{type:o.type,syntax:o.syntax,abbreviation:r,completions:n.filter(Boolean)}}function q(e,t,n){var r=e.getLine(t.line).slice(0,t.ch),o=X(r,/[\w:\-$@]/);if(o){var i={from:{line:t.line,ch:t.ch-o.length},to:t};return W(e,t,n).filter(function(e){return e.key!==o&&0===e.key.indexOf(o)}).map(function(t){return new Ee("snippet",e,i,t.key,t.preview,t.snippet)})}return[]}function V(e,t,n){var r=e.getLine(t.line).slice(0,t.ch),o=X(r,/[\w-@$]/);if(o){var i={from:{line:t.line,ch:t.ch-o.length},to:t};if(n.options&&n.options.property){var s=n.options.property.toLowerCase(),l=W(e,t,n).find(function(e){return e.property&&e.property===s});if(l&&l.keywords.length)return l.keywords.map(function(t){return 0===t.key.indexOf(o)&&new Ee("value",e,i,t.key,t.preview,t.snippet)}).filter(Boolean)}else return W(e,t,n).filter(function(e){return e.key!==o&&0===e.key.indexOf(o)}).map(function(t){return new Ee("snippet",e,i,t.key,t.preview,t.snippet)})}return[]}function W(e,t,n){var r=n.type,o=n.syntax;e.state.emmetCompletions||(e.state.emmetCompletions={});var i=e.state.emmetCompletions;if(!(o in i)){var s=(0,xe.createSnippetsRegistry)(r,o,n.snippets);i[o]="stylesheet"===r?H(s,n):K(s,n)}return i[o]}function H(e){return(0,ve.convertToCSSSnippets)(e).map(function(e){var t=e.property,n=e.keywords();return n.length?t+=": "+g(n.join(" | ")):e.value&&(t+=": "+g(e.value)),{key:e.key,value:e.value,snippet:e.key,property:e.property,keywords:n.map(function(e){var t=e.match(/^[\w-]+/);return t&&{key:t[0],preview:g(e),snippet:e}}).filter(Boolean),preview:t}})}function K(e,t){return e.all({type:"string"}).map(function(e){return{key:e.key,value:e.value,preview:g((0,xe.expand)(e.value,t)),snippet:e.key}})}function G(e,t,n){var r=n.preview;return 500<r.length&&(r=r.slice(0,500)+"..."),new Ee("expanded-abbreviation",e,n.range,"Expand abbreviation",r,function(e,t){return n.insert(e,t)})}function X(e,t){for(var n=e.length;0<n&&!!t.test(e[n-1]);)n--;return e.slice(n)}function Q(e,t){var n=new Ce(e);try{return new Ae((0,Se.default)(n,{xml:"xml"===t}),"html",t||"html")}catch(e){console.warn(e)}}function Y(e){var t=Z(e);return Q(e,t)}function J(e){return e.state._emmetModel||(e.state._emmetModel=Y(e)),e.state._emmetModel}function $(e){e.state._emmetModel=null}function Z(e){var t=e.getMode();return"htmlmixed"===t.name?"html":"xml"===t.name?t.configuration:t.name}function ee(e,t){t=t||e.getCursor();var n=te(e);if(n)if(f(n.open.find(),t)){if(!n.close||ae(e,n.open)===ae(e,n.close))return n;}else if(n.close&&f(n.close.find(),t)&&ae(e,n.open)===ae(e,n.close))return n;ne(e);var r=re(e,t);if(r&&"tag"===r.type)return{open:oe(e,r.open.name,Ie),close:r.close&&oe(e,r.close.name,Ne)}}function te(e){var t,n;return e.getAllMarks().forEach(function(e){e.className===Ie?t=e:e.className===Ne&&(n=e)}),t?{open:t,close:n}:null}function ne(e){e.getAllMarks().forEach(function(e){(e.className===Ie||e.className===Ne)&&e.clear()})}function re(e,t){var n=e.getEmmetDocumentModel();return n&&n.nodeForPoint(t||e.getCursor())}function oe(e,t,n){return e.markText(t.start,t.end,{className:n,inclusiveLeft:!0,inclusiveRight:!0,clearWhenEmpty:!1})}function ae(e,t){var n=t.find();return n?e.getRange(n.from,n.to):""}function ie(e,t){var n=te(e),r=t.from;n&&(f(n.open.find(),r)&&n.close?se(e,n.open,n.close):n.close&&f(n.close.find(),r)&&se(e,n.close,n.open))}function se(e,t,n){var r=le(e,t),o=n.find(),i=r.match(/[\w:.-]+/),s=r?i&&i[0]:"";null==s?ne(e):e.getRange(o.from,o.to)!==s&&e.replaceRange(s,o.from,o.to)}function le(e,t){var n=t.find();return n?e.getRange(n.from,n.to):""}t.__esModule=!0;var de=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},pe=n("k0dc"),ce=r(pe),ue=n("Lu2N"),he=r(ue),me=n("R0uB"),ge=r(me),fe=n("rc1b"),ye=n("ZTma"),be=r(ye),xe=n("k/hd"),ve=n("ad/k"),ke=n("k0gZ"),Se=r(ke),we=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return"${"+e+(t?":"+t:"")+"}"},Ce=function(e){function t(n,r,s){o(this,t);var l=i(this,e.call(this)),d=n.constructor;l.editor=n,l.start=l.pos=r||d.Pos(0,0);var p=n.lastLine();return l._eof=s?s.to:d.Pos(p,l._lineLength(p)),l._sof=s?s.from:d.Pos(0,0),l}return s(t,e),t.prototype.sof=function(){return 0>=p(this.pos,this._sof)},t.prototype.eof=function(){return 0<=p(this.pos,this._eof)},t.prototype.limit=function(e,t){return new this.constructor(this.editor,e,{from:e,to:t})},t.prototype.peek=function(){var e=this.pos,t=e.line,n=e.ch,r=this.editor.getLine(t);return n<r.length?r.charCodeAt(n):10},t.prototype.next=function(){if(!this.eof()){var e=this.peek();return this.pos=de({},this.pos,{ch:this.pos.ch+1}),this.pos.ch>=this._lineLength(this.pos.line)&&(this.pos.line++,this.pos.ch=0),this.eof()&&(this.pos=de({},this._eof)),e}return NaN},t.prototype.backUp=function(e){var t=this.editor.constructor,n=this.pos,r=n.line,o=n.ch;for(o-=e||1;0<=r&&0>o;)r--,o+=this._lineLength(r);return this.pos=0>r||0>o?t.Pos(0,0):t.Pos(r,o),this.peek()},t.prototype.current=function(){return this.substring(this.start,this.pos)},t.prototype.substring=function(e,t){return this.editor.getRange(e,t)},t.prototype.error=function(e){var t=new Error(e+" at line "+this.pos.line+", column "+this.pos.ch);return t.originalMessage=e,t.pos=this.pos,t.string=this.string,t},t.prototype._lineLength=function(e){var t=e===this.editor.lastLine();return this.editor.getLine(e).length+(t?0:1)},t}(he.default),Te="emmet-abbreviation",_e=function(){function e(t,n,r){o(this,e),this.abbreviation=t,this.range=n,this.config=r,this.ast=(0,xe.parse)(t,r),this.snippet=(0,xe.expand)(this.ast,r),this.preview=g(this.snippet)}return e.prototype.insert=function(e,t){return C(e,t||this.range,this.snippet)},e.prototype.valid=function(e,t){return this.preview&&this.abbreviation!==this.preview&&(t&&"stylesheet"===this.config.type?this._isValidForStylesheet(e):!0)},e.prototype._isValidForStylesheet=function(e){var t=this.range.from,n=e.getTokenAt(t);if(/^[#!]/.test(this.abbreviation))return k(e,t);var r=this.ast.children.every(function(e){return e.name}),o=n.state&&n.state.localState||n.state;return!r||"sass"===this.config.syntax||o&&o.context&&"block"===o.context.type},e}(),Ee=function(){function e(t,n,r,i,s,l){o(this,e),this.type=t,this.editor=n,this.range=r,this.name=i,this.preview=s,this.snippet=l,this._inserted=!1}return e.prototype.insert=function(){this._inserted||(this._inserted=!0,"function"==typeof this.snippet?this.snippet(this.editor,this.range):C(this.editor,this.range,this.snippet),E(this.editor))},e}(),Ae=function(){function e(t,n,r){o(this,e),this.dom=t,this.type=n,this.syntax=r}return e.prototype.nodeForPoint=function(e,t){for(var n=this.dom.firstChild,r=null;n;)f(b(n),e,t)?(r=n,n=n.firstChild):n=n.nextSibling;return r},e}(),Ie="emmet-open-tag",Ne="emmet-close-tag";t.default=function(e){de(e.commands,{emmetExpandAbbreviation:function(e){return N(e,!0)},emmetExpandAbbreviationAll:function(e){return N(e,!1)},emmetInsertLineBreak:L,emmetWrapWithAbbreviation:R});var t=function(e){return z(e,e.getCursor())};e.defineOption("markEmmetAbbreviation",!0,function(e,n){n?e.on("change",t):(e.off("change",t),E(e))}),e.defineOption("autoRenameTags",!0,function(e,t){t?e.on("change",ie):e.off("change",ie)}),e.defineOption("jsxBracket",!0),e.defineOption("markTagPairs",!1,function(e,t){t?(e.on("cursorActivity",ee),e.on("change",$)):(e.off("cursorActivity",ee),e.off("change",$),$(e),ne(e))}),e.defineOption("emmet",{}),e.defineExtension("getEmmetCompletions",function(e,t){var n=this;"boolean"==typeof e&&(t=e,e=null),e=e||n.getCursor();var r=j(n,e);if(r&&r.completions.length)return n.getOption("markEmmetAbbreviation")&&!_(n,e)&&t&&(E(n),A(r.model)),{from:r.abbreviation.range.from,to:r.abbreviation.range.to,list:r.completions}}),e.defineExtension("getEmmetAbbreviation",function(e,t){return T(this,e||this.getCursor(),t)}),e.defineExtension("findEmmetMarker",function(e){return _(this,e||this.getCursor())}),e.defineExtension("getEmmetDocumentModel",function(){var e=this;return e.getOption("markTagPairs")?J(e):Y(e)})}},"/rE2":function(e,t,n){"use strict";function r(e,t){var n=new Set;(function e(r){var i=t.resolve(r.name);if(i&&!n.has(i)){if("function"==typeof i.value)return i.value(r,t,e);var s=(0,c.default)(i.value);n.add(i),s.walk(e),n.delete(i);var d=l(s);for(o(d,r);s.firstChild;)r.parent.insertBefore(s.firstChild,r);d.parent.insertBefore(r,d),d.remove()}})(e)}function o(e,t){return t.name=e.name,e.selfClosing&&(t.selfClosing=!0),null!=e.value&&(t.value=e.value),e.repeat&&(t.repeat=d({},e.repeat)),i(e,t)}function i(e,t){s(e,t);for(var n=new Map,r=e.attributes,o=0;o<r.length;o++)n.set(r[o].name,r[o].clone());r=t.attributes.slice();for(var i=0,l,d;i<r.length;i++)l=r[i],n.has(l.name)?(d=n.get(l.name),d.value=l.value,d.options.implied&&(d.options.implied=!1)):n.set(l.name,l),t.removeAttribute(l);for(var p=Array.from(n.values()),c=0;c<p.length;c++)t.setAttribute(p[c]);return t}function s(e,t){for(var n=e.classList,r=0;r<n.length;r++)t.addClass(n[r]);return t}function l(e){for(;e.children.length;)e=e.children[e.children.length-1];return e}t.__esModule=!0;var d=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},p=n("A9O4"),c=function(e){return e&&e.__esModule?e:{default:e}}(p);t.default=function(e,t){return e.walk(function(e){return r(e,t)}),e}},"0gyT":function(e){"use strict";e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},"1ExO":function(e,t,n){"use strict";e.exports=n("FRpO").EventEmitter},"1JcR":function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function r(e,t){var n=e.cm.getTokenTypeAt(h(e.line,t));return n&&/\btag\b/.test(n)}function o(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function i(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t)if(o(e))continue;else return;if(!r(e,t+1)){e.ch=t+1;continue}var n=e.text.lastIndexOf("/",t),i=-1<n&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,i?"selfClose":"regular"}}function l(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t)if(i(e))continue;else return;if(!r(e,t+1)){e.ch=t;continue}m.lastIndex=t,e.ch=t;var n=m.exec(e.text);if(n&&n.index==t)return n}}function d(e){for(;;){m.lastIndex=e.ch;var t=m.exec(e.text);if(!t)if(o(e))continue;else return;if(!r(e,t.index+1)){e.ch=t.index+1;continue}return e.ch=t.index+t[0].length,t}}function p(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t)if(i(e))continue;else return;if(!r(e,t+1)){e.ch=t;continue}var n=e.text.lastIndexOf("/",t),o=-1<n&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}}function c(e,t){for(var n=[];;){var r=d(e),o=e.line,l=e.ch-(r?r[0].length:0),p;if(!r||!(p=s(e)))return;if("selfClose"!=p)if(r[1]){for(var c=n.length-1;0<=c;--c)if(n[c]==r[2]){n.length=c;break}if(0>c&&(!t||t==r[2]))return{tag:r[2],from:h(o,l),to:h(e.line,e.ch)}}else n.push(r[2])}}function u(e,t){for(var n=[],r;;){if(r=p(e),!r)return;if("selfClose"==r){l(e);continue}var o=e.line,s=e.ch,d=l(e);if(!d)return;if(d[1])n.push(d[2]);else{for(var c=n.length-1;0<=c;--c)if(n[c]==d[2]){n.length=c;break}if(0>c&&(!t||t==d[2]))return{tag:d[2],from:h(e.line,e.ch),to:h(o,s)}}}}var h=e.Pos,m=/<(\/?)([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;e.registerHelper("fold","xml",function(e,r){for(var o=new n(e,r.line,0),i;;){if(i=d(o),!i||o.line!=r.line)return;var l=s(o);if(!l)return;if(!i[1]&&"selfClose"!=l){var p=h(o.line,o.ch),u=c(o,i[2]);return u&&0<t(u.from,p)?{from:p,to:u.from}:null}}}),e.findMatchingTag=function(e,r,o){var i=new n(e,r.line,r.ch,o);if(-1!=i.text.indexOf(">")||-1!=i.text.indexOf("<")){var d=s(i),p=d&&h(i.line,i.ch),m=d&&l(i);if(d&&m&&!(0<t(i,r))){var g={from:h(i.line,i.ch),to:p,tag:m[2]};return"selfClose"==d?{open:g,close:null,at:"open"}:m[1]?{open:u(i,m[2]),close:g,at:"close"}:(i=new n(e,p.line,p.ch,o),{open:g,close:c(i,m[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,r,o){for(var i=new n(e,t.line,t.ch,r),s;;){if(s=u(i,o),!s)break;var l=new n(e,t.line,t.ch,r),d=c(l,s.tag);if(d)return{open:s,close:d}}},e.scanForClosingTag=function(e,t,r,o){var i=new n(e,t.line,t.ch,o?{from:0,to:o}:null);return c(i,r)}})},"1ROC":function(e){"use strict";var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},"1miM":function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new r;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}r.prototype=n("e4aZ"),r.prototype.loadAsync=n("2/gt"),r.support=n("untT"),r.defaults=n("lUr3"),r.version="3.1.5",r.loadAsync=function(e,t){return new r().loadAsync(e,t)},r.external=n("8JlO"),e.exports=r},"2/gt":function(e,t,n){"use strict";function r(e){return new s.Promise(function(t,n){var r=e.decompressed.getContentWorker().pipe(new d);r.on("error",function(t){n(t)}).on("end",function(){r.streamInfo.crc32===e.decompressed.crc32?t():n(new Error("Corrupted zip : CRC32 mismatch"))}).resume()})}var o=n("dvMn"),s=n("8JlO"),i=n("Sm7/"),o=n("dvMn"),l=n("rAgE"),d=n("gpbE"),p=n("c5OX");e.exports=function(e,t){var n=this;return t=o.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),p.isNode&&p.isStream(e)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(e){var n=new l(t);return n.load(e),n}).then(function(e){var n=[s.Promise.resolve(e)],o=e.files;if(t.checkCRC32)for(var l=0;l<o.length;l++)n.push(r(o[l]));return s.Promise.all(n)}).then(function(e){for(var r=e.shift(),o=r.files,s=0,i;s<o.length;s++)i=o[s],n.file(i.fileNameStr,i.decompressed,{binary:!0,optimizedBinaryString:!0,date:i.date,dir:i.dir,comment:i.fileCommentStr.length?i.fileCommentStr:null,unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions,createFolders:t.createFolders});return r.zipComment.length&&(n.comment=r.zipComment),n})}},"29F7":function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){function t(e){var t=e.flags;return null==t?(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":""):t}function n(e,n){for(var r=t(e),o=r,s=0;s<n.length;s++)-1==o.indexOf(n.charAt(s))&&(o+=n.charAt(s));return r==o?e:new RegExp(e.source,o)}function r(e){return /\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function o(e,t,r){t=n(t,"g");for(var o=r.line,i=r.ch,s=e.lastLine();o<=s;o++,i=0){t.lastIndex=i;var l=e.getLine(o),d=t.exec(l);if(d)return{from:m(o,d.index),to:m(o,d.index+d[0].length),match:d}}}function i(e,t,s){if(!r(t))return o(e,t,s);t=n(t,"gm");for(var l=1,d=s.line,p=e.lastLine(),c;d<=p;){for(var u=0,i;u<l&&!(d>p);u++)i=e.getLine(d++),c=null==c?i:c+"\n"+i;l*=2,t.lastIndex=s.ch;var h=t.exec(c);if(h){var g=c.slice(0,h.index).split("\n"),f=h[0].split("\n"),y=s.line+g.length-1,b=g[g.length-1].length;return{from:m(y,b),to:m(y+f.length-1,1==f.length?b+f[0].length:f[f.length-1].length),match:h}}}}function s(e,t){for(var n=0,r;;){t.lastIndex=n;var o=t.exec(e);if(!o)return r;if(r=o,n=r.index+(r[0].length||1),n==e.length)return r}}function l(e,t,r){t=n(t,"g");for(var o=r.line,i=r.ch,l=e.firstLine(),d;o>=l;o--,i=-1){d=e.getLine(o),-1<i&&(d=d.slice(0,i));var p=s(d,t);if(p)return{from:m(o,p.index),to:m(o,p.index+p[0].length),match:p}}}function d(e,t,r){t=n(t,"gm");for(var o=1,l=r.line,d=e.firstLine(),p;l>=d;){for(var c=0,i;c<o;c++)i=e.getLine(l--),p=null==p?i.slice(0,r.ch):i+"\n"+p;o*=2;var u=s(p,t);if(u){var h=p.slice(0,u.index).split("\n"),g=u[0].split("\n"),f=l+h.length,y=h[h.length-1].length;return{from:m(f,y),to:m(f+g.length-1,1==g.length?y+g[0].length:g[g.length-1].length),match:u}}}}function p(e,t,n,r){if(e.length==t.length)return n;for(var o=0,i=n+Math.max(0,e.length-t.length);;){if(o==i)return o;var s=o+i>>1,l=r(e.slice(0,s)).length;if(l==n)return s;l>n?i=s:o=s+1}}function c(e,t,n,r){if(!t.length)return null;var o=r?g:f,s=o(t).split(/\r|\n\r?/);search:for(var l=n.line,d=n.ch,c=e.lastLine()+1-s.length;l<=c;l++,d=0){var u=e.getLine(l).slice(d),h=o(u);if(1==s.length){var y=h.indexOf(s[0]);if(-1==y)continue search;var n=p(u,h,y,o)+d;return{from:m(l,p(u,h,y,o)+d),to:m(l,p(u,h,y+s[0].length,o)+d)}}var b=h.length-s[0].length;if(h.slice(b)!=s[0])continue search;for(var x=1;x<s.length-1;x++)if(o(e.getLine(l+x))!=s[x])continue search;var i=e.getLine(l+s.length-1),v=o(i),k=s[s.length-1];if(v.slice(0,k.length)!=k)continue search;return{from:m(l,p(u,h,b,o)+d),to:m(l+s.length-1,p(i,v,k.length,o))}}}function u(e,t,n,r){if(!t.length)return null;var o=r?g:f,s=o(t).split(/\r|\n\r?/);search:for(var l=n.line,d=n.ch,c=e.firstLine()-1+s.length,u;l>=c;l--,d=-1){u=e.getLine(l),-1<d&&(u=u.slice(0,d));var h=o(u);if(1==s.length){var y=h.lastIndexOf(s[0]);if(-1==y)continue search;return{from:m(l,p(u,h,y,o)),to:m(l,p(u,h,y+s[0].length,o))}}var b=s[s.length-1];if(h.slice(0,b.length)!=b)continue search;for(var x=1,n=l-s.length+1;x<s.length-1;x++)if(o(e.getLine(n+x))!=s[x])continue search;var i=e.getLine(l+1-s.length),v=o(i);if(v.slice(v.length-s[0].length)!=s[0])continue search;return{from:m(l+1-s.length,p(i,v,i.length-s[0].length,o)),to:m(l,p(u,h,b.length,o))}}}function h(e,t,r,s){this.atOccurrence=!1,this.doc=e,r=r?e.clipPos(r):m(0,0),this.pos={from:r,to:r};var p;"object"==typeof s?p=s.caseFold:(p=s,s=null),"string"==typeof t?(null==p&&(p=!1),this.matches=function(n,r){return(n?u:c)(e,t,r,p)}):(t=n(t,"gm"),this.matches=s&&!1===s.multiline?function(n,r){return(n?l:o)(e,t,r)}:function(n,r){return(n?d:i)(e,t,r)})}var m=e.Pos,g,f;String.prototype.normalize?(g=function(e){return e.normalize("NFD").toLowerCase()},f=function(e){return e.normalize("NFD")}):(g=function(e){return e.toLowerCase()},f=function(e){return e}),h.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){for(var n=this.matches(t,this.doc.clipPos(t?this.pos.from:this.pos.to));n&&0==e.cmpPos(n.from,n.to);)t?n.from.ch?n.from=m(n.from.line,n.from.ch-1):n.from.line==this.doc.firstLine()?n=null:n=this.matches(t,this.doc.clipPos(m(n.from.line-1))):n.to.ch<this.doc.getLine(n.to.line).length?n.to=m(n.to.line,n.to.ch+1):n.to.line==this.doc.lastLine()?n=null:n=this.matches(t,m(n.to.line+1,0));if(n)return this.pos=n,this.atOccurrence=!0,this.pos.match||!0;var r=m(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:r,to:r},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var r=e.splitLines(t);this.doc.replaceRange(r,this.pos.from,this.pos.to,n),this.pos.to=m(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,t,n){return new h(this.doc,e,t,n)}),e.defineDocExtension("getSearchCursor",function(e,t,n){return new h(this,e,t,n)}),e.defineExtension("selectMatches",function(t,n){for(var r=[],o=this.getSearchCursor(t,this.getCursor("from"),n);o.findNext()&&!(0<e.cmpPos(o.to(),this.getCursor("to")));)r.push({anchor:o.from(),head:o.to()});r.length&&this.setSelections(r,0)})})},"2P9T":function(e,t,n){"use strict";function r(e,t,n){return"blob"===e?l.newBlob(l.transformTo("arraybuffer",t),n):"base64"===e?c.encode(t):l.transformTo(e,t)}function o(e,t){var n=0,r=null,o=0,s;for(s=0;s<t.length;s++)o+=t[s].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(r=new Uint8Array(o),s=0;s<t.length;s++)r.set(t[s],n),n+=t[s].length;return r;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'");}}function i(e,t){return new h.Promise(function(n,i){var s=[],l=e._internalType,d=e._outputType,p=e._mimeType;e.on("data",function(e,n){s.push(e),t&&t(n)}).on("error",function(e){s=[],i(e)}).on("end",function(){try{var e=r(d,o(l,s),p);n(e)}catch(t){i(t)}s=[]}).resume()})}function s(e,t,n){var r=t;"blob"===t||"arraybuffer"===t?r="uint8array":"base64"===t?r="string":void 0;try{this._internalType=r,this._outputType=t,this._mimeType=n,l.checkSupport(r),this._worker=e.pipe(new d(r)),e.lock()}catch(t){this._worker=new p("error"),this._worker.error(t)}}var l=n("dvMn"),d=n("yPXq"),p=n("ZKdc"),c=n("Ps3q"),u=n("untT"),h=n("8JlO"),m=null;if(u.nodestream)try{m=n("LZfN")}catch(t){}s.prototype={accumulate:function(e){return i(this,e)},on:function(e,t){var n=this;return"data"===e?this._worker.on(e,function(e){t.call(n,e.data,e.meta)}):this._worker.on(e,function(){l.delay(t,arguments,n)}),this},resume:function(){return l.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(l.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new m(this,{objectMode:"nodebuffer"!==this._outputType},e)}},e.exports=s},"2u+n":function(e,t,n){"use strict";var r=n("tbG5"),o=15,i=852,s=592,l=0,d=1,p=2,c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],u=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],m=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,g,f,y,b,x){var v=x.bits,k=0,S=0,w=0,C=0,T=0,_=0,E=0,A=0,I=0,N=0,L=null,O=0,M=new r.Buf16(o+1),D=new r.Buf16(o+1),R=null,P=0,B,F,U,z,j,q,V,W,H;for(k=0;k<=o;k++)M[k]=0;for(S=0;S<g;S++)M[t[n+S]]++;for(T=v,C=o;1<=C&&0===M[C];C--);if(T>C&&(T=C),0==C)return f[y++]=20971520,f[y++]=20971520,x.bits=1,0;for(w=1;w<C&&0===M[w];w++);for(T<w&&(T=w),A=1,k=1;k<=o;k++)if(A<<=1,A-=M[k],0>A)return-1;if(0<A&&(e===l||1!=C))return-1;for(D[1]=0,k=1;k<o;k++)D[k+1]=D[k]+M[k];for(S=0;S<g;S++)0!==t[n+S]&&(b[D[t[n+S]]++]=S);if(e===l?(L=R=b,q=19):e===d?(L=c,O-=257,R=u,P-=257,q=256):(L=h,R=m,q=-1),N=0,S=0,k=w,j=y,_=T,E=0,U=-1,I=1<<T,z=I-1,e===d&&I>i||e===p&&I>s)return 1;for(;;){V=k-E,b[S]<q?(W=0,H=b[S]):b[S]>q?(W=R[P+b[S]],H=L[O+b[S]]):(W=96,H=0),B=1<<k-E,F=1<<_,w=F;do F-=B,f[j+(N>>E)+F]=0|(V<<24|W<<16|H);while(0!==F);for(B=1<<k-1;N&B;)B>>=1;if(0===B?N=0:(N&=B-1,N+=B),S++,0==--M[k]){if(k==C)break;k=t[n+b[S]]}if(k>T&&(N&z)!==U){for(0==E&&(E=T),j+=w,_=k-E,A=1<<_;_+E<C&&(A-=M[_+E],!(0>=A));)_++,A<<=1;if(I+=1<<_,e===d&&I>i||e===p&&I>s)return 1;U=N&z,f[U]=0|(T<<24|_<<16|j-y)}}return 0!==N&&(f[j+N]=0|(4194304|k-E<<24)),x.bits=T,0}},"34Q3":function(e,t,n){"use strict";function r(e,t){if(65537>t&&(e.subarray&&d||!e.subarray&&l))return o.apply(null,s.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=o(e[r]);return n}var o=String.fromCharCode,s=n("tbG5"),l=!0,d=!0;try{o.apply(null,[0])}catch(e){l=!1}try{o.apply(null,new Uint8Array(1))}catch(e){d=!1}for(var p=new s.Buf8(256),i=0;256>i;i++)p[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;p[254]=p[254]=1,t.string2buf=function(e){var t=e.length,n=0,r,o,l,d,p;for(d=0;d<t;d++)o=e.charCodeAt(d),55296==(64512&o)&&d+1<t&&(l=e.charCodeAt(d+1),56320==(64512&l)&&(o=65536+(o-55296<<10)+(l-56320),d++)),n+=128>o?1:2048>o?2:65536>o?3:4;for(r=new s.Buf8(n),p=0,d=0;p<n;d++)o=e.charCodeAt(d),55296==(64512&o)&&d+1<t&&(l=e.charCodeAt(d+1),56320==(64512&l)&&(o=65536+(o-55296<<10)+(l-56320),d++)),128>o?r[p++]=o:2048>o?(r[p++]=192|o>>>6,r[p++]=128|63&o):65536>o?(r[p++]=224|o>>>12,r[p++]=128|63&o>>>6,r[p++]=128|63&o):(r[p++]=240|o>>>18,r[p++]=128|63&o>>>12,r[p++]=128|63&o>>>6,r[p++]=128|63&o);return r},t.buf2binstring=function(e){return r(e,e.length)},t.binstring2buf=function(e){for(var t=new s.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n=t||e.length,o=Array(2*n),s,i,l,d;for(i=0,s=0;s<n;){if(l=e[s++],128>l){o[i++]=l;continue}if(d=p[l],4<d){o[i++]=65533,s+=d-1;continue}for(l&=2===d?31:3===d?15:7;1<d&&s<n;)l=l<<6|63&e[s++],d--;if(1<d){o[i++]=65533;continue}65536>l?o[i++]=l:(l-=65536,o[i++]=55296|1023&l>>10,o[i++]=56320|1023&l)}return r(o,i)},t.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return 0>n?t:0===n?t:n+p[e[n]]>t?n:t}},"38Wu":function(e,t,n){"use strict";function r(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return s(e,t,n)}var i=n("dskh"),s=i.Buffer;s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?e.exports=i:(r(i,t),t.Buffer=o),r(s,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=s(e);return void 0===t?r.fill(0):"string"==typeof n?r.fill(t,n):r.fill(t),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},"3Rhr":function(e){"use strict";e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3]);}return e.apply(n,t)}},"3Vd+":function(e){"use strict";var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},"3bh8":function(e,t,n){"use strict";var r=n("z3uY"),o=n("HyWd");e.exports=n("s0rf")?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"4Bm0":function(e){"use strict";e.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},"4E2n":function(e,t){"use strict";var n=String.fromCharCode;(function(t,n){e.exports=n()})(void 0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function r(e,t,n){var r=null,l=function(e,t){n&&n(e,t),r&&r.visit(e,t)},d="function"==typeof n?l:null,p=!1;if(t){p="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(p||c)&&(r=new o.CommentHandler,r.attach=c,t.comment=!0,d=l)}var u=!1;t&&"string"==typeof t.sourceType&&(u="module"===t.sourceType);var h=t&&"boolean"==typeof t.jsx&&t.jsx?new i.JSXParser(e,t,d):new s.Parser(e,t,d);var m=u?h.parseModule():h.parseScript(),g=m;return p&&r&&(g.comments=r.comments),h.config.tokens&&(g.tokens=h.tokens),h.config.tolerant&&(g.errors=h.errorHandler.errors),g}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(3),s=n(8),l=n(15);t.parse=r,t.parseModule=function(e,t,n){var o=t||{};return o.sourceType="module",r(e,o,n)},t.parseScript=function(e,t,n){var o=t||{};return o.sourceType="script",r(e,o,n)},t.tokenize=function(e,t,n){var r=new l.Tokenizer(e,t),o;o=[];try{for(;;){var i=r.getNextToken();if(!i)break;n&&(i=n(i)),o.push(i)}}catch(t){r.errorHandler.tolerate(t)}return r.errorHandler.tolerant&&(o.errors=r.errors()),o};var d=n(2);t.Syntax=d.Syntax,t.version="4.0.0"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===r.Syntax.BlockStatement&&0===e.body.length){for(var n=[],o=this.leading.length-1,i;0<=o;--o)i=this.leading[o],t.end.offset>=i.start&&(n.unshift(i.comment),this.leading.splice(o,1),this.trailing.splice(o,1));n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(0<this.trailing.length){for(var n=this.trailing.length-1,r;0<=n;--n)r=this.trailing[n],r.start>=e.end.offset&&t.unshift(r.comment);return this.trailing.length=0,t}var o=this.stack[this.stack.length-1];if(o&&o.node.trailingComments){var i=o.node.trailingComments[0];i&&i.range[0]>=e.end.offset&&(t=o.node.trailingComments,delete o.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t=[],n,r;0<this.stack.length&&(r=this.stack[this.stack.length-1],r&&r.start>=e.start.offset);)n=r.node,this.stack.pop();if(n){for(var o=n.leadingComments?n.leadingComments.length:0,s=o-1,i;0<=s;--s)i=n.leadingComments[s],i.range[1]<=e.start.offset&&(t.unshift(i),n.leadingComments.splice(s,1));return n.leadingComments&&0===n.leadingComments.length&&delete n.leadingComments,t}for(var s=this.leading.length-1,r;0<=s;--s)r=this.leading[s],r.start<=e.start.offset&&(t.unshift(r.comment),this.leading.splice(s,1));return t},e.prototype.visitNode=function(e,t){if(!(e.type===r.Syntax.Program&&0<e.body.length)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),o=this.findLeadingComments(t);0<o.length&&(e.leadingComments=o),0<n.length&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var o={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(o.comment.loc=e.loc),e.type=n,this.leading.push(o),this.trailing.push(o)}},e.prototype.visit=function(e,t){"LineComment"===e.type?this.visitComment(e,t):"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=o},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){function o(e){var t;switch(e.type){case d.JSXSyntax.JSXIdentifier:t=e.name;break;case d.JSXSyntax.JSXNamespacedName:var n=e;t=o(n.namespace)+":"+o(n.name);break;case d.JSXSyntax.JSXMemberExpression:var r=e;t=o(r.object)+"."+o(r.property);break;default:}return t}var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(4),l=r(5),d=r(6),p=r(7),c=r(8),u=r(13),h=r(14);u.TokenName[100]="JSXIdentifier",u.TokenName[101]="JSXText";var m=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return i(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",r=!0,o=!1,i=!1,l=!1,d;!this.scanner.eof()&&r&&!o&&(d=this.scanner.source[this.scanner.index],d!==e);)if(o=";"===d,t+=d,++this.scanner.index,!o)switch(t.length){case 2:i="#"===d;break;case 3:i&&(l="x"===d,r=l||s.Character.isDecimalDigit(d.charCodeAt(0)),i=i&&!l);break;default:r=r&&(!i||s.Character.isDecimalDigit(d.charCodeAt(0))),r=r&&(!l||s.Character.isHexDigit(d.charCodeAt(0)));}if(r&&o&&2<t.length){var p=t.substr(1,t.length-2);i&&1<p.length?t=n(parseInt(p.substr(1),10)):l&&2<p.length?t=n(parseInt("0"+p.substr(1),16)):!i&&!l&&h.XHTMLEntities[p]&&(t=h.XHTMLEntities[p])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e){var t=this.scanner.source[this.scanner.index++];return{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===e||39===e){for(var n=this.scanner.index,r=this.scanner.source[this.scanner.index++],o="",i;!this.scanner.eof()&&(i=this.scanner.source[this.scanner.index++],i!==r);)o+="&"===i?this.scanXHTMLEntity(r):i;return{type:8,value:o,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}if(46===e){var l=this.scanner.source.charCodeAt(this.scanner.index+1),d=this.scanner.source.charCodeAt(this.scanner.index+2),t=46===l&&46===d?"...":".",n=this.scanner.index;return this.scanner.index+=t.length,{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(s.Character.isIdentifierStart(e)&&92!==e){var n=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var i=this.scanner.source.charCodeAt(this.scanner.index);if(s.Character.isIdentifierPart(i)&&92!==i)++this.scanner.index;else if(45===i)++this.scanner.index;else break}var p=this.scanner.source.slice(n,this.scanner.index);return{type:100,value:p,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="",n;!this.scanner.eof()&&(n=this.scanner.source[this.scanner.index],"{"!==n&&"<"!==n);)++this.scanner.index,t+=n,s.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index);this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var r={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return 0<t.length&&this.config.tokens&&this.tokens.push(this.convertToken(r)),r},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();(7!==t.type||t.value!==e)&&this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new l.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new l.JSXNamespacedName(n,r))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var o=t;this.expectJSX(".");var i=this.parseJSXIdentifier();t=this.finalize(e,new l.JSXMemberExpression(o,i))}return t},t.prototype.parseJSXAttributeName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier(),n;if(this.matchJSX(":")){this.expectJSX(":");var r=this.parseJSXIdentifier();n=this.finalize(e,new l.JSXNamespacedName(t,r))}else n=t;return n},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new p.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new l.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new l.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new l.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[],t;!this.matchJSX("/")&&!this.matchJSX(">");)t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute(),e.push(t);return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new l.JSXOpeningElement(t,r,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new l.JSXClosingElement(t))}var n=this.parseJSXElementName(),r=this.parseJSXAttributes(),o=this.matchJSX("/");return o&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new l.JSXOpeningElement(n,o,r))},t.prototype.parseJSXEmptyExpression=function(){var e=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(e,new l.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new l.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start<n.end){var r=this.getTokenRaw(n),o=this.finalize(t,new l.JSXText(n.value,r));e.push(o)}if("{"===this.scanner.source[this.scanner.index]){var i=this.parseJSXExpressionContainer();e.push(i)}else break}return e},t.prototype.parseComplexJSXElement=function(e){for(var t=[];!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());var n=this.createJSXChildNode(),r=this.parseJSXBoundaryElement();if(r.type===d.JSXSyntax.JSXOpeningElement){var i=r;if(i.selfClosing){var s=this.finalize(n,new l.JSXElement(i,[],null));e.children.push(s)}else t.push(e),e={node:n,opening:i,closing:null,children:[]}}if(r.type===d.JSXSyntax.JSXClosingElement){e.closing=r;var p=o(e.opening.name),c=o(e.closing.name);if(p!==c&&this.tolerateError("Expected corresponding JSX closing tag for %0",p),0<t.length){var s=this.finalize(e.node,new l.JSXElement(e.opening,e.children,e.closing));e=t[t.length-1],e.children.push(s),t.pop()}else break}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],r=null;if(!t.selfClosing){var o=this.parseComplexJSXElement({node:e,opening:t,closing:r,children:n});n=o.children,r=o.closing}return this.finalize(e,new l.JSXElement(t,n,r))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(c.Parser);t.JSXParser=m},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return 65536>e?n(e):n(55296+(e-65536>>10))+n(56320+(1023&e-65536))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||5760<=e&&0<=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||65<=e&&90>=e||97<=e&&122>=e||92===e||128<=e&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||65<=e&&90>=e||97<=e&&122>=e||48<=e&&57>=e||92===e||128<=e&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return 48<=e&&57>=e},isHexDigit:function(e){return 48<=e&&57>=e||65<=e&&70>=e||97<=e&&102>=e},isOctalDigit:function(e){return 48<=e&&55>=e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),o=function(){return function(e){this.type=r.JSXSyntax.JSXClosingElement,this.name=e}}();t.JSXClosingElement=o;var i=function(){return function(e,t,n){this.type=r.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n}}();t.JSXElement=i;var s=function(){return function(){this.type=r.JSXSyntax.JSXEmptyExpression}}();t.JSXEmptyExpression=s;var l=function(){return function(e){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=e}}();t.JSXExpressionContainer=l;var d=function(){return function(e){this.type=r.JSXSyntax.JSXIdentifier,this.name=e}}();t.JSXIdentifier=d;var p=function(){return function(e,t){this.type=r.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}}();t.JSXMemberExpression=p;var c=function(){return function(e,t){this.type=r.JSXSyntax.JSXAttribute,this.name=e,this.value=t}}();t.JSXAttribute=c;var u=function(){return function(e,t){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}}();t.JSXNamespacedName=u;var h=function(){return function(e,t,n){this.type=r.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n}}();t.JSXOpeningElement=h;var m=function(){return function(e){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=e}}();t.JSXSpreadAttribute=m;var g=function(){return function(e,t){this.type=r.JSXSyntax.JSXText,this.value=e,this.raw=t}}();t.JSXText=g},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=function(){return function(e){this.type=r.Syntax.ArrayExpression,this.elements=e}}();t.ArrayExpression=o;var i=function(){return function(e){this.type=r.Syntax.ArrayPattern,this.elements=e}}();t.ArrayPattern=i;var s=function(){return function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1}}();t.ArrowFunctionExpression=s;var l=function(){return function(e,t,n){this.type=r.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n}}();t.AssignmentExpression=l;var d=function(){return function(e,t){this.type=r.Syntax.AssignmentPattern,this.left=e,this.right=t}}();t.AssignmentPattern=d;var p=function(){return function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0}}();t.AsyncArrowFunctionExpression=p;var c=function(){return function(e,t,n){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0}}();t.AsyncFunctionDeclaration=c;var u=function(){return function(e,t,n){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0}}();t.AsyncFunctionExpression=u;var h=function(){return function(e){this.type=r.Syntax.AwaitExpression,this.argument=e}}();t.AwaitExpression=h;var m=function(){return function(e,t,n){this.type="||"===e||"&&"===e?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n}}();t.BinaryExpression=m;var g=function(){return function(e){this.type=r.Syntax.BlockStatement,this.body=e}}();t.BlockStatement=g;var f=function(){return function(e){this.type=r.Syntax.BreakStatement,this.label=e}}();t.BreakStatement=f;var y=function(){return function(e,t){this.type=r.Syntax.CallExpression,this.callee=e,this.arguments=t}}();t.CallExpression=y;var b=function(){return function(e,t){this.type=r.Syntax.CatchClause,this.param=e,this.body=t}}();t.CatchClause=b;var x=function(){return function(e){this.type=r.Syntax.ClassBody,this.body=e}}();t.ClassBody=x;var v=function(){return function(e,t,n){this.type=r.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n}}();t.ClassDeclaration=v;var k=function(){return function(e,t,n){this.type=r.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n}}();t.ClassExpression=k;var S=function(){return function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}}();t.ComputedMemberExpression=S;var w=function(){return function(e,t,n){this.type=r.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n}}();t.ConditionalExpression=w;var C=function(){return function(e){this.type=r.Syntax.ContinueStatement,this.label=e}}();t.ContinueStatement=C;var T=function(){return function(){this.type=r.Syntax.DebuggerStatement}}();t.DebuggerStatement=T;var _=function(){return function(e,t){this.type=r.Syntax.ExpressionStatement,this.expression=e,this.directive=t}}();t.Directive=_;var E=function(){return function(e,t){this.type=r.Syntax.DoWhileStatement,this.body=e,this.test=t}}();t.DoWhileStatement=E;var A=function(){return function(){this.type=r.Syntax.EmptyStatement}}();t.EmptyStatement=A;var I=function(){return function(e){this.type=r.Syntax.ExportAllDeclaration,this.source=e}}();t.ExportAllDeclaration=I;var N=function(){return function(e){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=e}}();t.ExportDefaultDeclaration=N;var L=function(){return function(e,t,n){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n}}();t.ExportNamedDeclaration=L;var O=function(){return function(e,t){this.type=r.Syntax.ExportSpecifier,this.exported=t,this.local=e}}();t.ExportSpecifier=O;var M=function(){return function(e){this.type=r.Syntax.ExpressionStatement,this.expression=e}}();t.ExpressionStatement=M;var D=function(){return function(e,t,n){this.type=r.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1}}();t.ForInStatement=D;var R=function(){return function(e,t,n){this.type=r.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n}}();t.ForOfStatement=R;var P=function(){return function(e,t,n,o){this.type=r.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=o}}();t.ForStatement=P;var B=function(){return function(e,t,n,o){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=o,this.expression=!1,this.async=!1}}();t.FunctionDeclaration=B;var F=function(){return function(e,t,n,o){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=o,this.expression=!1,this.async=!1}}();t.FunctionExpression=F;var U=function(){return function(e){this.type=r.Syntax.Identifier,this.name=e}}();t.Identifier=U;var z=function(){return function(e,t,n){this.type=r.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n}}();t.IfStatement=z;var j=function(){return function(e,t){this.type=r.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}}();t.ImportDeclaration=j;var q=function(){return function(e){this.type=r.Syntax.ImportDefaultSpecifier,this.local=e}}();t.ImportDefaultSpecifier=q;var V=function(){return function(e){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=e}}();t.ImportNamespaceSpecifier=V;var W=function(){return function(e,t){this.type=r.Syntax.ImportSpecifier,this.local=e,this.imported=t}}();t.ImportSpecifier=W;var H=function(){return function(e,t){this.type=r.Syntax.LabeledStatement,this.label=e,this.body=t}}();t.LabeledStatement=H;var K=function(){return function(e,t){this.type=r.Syntax.Literal,this.value=e,this.raw=t}}();t.Literal=K;var G=function(){return function(e,t){this.type=r.Syntax.MetaProperty,this.meta=e,this.property=t}}();t.MetaProperty=G;var X=function(){return function(e,t,n,o,i){this.type=r.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=o,this.static=i}}();t.MethodDefinition=X;var Q=function(){return function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="module"}}();t.Module=Q;var Y=function(){return function(e,t){this.type=r.Syntax.NewExpression,this.callee=e,this.arguments=t}}();t.NewExpression=Y;var J=function(){return function(e){this.type=r.Syntax.ObjectExpression,this.properties=e}}();t.ObjectExpression=J;var $=function(){return function(e){this.type=r.Syntax.ObjectPattern,this.properties=e}}();t.ObjectPattern=$;var Z=function(){return function(e,t,n,o,i,s){this.type=r.Syntax.Property,this.key=t,this.computed=n,this.value=o,this.kind=e,this.method=i,this.shorthand=s}}();t.Property=Z;var ee=function(){return function(e,t,n,o){this.type=r.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:o}}}();t.RegexLiteral=ee;var te=function(){return function(e){this.type=r.Syntax.RestElement,this.argument=e}}();t.RestElement=te;var ne=function(){return function(e){this.type=r.Syntax.ReturnStatement,this.argument=e}}();t.ReturnStatement=ne;var re=function(){return function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="script"}}();t.Script=re;var oe=function(){return function(e){this.type=r.Syntax.SequenceExpression,this.expressions=e}}();t.SequenceExpression=oe;var ae=function(){return function(e){this.type=r.Syntax.SpreadElement,this.argument=e}}();t.SpreadElement=ae;var ie=function(){return function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}}();t.StaticMemberExpression=ie;var se=function(){return function(){this.type=r.Syntax.Super}}();t.Super=se;var le=function(){return function(e,t){this.type=r.Syntax.SwitchCase,this.test=e,this.consequent=t}}();t.SwitchCase=le;var de=function(){return function(e,t){this.type=r.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}}();t.SwitchStatement=de;var pe=function(){return function(e,t){this.type=r.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}}();t.TaggedTemplateExpression=pe;var ce=function(){return function(e,t){this.type=r.Syntax.TemplateElement,this.value=e,this.tail=t}}();t.TemplateElement=ce;var ue=function(){return function(e,t){this.type=r.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}}();t.TemplateLiteral=ue;var he=function(){return function(){this.type=r.Syntax.ThisExpression}}();t.ThisExpression=he;var me=function(){return function(e){this.type=r.Syntax.ThrowStatement,this.argument=e}}();t.ThrowStatement=me;var ge=function(){return function(e,t,n){this.type=r.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n}}();t.TryStatement=ge;var fe=function(){return function(e,t){this.type=r.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}}();t.UnaryExpression=fe;var ye=function(){return function(e,t,n){this.type=r.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n}}();t.UpdateExpression=ye;var be=function(){return function(e,t){this.type=r.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}}();t.VariableDeclaration=be;var xe=function(){return function(e,t){this.type=r.Syntax.VariableDeclarator,this.id=e,this.init=t}}();t.VariableDeclarator=xe;var ve=function(){return function(e,t){this.type=r.Syntax.WhileStatement,this.test=e,this.body=t}}();t.WhileStatement=ve;var ke=function(){return function(e,t){this.type=r.Syntax.WithStatement,this.object=e,this.body=t}}();t.WithStatement=ke;var Se=function(){return function(e,t){this.type=r.Syntax.YieldExpression,this.argument=e,this.delegate=t}}();t.YieldExpression=Se},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),o=n(10),s=n(11),l=n(7),i=n(12),d=n(2),p=n(13),c="ArrowParameterPlaceHolder",u=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=t.source+""),this.delegate=n,this.errorHandler=new o.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new i.Scanner(e,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 e.prototype.throwError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=Array.prototype.slice.call(arguments,1),i=e.replace(/%(\d)/g,function(e,t){return r.assert(t<o.length,"Message reference must be in range"),o[t]}),s=this.lastMarker.index,l=this.lastMarker.line,d=this.lastMarker.column+1;throw this.errorHandler.createError(s,l,d,i)},e.prototype.tolerateError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=Array.prototype.slice.call(arguments,1),i=e.replace(/%(\d)/g,function(e,t){return r.assert(t<o.length,"Message reference must be in range"),o[t]}),s=this.lastMarker.index,l=this.scanner.lineNumber,d=this.lastMarker.column+1;this.errorHandler.tolerateError(s,l,d,i)},e.prototype.unexpectedTokenError=function(e,t){var n=t||s.Messages.UnexpectedToken,r;if(e?(!t&&(n=2===e.type?s.Messages.UnexpectedEOS:3===e.type?s.Messages.UnexpectedIdentifier:6===e.type?s.Messages.UnexpectedNumber:8===e.type?s.Messages.UnexpectedString:10===e.type?s.Messages.UnexpectedTemplate:s.Messages.UnexpectedToken,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?n=s.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(n=s.Messages.StrictReservedWord))),r=e.value):r="ILLEGAL",n=n.replace("%0",r),e&&"number"==typeof e.lineNumber){var o=e.start,i=e.lineNumber,l=this.lastMarker.index-this.lastMarker.column,d=e.start-l+1;return this.errorHandler.createError(o,i,d,n)}var o=this.lastMarker.index,i=this.lastMarker.line,d=this.lastMarker.column+1;return this.errorHandler.createError(o,i,d,n)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(!this.config.comment)this.scanner.scanComments();else{var t=this.scanner.scanComments();if(0<t.length&&this.delegate)for(var n=0;n<t.length;++n){var r=t[n],e=void 0;e={type:r.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(r.slice[0],r.slice[1])},this.config.range&&(e.range=r.range),this.config.loc&&(e.loc=r.loc);var o={start:{line:r.loc.start.line,column:r.loc.start.column,offset:r.range[0]},end:{line:r.loc.end.line,column:r.loc.end.column,offset:r.range[1]}};this.delegate(e,o)}}},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var n={type:p.TokenName[e.type],value:this.getTokenRaw(e)};if(this.config.range&&(n.range=[e.start,e.end]),this.config.loc&&(n.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type){var t=e.pattern,r=e.flags;n.regex={pattern:t,flags:r}}return n},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},e.prototype.startNode=function(e){return{index:e.start,line:e.lineNumber,column:e.start-e.lineStart}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var n={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,n)}return t},e.prototype.expect=function(e){var t=this.nextToken();(7!==t.type||t.value!==e)&&this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,s.Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();(4!==t.type||t.value!==e)&&this.throwUnexpectedToken(t)},e.prototype.match=function(e){return 7===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return 4===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return 3===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var o=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,o},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var o=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,o},e.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)},e.prototype.parsePrimaryExpression=function(){var e=this.createNode(),t,n,r;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(e,new l.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),r=this.getTokenRaw(n),t=this.finalize(e,new l.Literal(n.value,r));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),r=this.getTokenRaw(n),t=this.finalize(e,new l.Literal("true"===n.value,r));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),r=this.getTokenRaw(n),t=this.finalize(e,new l.Literal(null,r));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,n=this.nextRegexToken(),r=this.getTokenRaw(n),t=this.finalize(e,new l.RegexLiteral(n.regex,r,n.pattern,n.flags));break;default:t=this.throwUnexpectedToken(this.nextToken());}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?t=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?t=this.finalize(e,new l.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?t=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),t=this.finalize(e,new l.ThisExpression)):this.matchKeyword("class")?t=this.parseClassExpression():t=this.throwUnexpectedToken(this.nextToken()));break;default:t=this.throwUnexpectedToken(this.nextToken());}return t},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new l.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new l.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!1;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,n.params,r,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var r=this.parseFormalParameters(),o=this.parsePropertyMethod(r);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new l.AsyncFunctionExpression(null,r.params,o))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),n;switch(t.type){case 8:case 6:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,s.Messages.StrictOctalLiteral);var r=this.getTokenRaw(t);n=this.finalize(e,new l.Literal(t.value,r));break;case 3:case 1:case 5:case 4:n=this.finalize(e,new l.Identifier(t.value));break;case 7:"["===t.value?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):n=this.throwUnexpectedToken(t);break;default:n=this.throwUnexpectedToken(t);}return n},e.prototype.isPropertyKey=function(e,t){return e.type===d.Syntax.Identifier&&e.name===t||e.type===d.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t=this.createNode(),n=this.lookahead,r=null,o=null,i=!1,d=!1,p=!1,c=!1,u;if(3===n.type){var h=n.value;this.nextToken(),i=this.match("["),c=!this.hasLineTerminator&&"async"===h&&!this.match(":")&&!this.match("(")&&!this.match("*"),r=c?this.parseObjectPropertyKey():this.finalize(t,new l.Identifier(h))}else this.match("*")?this.nextToken():(i=this.match("["),r=this.parseObjectPropertyKey());var m=this.qualifiedPropertyName(this.lookahead);if(3===n.type&&!c&&"get"===n.value&&m)u="get",i=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,o=this.parseGetterMethod();else if(3===n.type&&!c&&"set"===n.value&&m)u="set",i=this.match("["),r=this.parseObjectPropertyKey(),o=this.parseSetterMethod();else if(7===n.type&&"*"===n.value&&m)u="init",i=this.match("["),r=this.parseObjectPropertyKey(),o=this.parseGeneratorMethod(),d=!0;else if(r||this.throwUnexpectedToken(this.lookahead),u="init",this.match(":")&&!c)!i&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(s.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),o=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))o=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),d=!0;else if(3===n.type){var h=this.finalize(t,new l.Identifier(n.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),p=!0;var g=this.isolateCoverGrammar(this.parseAssignmentExpression);o=this.finalize(t,new l.AssignmentPattern(h,g))}else p=!0,o=h}else this.throwUnexpectedToken(this.nextToken());return this.finalize(t,new l.Property(u,r,i,o,d,p))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new l.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,o=t.cooked;return this.finalize(e,new l.TemplateElement({raw:n,cooked:o},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new l.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],r=this.parseTemplateHead();for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize(e,new l.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case d.Syntax.Identifier:case d.Syntax.MemberExpression:case d.Syntax.RestElement:case d.Syntax.AssignmentPattern:break;case d.Syntax.SpreadElement:e.type=d.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case d.Syntax.ArrayExpression:e.type=d.Syntax.ArrayPattern;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case d.Syntax.ObjectExpression:e.type=d.Syntax.ObjectPattern;for(var t=0;t<e.properties.length;t++)this.reinterpretExpressionAsPattern(e.properties[t].value);break;case d.Syntax.AssignmentExpression:e.type=d.Syntax.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left);break;default:}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:c,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:c,params:[e],async:!1};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var o=[];for(this.context.isAssignmentTarget=!1,o.push(e);2!==this.lookahead.type&&!!this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var s=0;s<o.length;s++)this.reinterpretExpressionAsPattern(o[s]);r=!0,e={type:c,params:o,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),o.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var s=0;s<o.length;s++)this.reinterpretExpressionAsPattern(o[s]);r=!0,e={type:c,params:o,async:!1}}else o.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(r)break}r||(e=this.finalize(this.startNode(t),new l.SequenceExpression(o)))}if(!r){if(this.expect(")"),this.match("=>")&&(e.type===d.Syntax.Identifier&&"yield"===e.name&&(r=!0,e={type:c,params:[e],async:!1}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===d.Syntax.SequenceExpression)for(var s=0;s<e.expressions.length;s++)this.reinterpretExpressionAsPattern(e.expressions[s]);else this.reinterpretExpressionAsPattern(e);var i=e.type===d.Syntax.SequenceExpression?e.expressions:[e];e={type:c,params:i,async:!1}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return 3===e.type||4===e.type||1===e.type||5===e.type},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new l.Identifier(t.value))},e.prototype.parseNewExpression=function(){var e=this.createNode(),t=this.parseIdentifierName();r.assert("new"===t.name,"New expression must start with `new`");var n;if(!this.match(".")){var o=this.isolateCoverGrammar(this.parseLeftHandSideExpression),i=this.match("(")?this.parseArguments():[];n=new l.NewExpression(o,i),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var s=this.parseIdentifierName();n=new l.MetaProperty(t,s)}else this.throwUnexpectedToken(this.lookahead);return this.finalize(e,n)},e.prototype.parseAsyncArgument=function(){var e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e},e.prototype.parseAsyncArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e=this.lookahead,t=this.matchContextualKeyword("async"),n=this.context.allowIn;this.context.allowIn=!0;var r;for(this.matchKeyword("super")&&this.context.inFunctionBody?(r=this.createNode(),this.nextToken(),r=this.finalize(r,new l.Super),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):r=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var o=this.parseIdentifierName();r=this.finalize(this.startNode(e),new l.StaticMemberExpression(r,o))}else if(this.match("(")){var s=t&&e.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var d=s?this.parseAsyncArguments():this.parseArguments();if(r=this.finalize(this.startNode(e),new l.CallExpression(r,d)),s&&this.match("=>")){for(var p=0;p<d.length;++p)this.reinterpretExpressionAsPattern(d[p]);r={type:c,params:d,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var o=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),r=this.finalize(this.startNode(e),new l.ComputedMemberExpression(r,o))}else if(10===this.lookahead.type&&this.lookahead.head){var i=this.parseTemplateLiteral();r=this.finalize(this.startNode(e),new l.TaggedTemplateExpression(r,i))}else break;return this.context.allowIn=n,r},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new l.Super)},e.prototype.parseLeftHandSideExpression=function(){r.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new l.ComputedMemberExpression(t,n))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var n=this.parseIdentifierName();t=this.finalize(e,new l.StaticMemberExpression(t,n))}else if(10===this.lookahead.type&&this.lookahead.head){var o=this.parseTemplateLiteral();t=this.finalize(e,new l.TaggedTemplateExpression(t,o))}else break;return t},e.prototype.parseUpdateExpression=function(){var e=this.lookahead,t;if(this.match("++")||this.match("--")){var n=this.startNode(e),r=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&t.type===d.Syntax.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(s.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment);var o=!0;t=this.finalize(n,new l.UpdateExpression(r.value,t,o)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(t=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&t.type===d.Syntax.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(s.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=this.nextToken().value,o=!1;t=this.finalize(this.startNode(e),new l.UpdateExpression(i,t,o))}return t},e.prototype.parseAwaitExpression=function(){var e=this.createNode();this.nextToken();var t=this.parseUnaryExpression();return this.finalize(e,new l.AwaitExpression(t))},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new l.UnaryExpression(n.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===d.Syntax.Identifier&&this.tolerateError(s.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(t.type!==d.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=t,r=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new l.BinaryExpression("**",n,r))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value,n;return n=7===e.type?this.operatorPrecedence[t]||0:4===e.type?"instanceof"===t||this.context.allowIn&&"in"===t?7:0:0,n},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),n=this.lookahead,r=this.binaryPrecedence(n);if(0<r){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var o=[e,this.lookahead],s=t,d=this.isolateCoverGrammar(this.parseExponentiationExpression),p=[s,n.value,d],c=[r];r=this.binaryPrecedence(this.lookahead),!(0>=r);){for(;2<p.length&&r<=c[c.length-1];){d=p.pop();var u=p.pop();c.pop(),s=p.pop(),o.pop();var h=this.startNode(o[o.length-1]);p.push(this.finalize(h,new l.BinaryExpression(u,s,d)))}p.push(this.nextToken().value),c.push(r),o.push(this.lookahead),p.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var m=p.length-1;for(t=p[m],o.pop();1<m;){var h=this.startNode(o.pop()),u=p[m-1];t=this.finalize(h,new l.BinaryExpression(u,p[m-2],t)),m-=2}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var o=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new l.ConditionalExpression(t,r,o)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case d.Syntax.Identifier:this.validateParam(e,t,t.name);break;case d.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case d.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case d.Syntax.ArrayPattern:for(var n=0;n<t.elements.length;n++)null!==t.elements[n]&&this.checkPatternParam(e,t.elements[n]);break;case d.Syntax.ObjectPattern:for(var n=0;n<t.properties.length;n++)this.checkPatternParam(e,t.properties[n].value);break;default:}e.simple=e.simple&&t instanceof l.Identifier},e.prototype.reinterpretAsCoverFormalsList=function(e){var t=[e],n=!1,r;switch(e.type){case d.Syntax.Identifier:break;case c:t=e.params,n=e.async;break;default:return null;}r={simple:!0,paramSet:{}};for(var o=0,i;o<t.length;++o)i=t[o],i.type===d.Syntax.AssignmentPattern?i.right.type===d.Syntax.YieldExpression&&(i.right.argument&&this.throwUnexpectedToken(this.lookahead),i.right.type=d.Syntax.Identifier,i.right.name="yield",delete i.right.argument,delete i.right.delegate):n&&i.type===d.Syntax.Identifier&&"await"===i.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(r,i),t[o]=i;if(this.context.strict||!this.context.allowYield)for(var o=0,i;o<t.length;++o)i=t[o],i.type===d.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead);if(r.message===s.Messages.StrictParamDupe){var l=this.context.strict?r.stricted:r.firstRestricted;this.throwUnexpectedToken(l,r.message)}return{simple:r.simple,params:t,stricted:r.stricted,firstRestricted:r.firstRestricted,message:r.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,n=t;if(e=this.parseConditionalExpression(),3===n.type&&n.lineNumber===this.lookahead.lineNumber&&"async"===n.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var r=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(r),e={type:c,params:[r],async:!0}}if(e.type===c||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var o=e.async,i=this.reinterpretAsCoverFormalsList(e);if(i){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var p=this.context.strict,u=this.context.allowStrictDirective;this.context.allowStrictDirective=i.simple;var h=this.context.allowYield,m=this.context.await;this.context.allowYield=!0,this.context.await=o;var g=this.startNode(t);this.expect("=>");var f;if(this.match("{")){var y=this.context.allowIn;this.context.allowIn=!0,f=this.parseFunctionSourceElements(),this.context.allowIn=y}else f=this.isolateCoverGrammar(this.parseAssignmentExpression);var b=f.type!==d.Syntax.BlockStatement;this.context.strict&&i.firstRestricted&&this.throwUnexpectedToken(i.firstRestricted,i.message),this.context.strict&&i.stricted&&this.tolerateUnexpectedToken(i.stricted,i.message),e=o?this.finalize(g,new l.AsyncArrowFunctionExpression(i.params,f,b)):this.finalize(g,new l.ArrowFunctionExpression(i.params,f,b)),this.context.strict=p,this.context.allowStrictDirective=u,this.context.allowYield=h,this.context.await=m}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===d.Syntax.Identifier){var x=e;this.scanner.isRestrictedWord(x.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(x.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),n=this.nextToken();var v=n.value,k=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new l.AssignmentExpression(v,e,k)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){for(var n=[t];2!==this.lookahead.type&&!!this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new l.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;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,s.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement();}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new l.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),r=this.parsePattern([],e);this.context.strict&&r.type===d.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(s.Messages.StrictVarName);var o=null;return"const"===e?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),o=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(s.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&r.type!==d.Syntax.Identifier||this.match("="))&&(this.expect("="),o=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new l.VariableDeclarator(r,o))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;r.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var o=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new l.VariableDeclaration(o,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e,t);return this.finalize(n,new l.RestElement(r))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var r=[];!this.match("]");)if(this.match(","))this.nextToken(),r.push(null);else{if(this.match("...")){r.push(this.parseBindingRestElement(e,t));break}else r.push(this.parsePatternWithDefault(e,t));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new l.ArrayPattern(r))},e.prototype.parsePropertyPattern=function(e,t){var n=this.createNode(),r=!1,o=!1,i,s;if(3===this.lookahead.type){var d=this.lookahead;i=this.parseVariableIdentifier();var p=this.finalize(n,new l.Identifier(d.value));if(this.match("=")){e.push(d),o=!0,this.nextToken();var c=this.parseAssignmentExpression();s=this.finalize(this.startNode(d),new l.AssignmentPattern(p,c))}else this.match(":")?(this.expect(":"),s=this.parsePatternWithDefault(e,t)):(e.push(d),o=!0,s=p)}else r=this.match("["),i=this.parseObjectPropertyKey(),this.expect(":"),s=this.parsePatternWithDefault(e,t);return this.finalize(n,new l.Property("init",i,r,s,!1,o))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),r=[];for(this.expect("{");!this.match("}");)r.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new l.ObjectPattern(r))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(this.matchKeyword("let")&&("const"===t||"let"===t)&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,r=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var o=this.context.allowYield;this.context.allowYield=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=o,r=this.finalize(this.startNode(n),new l.AssignmentPattern(r,i))}return r},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):!this.context.allowYield&&this.throwUnexpectedToken(n):3===n.type?(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n):this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n),this.finalize(t,new l.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===d.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictVarName);var r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type!==d.Syntax.Identifier&&!e.inFor&&this.expect("="),this.finalize(t,new l.VariableDeclarator(n,r))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new l.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new l.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(s.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e=this.createNode(),t=null,n;this.expectKeyword("if"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),n=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),t=this.parseIfClause())),this.finalize(e,new l.IfStatement(r,n,t))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new l.DoWhileStatement(n,r))},e.prototype.parseWhileStatement=function(){var e=this.createNode(),t;this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=r}return this.finalize(e,new l.WhileStatement(n,t))},e.prototype.parseForStatement=function(){var e=null,t=null,n=null,r=!0,o=this.createNode(),i,p;if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){e=this.createNode(),this.nextToken();var c=this.context.allowIn;this.context.allowIn=!1;var u=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=c,1===u.length&&this.matchKeyword("in")){var h=u[0];h.init&&(h.id.type===d.Syntax.ArrayPattern||h.id.type===d.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(s.Messages.ForInOfLoopInitializer,"for-in"),e=this.finalize(e,new l.VariableDeclaration(u,"var")),this.nextToken(),i=e,p=this.parseExpression(),e=null}else 1===u.length&&null===u[0].init&&this.matchContextualKeyword("of")?(e=this.finalize(e,new l.VariableDeclaration(u,"var")),this.nextToken(),i=e,p=this.parseAssignmentExpression(),e=null,r=!1):(e=this.finalize(e,new l.VariableDeclaration(u,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){e=this.createNode();var m=this.nextToken().value;if(!this.context.strict&&"in"===this.lookahead.value)e=this.finalize(e,new l.Identifier(m)),this.nextToken(),i=e,p=this.parseExpression(),e=null;else{var c=this.context.allowIn;this.context.allowIn=!1;var u=this.parseBindingList(m,{inFor:!0});this.context.allowIn=c,1===u.length&&null===u[0].init&&this.matchKeyword("in")?(e=this.finalize(e,new l.VariableDeclaration(u,m)),this.nextToken(),i=e,p=this.parseExpression(),e=null):1===u.length&&null===u[0].init&&this.matchContextualKeyword("of")?(e=this.finalize(e,new l.VariableDeclaration(u,m)),this.nextToken(),i=e,p=this.parseAssignmentExpression(),e=null,r=!1):(this.consumeSemicolon(),e=this.finalize(e,new l.VariableDeclaration(u,m)))}}else{var g=this.lookahead,c=this.context.allowIn;if(this.context.allowIn=!1,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=c,this.matchKeyword("in"))this.context.isAssignmentTarget&&e.type!==d.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(e),i=e,p=this.parseExpression(),e=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&e.type!==d.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(e),i=e,p=this.parseAssignmentExpression(),e=null,r=!1;else{if(this.match(",")){for(var f=[e];this.match(",");)this.nextToken(),f.push(this.isolateCoverGrammar(this.parseAssignmentExpression));e=this.finalize(this.startNode(g),new l.SequenceExpression(f))}this.expect(";")}}"undefined"==typeof i&&(!this.match(";")&&(t=this.parseExpression()),this.expect(";"),!this.match(")")&&(n=this.parseExpression()));var y;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),y=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var b=this.context.inIteration;this.context.inIteration=!0,y=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=b}return"undefined"==typeof i?this.finalize(o,new l.ForStatement(e,t,n,y)):r?this.finalize(o,new l.ForInStatement(i,p,y)):this.finalize(o,new l.ForOfStatement(i,p,y))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(s.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(s.Messages.IllegalContinue),this.finalize(e,new l.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(s.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(s.Messages.IllegalBreak),this.finalize(e,new l.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(s.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&2!==this.lookahead.type,n=t?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(e,new l.ReturnStatement(n))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(s.Messages.StrictModeWith);var e=this.createNode(),t;this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new l.WithStatement(n,t))},e.prototype.parseSwitchCase=function(){var e=this.createNode(),t;this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(e,new l.SwitchCase(t,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var r=[],o=!1;for(this.expect("{");!this.match("}");){var i=this.parseSwitchCase();null===i.test&&(o&&this.throwError(s.Messages.MultipleDefaultsInSwitch),o=!0),r.push(i)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new l.SwitchStatement(t,r))},e.prototype.parseLabelledStatement=function(){var e=this.createNode(),t=this.parseExpression(),n;if(t.type===d.Syntax.Identifier&&this.match(":")){this.nextToken();var r=t,o="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,o)&&this.throwError(s.Messages.Redeclaration,"Label",r.name),this.context.labelSet[o]=!0;var i;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),i=this.parseClassDeclaration();else if(this.matchKeyword("function")){var p=this.lookahead,c=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(p,s.Messages.StrictFunction):c.generator&&this.tolerateUnexpectedToken(p,s.Messages.GeneratorInLegacyContext),i=c}else i=this.parseStatement();delete this.context.labelSet[o],n=new l.LabeledStatement(r,i)}else this.consumeSemicolon(),n=new l.ExpressionStatement(t);return this.finalize(e,n)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(s.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),r={},o=0,i;o<t.length;o++)i="$"+t[o].value,Object.prototype.hasOwnProperty.call(r,i)&&this.tolerateError(s.Messages.DuplicateBinding,t[o].value),r[i]=!0;this.context.strict&&n.type===d.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictCatchVariable),this.expect(")");var p=this.parseBlock();return this.finalize(e,new l.CatchClause(n,p))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,r=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||r||this.throwError(s.Messages.NoCatchOrFinally),this.finalize(e,new l.TryStatement(t,n,r))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new l.DebuggerStatement)},e.prototype.parseStatement=function(){var e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement();}break;default:e=this.throwUnexpectedToken(this.lookahead);}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),n=this.context.labelSet,r=this.context.inIteration,o=this.context.inSwitch,i=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=r,this.context.inSwitch=o,this.context.inFunctionBody=i,this.finalize(e,new l.BlockStatement(t))},e.prototype.validateParam=function(e,t,n){var r="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(e.stricted=t,e.message=s.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,r)&&(e.stricted=t,e.message=s.Messages.StrictParamDupe)):!e.firstRestricted&&(this.scanner.isRestrictedWord(n)?(e.firstRestricted=t,e.message=s.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(e.firstRestricted=t,e.message=s.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,r)&&(e.stricted=t,e.message=s.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,r,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[r]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var n=this.parsePattern(e);return this.match("=")&&this.throwError(s.Messages.DefaultRestParameter),this.match(")")||this.throwError(s.Messages.ParameterAfterRestParameter),this.finalize(t,new l.RestElement(n))},e.prototype.parseFormalParameter=function(e){for(var t=[],n=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),r=0;r<t.length;r++)this.validateParam(e,t[r],t[r].value);e.simple=e.simple&&n instanceof l.Identifier,e.params.push(n)},e.prototype.parseFormalParameters=function(e){var t;if(t={simple:!0,params:[],firstRestricted:e},this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.matchAsyncFunction=function(){var e=this.matchContextualKeyword("async");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===n.lineNumber&&4===n.type&&"function"===n.value}return e},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var r=!n&&this.match("*");r&&this.nextToken();var o=null,i=null,d;if(!e||!this.match("(")){var p=this.lookahead;o=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(p.value)&&this.tolerateUnexpectedToken(p,s.Messages.StrictFunctionName):this.scanner.isRestrictedWord(p.value)?(i=p,d=s.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(p.value)&&(i=p,d=s.Messages.StrictReservedWord)}var c=this.context.await,u=this.context.allowYield;this.context.await=n,this.context.allowYield=!r;var h=this.parseFormalParameters(i),m=h.params,g=h.stricted;i=h.firstRestricted,h.message&&(d=h.message);var f=this.context.strict,y=this.context.allowStrictDirective;this.context.allowStrictDirective=h.simple;var b=this.parseFunctionSourceElements();return this.context.strict&&i&&this.throwUnexpectedToken(i,d),this.context.strict&&g&&this.tolerateUnexpectedToken(g,d),this.context.strict=f,this.context.allowStrictDirective=y,this.context.await=c,this.context.allowYield=u,n?this.finalize(t,new l.AsyncFunctionDeclaration(o,m,b)):this.finalize(t,new l.FunctionDeclaration(o,m,b,r))},e.prototype.parseFunctionExpression=function(){var e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");var n=!t&&this.match("*");n&&this.nextToken();var r=null,o=this.context.await,i=this.context.allowYield,d,p;if(this.context.await=t,this.context.allowYield=!n,!this.match("(")){var c=this.lookahead;r=this.context.strict||n||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(c.value)&&this.tolerateUnexpectedToken(c,s.Messages.StrictFunctionName):this.scanner.isRestrictedWord(c.value)?(p=c,d=s.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(c.value)&&(p=c,d=s.Messages.StrictReservedWord)}var u=this.parseFormalParameters(p),h=u.params,m=u.stricted;p=u.firstRestricted,u.message&&(d=u.message);var g=this.context.strict,f=this.context.allowStrictDirective;this.context.allowStrictDirective=u.simple;var y=this.parseFunctionSourceElements();return this.context.strict&&p&&this.throwUnexpectedToken(p,d),this.context.strict&&m&&this.tolerateUnexpectedToken(m,d),this.context.strict=g,this.context.allowStrictDirective=f,this.context.await=o,this.context.allowYield=i,t?this.finalize(e,new l.AsyncFunctionExpression(r,h,y)):this.finalize(e,new l.FunctionExpression(r,h,y,n))},e.prototype.parseDirective=function(){var e=this.lookahead,t=this.createNode(),n=this.parseExpression(),r=n.type===d.Syntax.Literal?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,r?new l.Directive(n,r):new l.ExpressionStatement(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[],n,r;n=this.lookahead,8===n.type;){r=this.parseDirective(),t.push(r);var o=r.directive;if("string"!=typeof o)break;"use strict"===o?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,s.Messages.StrictOctalLiteral),!this.context.allowStrictDirective&&this.tolerateUnexpectedToken(n,s.Messages.IllegalLanguageModeDirective)):!e&&n.octal&&(e=n)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value;default:}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!1;var n=this.parseFormalParameters();0<n.params.length&&this.tolerateError(s.Messages.BadGetterArity);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,n.params,r,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!1;var n=this.parseFormalParameters();1===n.params.length?n.params[0]instanceof l.RestElement&&this.tolerateError(s.Messages.BadSetterRestParameter):this.tolerateError(s.Messages.BadSetterArity);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,n.params,r,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,n.params,r,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t;break;default:}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=!1,n=this.match("*"),n?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=r}return this.finalize(e,new l.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),r="",o=null,i=null,d=!1,p=!1,c=!1,u=!1;if(this.match("*"))this.nextToken();else{d=this.match("["),o=this.parseObjectPropertyKey();var h=o;if("static"===h.name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,c=!0,d=this.match("["),this.match("*")?this.nextToken():o=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var m=this.lookahead.value;":"!==m&&"("!==m&&"*"!==m&&(u=!0,t=this.lookahead,o=this.parseObjectPropertyKey(),3===t.type&&("get"===t.value||"set"===t.value?this.tolerateUnexpectedToken(t):"constructor"===t.value&&this.tolerateUnexpectedToken(t,s.Messages.ConstructorIsAsync)))}}var g=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&g?(r="get",d=this.match("["),o=this.parseObjectPropertyKey(),this.context.allowYield=!1,i=this.parseGetterMethod()):"set"===t.value&&g&&(r="set",d=this.match("["),o=this.parseObjectPropertyKey(),i=this.parseSetterMethod()):7===t.type&&"*"===t.value&&g&&(r="init",d=this.match("["),o=this.parseObjectPropertyKey(),i=this.parseGeneratorMethod(),p=!0),!r&&o&&this.match("(")&&(r="init",i=u?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),p=!0),r||this.throwUnexpectedToken(this.lookahead),"init"==r&&(r="method"),d||(c&&this.isPropertyKey(o,"prototype")&&this.throwUnexpectedToken(t,s.Messages.StaticPrototype),!c&&this.isPropertyKey(o,"constructor")&&(("method"!=r||!p||i&&i.generator)&&this.throwUnexpectedToken(t,s.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,s.Messages.DuplicateConstructor):e.value=!0,r="constructor")),this.finalize(n,new l.MethodDefinition(o,d,i,r,c))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new l.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),o=null;this.matchKeyword("extends")&&(this.nextToken(),o=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=n,this.finalize(t,new l.ClassDeclaration(r,o,i))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=t,this.finalize(e,new l.ClassExpression(n,r,o))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new l.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new l.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(s.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new l.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e=this.createNode(),t,n;return 3===this.lookahead.type?(t=this.parseVariableIdentifier(),n=t,this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseVariableIdentifier())):(t=this.parseIdentifierName(),n=t,this.matchContextualKeyword("as")?(this.nextToken(),n=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(e,new l.ImportSpecifier(n,t))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new l.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(s.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new l.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalImportDeclaration);var e=this.createNode();this.expectKeyword("import");var t=[],n;if(8===this.lookahead.type)n=this.parseModuleSpecifier();else{if(this.match("{")?t=t.concat(this.parseNamedImports()):this.match("*")?t.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(t.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?t.push(this.parseImportNamespaceSpecifier()):this.match("{")?t=t.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var r=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken(),n=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(e,new l.ImportDeclaration(t,n))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new l.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalExportDeclaration);var e=this.createNode();this.expectKeyword("export");var t;if(this.matchKeyword("default")){if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);t=this.finalize(e,new l.ExportDefaultDeclaration(n))}else if(this.matchKeyword("class")){var n=this.parseClassDeclaration(!0);t=this.finalize(e,new l.ExportDefaultDeclaration(n))}else if(this.matchContextualKeyword("async")){var n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();t=this.finalize(e,new l.ExportDefaultDeclaration(n))}else{this.matchContextualKeyword("from")&&this.throwError(s.Messages.UnexpectedToken,this.lookahead.value);var n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),t=this.finalize(e,new l.ExportDefaultDeclaration(n))}}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var r=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();var o=this.parseModuleSpecifier();this.consumeSemicolon(),t=this.finalize(e,new l.ExportAllDeclaration(o))}else if(4===this.lookahead.type){var n=void 0;switch(this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead);}t=this.finalize(e,new l.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction()){var n=this.parseFunctionDeclaration();t=this.finalize(e,new l.ExportNamedDeclaration(n,[],null))}else{var i=[],d=null,p=!1;for(this.expect("{");!this.match("}");)p=p||this.matchKeyword("default"),i.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),d=this.parseModuleSpecifier(),this.consumeSemicolon();else if(p){var r=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}else this.consumeSemicolon();t=this.finalize(e,new l.ExportNamedDeclaration(null,i,d))}return t},e}();t.Parser=u},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(this.tolerant)this.recordError(e);else throw e},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,r){var o=this.constructError("Line "+t+": "+r,n);return o.index=e,o.lineNumber=t,o.description=r,o},e.prototype.throwError=function(e,t,n,r){throw this.createError(e,t,n,r)},e.prototype.tolerateError=function(e,t,n,r){var o=this.createError(e,t,n,r);if(this.tolerant)this.recordError(o);else throw o},e}();t.ErrorHandler=n},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){function o(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function i(e){return"01234567".indexOf(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(9),l=r(4),d=r(11),p=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.length=e.length,this.index=0,this.lineNumber=0<e.length?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=d.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=d.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t=[],n,r;for(this.trackComment&&(t=[],n=this.index-e,r={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(++this.index,l.Character.isLineTerminator(o)){if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart-1};var i={multiLine:!1,slice:[n+e,this.index-1],range:[n,this.index-1],loc:r};t.push(i)}return 13===o&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!1,slice:[n+e,this.index],range:[n,this.index],loc:r};t.push(i)}return t},e.prototype.skipMultiLineComment=function(){var e=[],t,n;for(this.trackComment&&(e=[],t=this.index-2,n={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(l.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:n};e.push(o)}return e}++this.index}else++this.index}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:n};e.push(o)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index,n;!this.eof();)if(n=this.source.charCodeAt(this.index),l.Character.isWhiteSpace(n))++this.index;else if(l.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n){if(n=this.source.charCodeAt(this.index+1),47===n){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else if(42===n){this.index+=2;var r=this.skipMultiLineComment();this.trackComment&&(e=e.concat(r))}else break;}else if(t&&45===n){if(45===this.source.charCodeAt(this.index+1)&&62===this.source.charCodeAt(this.index+2)){this.index+=3;var r=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(r))}else break;}else if(60!==n)break;else if("!--"===this.source.slice(this.index+1,this.index+4)){this.index+=4;var r=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(r))}else break;return e},e.prototype.isFutureReservedWord=function(e){return"enum"===e||"export"===e||"import"===e||"super"===e},e.prototype.isStrictModeReservedWord=function(e){return"implements"===e||"interface"===e||"package"===e||"private"===e||"protected"===e||"public"===e||"static"===e||"yield"===e||"let"===e},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1;}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(55296<=t&&56319>=t){var n=this.source.charCodeAt(e+1);if(56320<=n&&57343>=n){var r=t;t=1024*(r-55296)+n-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,r=0,s=0;s<t;++s)if(!this.eof()&&l.Character.isHexDigit(this.source.charCodeAt(this.index)))r=16*r+o(this.source[this.index++]);else return null;return n(r)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],!!l.Character.isHexDigit(e.charCodeAt(0)));)t=16*t+o(e);return(1114111<t||"}"!==e)&&this.throwUnexpectedToken(),l.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++,t;!this.eof();){if(t=this.source.charCodeAt(this.index),92===t)return this.index=e,this.getComplexIdentifier();if(55296<=t&&57343>t)return this.index=e,this.getComplexIdentifier();if(l.Character.isIdentifierPart(t))++this.index;else break}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=l.Character.fromCodePoint(e);this.index+=t.length;var n;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),(null===n||"\\"===n||!l.Character.isIdentifierStart(n.charCodeAt(0)))&&this.throwUnexpectedToken()),t=n);!this.eof()&&(e=this.codePointAt(this.index),!!l.Character.isIdentifierPart(e));)n=l.Character.fromCodePoint(e),t+=n,this.index+=n.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),(null===n||"\\"===n||!l.Character.isIdentifierPart(n.charCodeAt(0)))&&this.throwUnexpectedToken()),t+=n);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=i(e);return!this.eof()&&l.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+i(this.source[this.index++]),0<="0123".indexOf(e)&&!this.eof()&&l.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+i(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e=this.index,t=92===this.source.charCodeAt(e)?this.getComplexIdentifier():this.getIdentifier(),n;if(n=1===t.length?3:this.isKeyword(t)?4:"null"===t?5:"true"===t||"false"===t?1:3,3!==n&&e+t.length!==this.index){var r=this.index;this.index=e,this.tolerateUnexpectedToken(d.Messages.InvalidEscapedReservedWord),this.index=r}return{type:n,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];return"("===t||"{"===t?("{"===t&&this.curlyStack.push("{"),++this.index):"."===t?(++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...")):"}"===t?(++this.index,this.curlyStack.pop()):")"===t||";"===t||","===t||"["===t||"]"===t||":"===t||"?"===t||"~"===t?++this.index:(t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],0<="<>=!+-*%&|^/".indexOf(t)&&++this.index)))),this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&!!l.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),l.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t="",n;!this.eof()&&(n=this.source[this.index],"0"===n||"1"===n);)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),this.eof()||(n=this.source.charCodeAt(this.index),(l.Character.isIdentifierStart(n)||l.Character.isDecimalDigit(n))&&this.throwUnexpectedToken()),{type:6,value:parseInt(t,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(l.Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&!!l.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(l.Character.isIdentifierStart(this.source.charCodeAt(this.index))||l.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1,t;e<this.length;++e){if(t=this.source[e],"8"===t||"9"===t)return!1;if(!l.Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];s.assert(l.Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var n="";if("."!==t){if(n=this.source[this.index++],t=this.source[this.index],"0"===n){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&l.Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;l.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(n+=this.source[this.index++];l.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(n+=this.source[this.index++],t=this.source[this.index],("+"===t||"-"===t)&&(n+=this.source[this.index++]),l.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;l.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return l.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];s.assert("'"===t||"\""===t,"String literal must starts with a quote"),++this.index;for(var r=!1,o="",i;!this.eof();)if(i=this.source[this.index++],i===t){t="";break}else if("\\"===i){if(i=this.source[this.index++],!i||!l.Character.isLineTerminator(i.charCodeAt(0)))switch(i){case"u":if("{"===this.source[this.index])++this.index,o+=this.scanUnicodeCodePointEscape();else{var p=this.scanHexEscape(i);null===p&&this.throwUnexpectedToken(),o+=p}break;case"x":var c=this.scanHexEscape(i);null===c&&this.throwUnexpectedToken(d.Messages.InvalidHexEscapeSequence),o+=c;break;case"n":o+="\n";break;case"r":o+="\r";break;case"t":o+="\t";break;case"b":o+="\b";break;case"f":o+="\f";break;case"v":o+="\x0B";break;case"8":case"9":o+=i,this.tolerateUnexpectedToken();break;default:if(i&&l.Character.isOctalDigit(i.charCodeAt(0))){var u=this.octalToDecimal(i);r=u.octal||r,o+=n(u.code)}else o+=i;}else++this.lineNumber,"\r"===i&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;}else if(l.Character.isLineTerminator(i.charCodeAt(0)))break;else o+=i;return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:o,octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,n=this.index,r="`"===this.source[n],o=!1,i=2;for(++this.index;!this.eof();){var s=this.source[this.index++];if("`"===s){i=1,o=!0,t=!0;break}else if("$"===s){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=s}else if("\\"!==s)l.Character.isLineTerminator(s.charCodeAt(0))?(++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=s;else if(s=this.source[this.index++],!l.Character.isLineTerminator(s.charCodeAt(0)))switch(s){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{var p=this.index,c=this.scanHexEscape(s);null===c?(this.index=p,e+=s):e+=c}break;case"x":var u=this.scanHexEscape(s);null===u&&this.throwUnexpectedToken(d.Messages.InvalidHexEscapeSequence),e+=u;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\x0B";break;default:"0"===s?(l.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(d.Messages.TemplateOctalLiteral),e+="\0"):l.Character.isOctalDigit(s.charCodeAt(0))?this.throwUnexpectedToken(d.Messages.TemplateOctalLiteral):e+=s;}else++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index}return t||this.throwUnexpectedToken(),r||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-i),cooked:e,head:r,tail:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},e.prototype.testRegExp=function(e,t){var r="\uFFFF",o=e,i=this;0<=t.indexOf("u")&&(o=o.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,o){var s=parseInt(t||o,16);return 1114111<s&&i.throwUnexpectedToken(d.Messages.InvalidRegExp),65535>=s?n(s):r}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r));try{RegExp(o)}catch(t){this.throwUnexpectedToken(d.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];s.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,r=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],l.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(d.Messages.UnterminatedRegExp),t+=e;else if(l.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(d.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else if("/"===e){r=!0;break}else"["===e&&(n=!0);return r||this.throwUnexpectedToken(d.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="",t="",n;!this.eof()&&(n=this.source[this.index],!!l.Character.isIdentifierPart(n.charCodeAt(0)));)if(++this.index,"\\"!==n||this.eof())t+=n,e+=n;else if(n=this.source[this.index],"u"===n){++this.index;var r=this.index,o=this.scanHexEscape("u");if(null!==o)for(t+=o,e+="\\u";r<this.index;++r)e+=this.source[r];else this.index=r,t+="u",e+="\\u";this.tolerateUnexpectedToken()}else e+="\\",this.tolerateUnexpectedToken();return t},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),n=this.scanRegExpFlags(),r=this.testRegExp(t,n);return{type:9,value:"",pattern:t,flags:n,regex:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return l.Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?l.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():l.Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():55296<=e&&57343>e&&l.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=p},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.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(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),o=n(12),i=n(13),s=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return 0<=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var r=this.values[this.curly-4];t=!!r&&!this.beforeFunctionExpression(r)}else if("function"===this.values[this.curly-4]){var r=this.values[this.curly-5];t=!r||!this.beforeFunctionExpression(r)}break;default:}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),l=function(){function e(e,t){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new o.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new s}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var t=this.scanner.scanComments();if(this.scanner.trackComment)for(var n=0;n<t.length;++n){var r=t[n],e=this.scanner.source.slice(r.slice[0],r.slice[1]),o={type:r.multiLine?"BlockComment":"LineComment",value:e};this.trackRange&&(o.range=r.range),this.trackLoc&&(o.loc=r.loc),this.buffer.push(o)}if(!this.scanner.eof()){var s;this.trackLoc&&(s={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var l="/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart(),d=l?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(d);var p={type:i.TokenName[d.type],value:this.scanner.source.slice(d.start,d.end)};if(this.trackRange&&(p.range=[d.start,d.end]),this.trackLoc&&(s.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},p.loc=s),9===d.type){var c=d.pattern,u=d.flags;p.regex={pattern:c,flags:u}}this.buffer.push(p)}}return this.buffer.shift()},e}();t.Tokenizer=l}])})},"4McY":function(e,t,n){"use strict";var r=n("0gyT");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},"4e7A":function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(t){function e(e,n,r){var o=e.getWrapperElement(),i;return i=o.appendChild(document.createElement("div")),i.className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),t.addClass(o,"dialog-opened"),i}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}t.defineExtension("openDialog",function(r,o,i){function s(e){if("string"==typeof e)c.value=e;else{if(d)return;d=!0,t.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l),p.focus(),i.onClose&&i.onClose(l)}}i||(i={}),n(this,null);var l=e(this,r,i.bottom),d=!1,p=this,c=l.getElementsByTagName("input")[0],u;return c?(c.focus(),i.value&&(c.value=i.value,!1!==i.selectValueOnOpen&&c.select()),i.onInput&&t.on(c,"input",function(t){i.onInput(t,c.value,s)}),i.onKeyUp&&t.on(c,"keyup",function(t){i.onKeyUp(t,c.value,s)}),t.on(c,"keydown",function(n){i&&i.onKeyDown&&i.onKeyDown(n,c.value,s)||((27==n.keyCode||!1!==i.closeOnEnter&&13==n.keyCode)&&(c.blur(),t.e_stop(n),s()),13==n.keyCode&&o(c.value,n))}),!1!==i.closeOnBlur&&t.on(c,"blur",s)):(u=l.getElementsByTagName("button")[0])&&(t.on(u,"click",function(){s(),p.focus()}),!1!==i.closeOnBlur&&t.on(u,"blur",s),u.focus()),s}),t.defineExtension("openConfirm",function(r,o,s){function l(){c||(c=!0,t.rmClass(d.parentNode,"dialog-opened"),d.parentNode.removeChild(d),u.focus())}n(this,null);var d=e(this,r,s&&s.bottom),p=d.getElementsByTagName("button"),c=!1,u=this,h=1;p[0].focus();for(var m=0,i;m<p.length;++m)i=p[m],function(n){t.on(i,"click",function(r){t.e_preventDefault(r),l(),n&&n(u)})}(o[m]),t.on(i,"blur",function(){--h,setTimeout(function(){0>=h&&l()},200)}),t.on(i,"focus",function(){++h})}),t.defineExtension("openNotification",function(r,o){function i(){l||(l=!0,clearTimeout(p),t.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s))}n(this,i);var s=e(this,r,o&&o.bottom),l=!1,d=o&&"undefined"!=typeof o.duration?o.duration:5e3,p;return t.on(s,"click",function(n){t.e_preventDefault(n),i()}),d&&(p=setTimeout(i,d)),i})})},"58xA":function(e,t,n){"use strict";function r(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t;}for(var n in t)t.hasOwnProperty(n)&&(e[n]=r(e[n],t[n]));return e}function o(e){return JSON.parse(e)}function i(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,r=t,o;n<r.length;n++)if(o=r[n],o in e&&"function"==typeof e[o])return!0;return!1}function s(){}function l(e,t,n){var r="";switch(t){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4. Need to update it?");}var o=e+" failed: ";return o+=r+" argument ",o}var d=String.fromCharCode;Object.defineProperty(t,"__esModule",{value:!0});var p=n("vCxL"),c={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},u=function(e,t){if(!e)throw h(t)},h=function(e){return new Error("Firebase Database ("+c.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},m=function(e){for(var t=[],n=0,r=0,o;r<e.length;r++)o=e.charCodeAt(r),128>o?t[n++]=o:2048>o?(t[n++]=192|o>>6,t[n++]=128|63&o):55296==(64512&o)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++r)),t[n++]=240|o>>18,t[n++]=128|63&o>>12,t[n++]=128|63&o>>6,t[n++]=128|63&o):(t[n++]=224|o>>12,t[n++]=128|63&o>>6,t[n++]=128|63&o);return t},g=function(e){for(var t=[],n=0,r=0,o;n<e.length;)if(o=e[n++],128>o)t[r++]=d(o);else if(191<o&&224>o){var i=e[n++];t[r++]=d((31&o)<<6|63&i)}else if(239<o&&365>o){var i=e[n++],s=e[n++],l=e[n++],p=((7&o)<<18|(63&i)<<12|(63&s)<<6|63&l)-65536;t[r++]=d(55296+(p>>10)),t[r++]=d(56320+(1023&p))}else{var i=e[n++],s=e[n++];t[r++]=d((15&o)<<12|(63&i)<<6|63&s)}return t.join("")},f={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(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],o=0;o<e.length;o+=3){var i=e[o],s=o+1<e.length,l=s?e[o+1]:0,d=o+2<e.length,p=d?e[o+2]:0,c=(15&l)<<2|p>>6,u=63&p;d||(u=64,!s&&(c=64)),r.push(n[i>>2],n[(3&i)<<4|l>>4],n[c],n[u])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(m(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):g(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],o=0;o<e.length;){var i=n[e.charAt(o++)],s=o<e.length,l=s?n[e.charAt(o)]:0;++o;var d=o<e.length,p=d?n[e.charAt(o)]:64;++o;var c=o<e.length,u=c?n[e.charAt(o)]:64;if(++o,null==i||null==l||null==p||null==u)throw Error();if(r.push(i<<2|l>>4),64!=p){if(r.push(240&l<<4|p>>2),64!=u){r.push(192&p<<6|u)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},y=function(e){try{return f.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null},b=function(){function e(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return e.prototype.wrapCallback=function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"==typeof e&&(t.promise.catch(function(){}),1===e.length?e(n):e(n,r))}},e}(),x=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},v="FirebaseError",k=Error.captureStackTrace,S=function(){return function(e,t){if(this.code=e,this.message=t,k)k(this,w.prototype.create);else try{throw Error.apply(this,arguments)}catch(e){this.name=v,Object.defineProperty(this,"stack",{get:function(){return e.stack}})}}}();S.prototype=Object.create(Error.prototype),S.prototype.constructor=S,S.prototype.name=v;var w=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return e.prototype.create=function(e,t){void 0===t&&(t={});var n=this.errors[e],r=this.service+"/"+e,o;o=void 0===n?"Error":n.replace(this.pattern,function(e,n){var r=t[n];return void 0===r?"<"+n+"?>":r.toString()}),o=this.serviceName+": "+o+" ("+r+").";var i=new S(r,o);for(var s in t)t.hasOwnProperty(s)&&"_"!==s.slice(-1)&&(i[s]=t[s]);return i},e}(),C=function(e){var t={},n={},r={},i="";try{var s=e.split(".");t=o(y(s[0])||""),n=o(y(s[1])||""),i=s[2],r=n.d||{},delete n.d}catch(t){}return{header:t,claims:n,data:r,signature:i}},T=function(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])},_=function(e,t){return T(t,function(t,n){e[t]=n}),e},E=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e))return r},A=function(){return function(){this.blockSize=-1}}(),I=function(e){function t(){var t=e.call(this)||this;t.chain_=[],t.buf_=[],t.W_=[],t.pad_=[],t.inbuf_=0,t.total_=0,t.blockSize=64,t.pad_[0]=128;for(var n=1;n<t.blockSize;++n)t.pad_[n]=0;return t.reset(),t}return p.__extends(t,e),t.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},t.prototype.compress_=function(n,r){r||(r=0);var o=this.W_;if("string"==typeof n)for(var s=0;16>s;s++)o[s]=n.charCodeAt(r)<<24|n.charCodeAt(r+1)<<16|n.charCodeAt(r+2)<<8|n.charCodeAt(r+3),r+=4;else for(var s=0;16>s;s++)o[s]=n[r]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],r+=4;for(var s=16,i;80>s;s++)i=o[s-3]^o[s-8]^o[s-14]^o[s-16],o[s]=4294967295&(i<<1|i>>>31);for(var t=this.chain_[0],l=this.chain_[1],p=this.chain_[2],c=this.chain_[3],d=this.chain_[4],s=0,e,u;80>s;s++){40>s?20>s?(e=c^l&(p^c),u=1518500249):(e=l^p^c,u=1859775393):60>s?(e=l&p|c&(l|p),u=2400959708):(e=l^p^c,u=3395469782);var i=4294967295&(t<<5|t>>>27)+e+d+u+o[s];d=c,c=p,p=4294967295&(l<<30|l>>>2),l=t,t=i}this.chain_[0]=4294967295&this.chain_[0]+t,this.chain_[1]=4294967295&this.chain_[1]+l,this.chain_[2]=4294967295&this.chain_[2]+p,this.chain_[3]=4294967295&this.chain_[3]+c,this.chain_[4]=4294967295&this.chain_[4]+d},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var r=t-this.blockSize,o=0,n=this.buf_,i=this.inbuf_;o<t;){if(0==i)for(;o<=r;)this.compress_(e,o),o+=this.blockSize;if("string"==typeof e){for(;o<t;)if(n[i]=e.charCodeAt(o),++i,++o,i==this.blockSize){this.compress_(n),i=0;break}}else for(;o<t;)if(n[i]=e[o],++i,++o,i==this.blockSize){this.compress_(n),i=0;break}}this.inbuf_=i,this.total_+=t}},t.prototype.digest=function(){var e=[],t=8*this.total_;56>this.inbuf_?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var r=this.blockSize-1;56<=r;r--)this.buf_[r]=255&t,t/=256;this.compress_(this.buf_);for(var o=0,r=0;5>r;r++)for(var n=24;0<=n;n-=8)e[o]=255&this.chain_[r]>>n,++o;return e},t}(A),N=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(n)}).catch(function(t){n.error(t)})}return e.prototype.next=function(e){this.forEachObserver(function(t){t.next(e)})},e.prototype.error=function(e){this.forEachObserver(function(t){t.error(e)}),this.close(e)},e.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},e.prototype.subscribe=function(e,t,n){var r=this,o;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");o=i(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===o.next&&(o.next=s),void 0===o.error&&(o.error=s),void 0===o.complete&&(o.complete=s);var l=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{r.finalError?o.error(r.finalError):o.complete()}catch(t){}}),this.observers.push(o),l},e.prototype.unsubscribeOne=function(e){void 0===this.observers||void 0===this.observers[e]||(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(t){"undefined"!=typeof console&&console.error&&console.error(t)}})},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(function(){t.observers=void 0,t.onNoObservers=void 0}))},e}();t.assert=u,t.assertionError=h,t.base64=f,t.base64Decode=y,t.base64Encode=function(e){var t=m(e);return f.encodeByteArray(t,!0)},t.CONSTANTS=c,t.deepCopy=function(e){return r(void 0,e)},t.deepExtend=r,t.patchProperty=function(e,t,n){e[t]=n},t.Deferred=b,t.getUA=x,t.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(x())},t.isNodeSdk=function(){return!0===c.NODE_CLIENT||!0===c.NODE_ADMIN},t.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},t.ErrorFactory=w,t.FirebaseError=S,t.patchCapture=function(e){var t=k;return k=e,t},t.jsonEval=o,t.stringify=function(e){return JSON.stringify(e)},t.decode=C,t.isAdmin=function(e){var t=C(e).claims;return"object"==typeof t&&!0===t.admin},t.issuedAtTime=function(e){var t=C(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},t.isValidFormat=function(e){var t=C(e),n=t.claims;return!!t.signature&&!!n&&"object"==typeof n&&n.hasOwnProperty("iat")},t.isValidTimestamp=function(e){var t=C(e).claims,n=Math.floor(new Date().getTime()/1e3),r,o;return"object"==typeof t&&(t.hasOwnProperty("nbf")?r=t.nbf:t.hasOwnProperty("iat")&&(r=t.iat),o=t.hasOwnProperty("exp")?t.exp:r+86400),n&&r&&o&&n>=r&&n<=o},t.clone=function(e){return _({},e)},t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.every=function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!t(n,e[n]))return!1;return!0},t.extend=_,t.findKey=E,t.findValue=function(e,t,n){var r=E(e,t,n);return r&&e[r]},t.forEach=T,t.getAnyKey=function(e){for(var t in e)return t},t.getCount=function(e){var t=0;for(var n in e)t++;return t},t.getValues=function(e){var t=[],n=0;for(var r in e)t[n++]=e[r];return t},t.isEmpty=function(e){for(var t in e)return!1;return!0},t.isNonNullObject=function(e){return"object"==typeof e&&null!==e},t.map=function(e,t,n){var r={};for(var o in e)r[o]=t.call(n,e[o],o,e);return r},t.safeGet=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},t.querystring=function(e){var t=[];return T(e,function(e,n){Array.isArray(n)?n.forEach(function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={},n=e.replace(/^\?/,"").split("&");return n.forEach(function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}}),t},t.Sha1=I,t.async=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then(function(){e.apply(void 0,n)}).catch(function(e){t&&t(e)})}},t.createSubscribe=function(e,t){var n=new N(e,t);return n.subscribe.bind(n)},t.errorPrefix=l,t.validateArgCount=function(e,t,n,r){var o;if(r<t?o="at least "+t:r>n&&(o=0===n?"none":"no more than "+n),o){var i=e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+o+".";throw new Error(i)}},t.validateCallback=function(e,t,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(l(e,t,r)+"must be a valid function.")},t.validateContextObject=function(e,t,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(l(e,t,r)+"must be a valid context object.")},t.validateNamespace=function(e,t,n,r){if((!r||n)&&"string"!=typeof n)throw new Error(l(e,t,r)+"must be a valid firebase namespace.")},t.stringLength=function(e){for(var t=0,n=0,r;n<e.length;n++)r=e.charCodeAt(n),128>r?t++:2048>r?t+=2:55296<=r&&56319>=r?(t+=4,n++):t+=3;return t},t.stringToByteArray=function(e){for(var t=[],n=0,r=0,o;r<e.length;r++){if(o=e.charCodeAt(r),55296<=o&&56319>=o){var i=o-55296;r++,u(r<e.length,"Surrogate pair missing trail surrogate.");var s=e.charCodeAt(r)-56320;o=65536+(i<<10)+s}128>o?t[n++]=o:2048>o?(t[n++]=192|o>>6,t[n++]=128|63&o):65536>o?(t[n++]=224|o>>12,t[n++]=128|63&o>>6,t[n++]=128|63&o):(t[n++]=240|o>>18,t[n++]=128|63&o>>12,t[n++]=128|63&o>>6,t[n++]=128|63&o)}return t}},"5E0L":function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0,r;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,r){n(this,e),this.key=t,this.value=r},i=function(){function e(t){n(this,e),this._string=new Map,this._regexp=new Map,this._disabled=!1,this.load(t)}return e.prototype.disable=function(){this._disabled=!0},e.prototype.enable=function(){this._disabled=!1},e.prototype.set=function(e,t){var n=this;if("string"==typeof e)e.split("|").forEach(function(e){return n._string.set(e,new o(e,t))});else if(e instanceof RegExp)this._regexp.set(e,new o(e,t));else throw new Error("Unknow snippet key: "+e);return this},e.prototype.get=function(e){if(!this.disabled){if(this._string.has(e))return this._string.get(e);for(var t=Array.from(this._regexp.keys()),n=0,r=t.length;n<r;n++)if(t[n].test(e))return this._regexp.get(t[n])}},e.prototype.load=function(e){var t=this;this.reset(),e instanceof Map?e.forEach(function(e,n){return t.set(n,e)}):e&&"object"==typeof e&&Object.keys(e).forEach(function(n){return t.set(n,e[n])})},e.prototype.reset=function(){this._string.clear(),this._regexp.clear()},e.prototype.values=function(){if(this.disabled)return[];var e=Array.from(this._string.values()),t=Array.from(this._regexp.values());return e.concat(t)},r(e,[{key:"disabled",get:function(){return this._disabled}}]),e}(),s=function(){function e(t){var r=this;n(this,e),this._registry=[],Array.isArray(t)?t.forEach(function(e,t){return r.add(t,e)}):"object"==typeof t&&this.add(t)}return e.prototype.get=function(e){for(var t=0,n;t<this._registry.length;t++)if(n=this._registry[t],n.level===e)return n.store},e.prototype.add=function(e,t){null!=e&&"object"==typeof e&&(t=e,e=0);var n=new i(t);return this.remove(e),this._registry.push({level:e,store:n}),this._registry.sort(function(e,t){return t.level-e.level}),n},e.prototype.remove=function(e){this._registry=this._registry.filter(function(t){return t.level!==e&&t.store!==e})},e.prototype.resolve=function(e){for(var t=0,n;t<this._registry.length;t++)if(n=this._registry[t].store.get(e),n)return n},e.prototype.all=function(e){e=e||{};var t=new Map,n=function(n){var r=n.key instanceof RegExp?"regexp":"string";e.type&&e.type!==r||t.has(n.key)||t.set(n.key,n)};return this._registry.forEach(function(e){e.store.values().forEach(n)}),Array.from(t.values())},e.prototype.clear=function(){this._registry.length=0},e}();t.default=s},"5gBI":function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){function t(t,n){var r=t.getLine(n),o=r.search(/\S/);return-1==o||/\bcomment\b/.test(t.getTokenTypeAt(e.Pos(n,o+1)))?-1:e.countColumn(r,null,t.getOption("tabSize"))}e.registerHelper("fold","indent",function(n,r){var o=t(n,r.line);if(!(0>o)){for(var s=null,l=r.line+1,i=n.lastLine(),d;l<=i;++l)if(d=t(n,l),-1==d);else if(d>o)s=l;else break;if(s)return{from:e.Pos(r.line,n.getLine(r.line).length),to:e.Pos(s,n.getLine(s).length)}}})})},"6TpT":function(e){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},"6r0S":function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){function t(t,n){for(var r=0,o=t.length;r<o;++r)n(t[r])}function n(e,t){if(!Array.prototype.indexOf){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1}return-1!=e.indexOf(t)}function r(t,n,r,o){var i=t.getCursor(),d=r(t,i);if(!/\b(?:string|comment)\b/.test(d.type)){var p=e.innerMode(t.getMode(),d.state);if("json"!==p.mode.helperType){d.state=p.state,/^[\w$_]*$/.test(d.string)?d.end>i.ch&&(d.end=i.ch,d.string=d.string.slice(0,i.ch-d.start)):d={start:i.ch,end:i.ch,string:"",state:d.state,type:"."==d.string?"property":null};for(var c=d;"property"==c.type;){if(c=r(t,l(i.line,c.start)),"."!=c.string)return;if(c=r(t,l(i.line,c.start)),!u)var u=[];u.push(c)}return{list:s(d,u,n,o),from:l(i.line,d.start),to:l(i.line,d.end)}}}}function o(e,t){var n=e.getTokenAt(t);return t.ch==n.start+1&&"."==n.string.charAt(0)?(n.end=n.start,n.string=".",n.type="property"):/^\.[\w$_]*$/.test(n.string)&&(n.type="property",n.start++,n.string=n.string.replace(/\./,"")),n}function i(e,t){if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)for(var n in e)t(n);else for(var r=e;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(t)}function s(e,r,o,s){function l(e){0!=e.lastIndexOf(m,0)||n(h,e)||h.push(e)}function u(e){"string"==typeof e?t(d,l):e instanceof Array?t(p,l):e instanceof Function&&t(c,l),i(e,l)}var h=[],m=e.string,g=s&&s.globalScope||window;if(r&&r.length){var f=r.pop(),y;for(f.type&&0===f.type.indexOf("variable")?(s&&s.additionalContext&&(y=s.additionalContext[f.string]),(!s||!1!==s.useGlobalScope)&&(y=y||g[f.string])):"string"==f.type?y="":"atom"==f.type?y=1:"function"==f.type&&(null!=g.jQuery&&("$"==f.string||"jQuery"==f.string)&&"function"==typeof g.jQuery?y=g.jQuery():null!=g._&&"_"==f.string&&"function"==typeof g._&&(y=g._()));null!=y&&r.length;)y=y[r.pop().string];null!=y&&u(y)}else{for(var b=e.state.localVars;b;b=b.next)l(b.name);for(var b=e.state.globalVars;b;b=b.next)l(b.name);s&&!1===s.useGlobalScope||u(g),t(o,l)}return h}var l=e.Pos;e.registerHelper("hint","javascript",function(e,t){return r(e,u,function(t,e){return t.getTokenAt(e)},t)}),e.registerHelper("hint","coffeescript",function(e,t){return r(e,h,o,t)});var d=["charAt","charCodeAt","indexOf","lastIndexOf","substring","substr","slice","trim","trimLeft","trimRight","toUpperCase","toLowerCase","split","concat","match","replace","search"],p=["length","concat","join","splice","push","pop","shift","unshift","slice","reverse","sort","indexOf","lastIndexOf","every","some","filter","forEach","map","reduce","reduceRight",""],c=["prototype","apply","call","bind"],u=["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"],h=["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(e,t){"use strict";t.__esModule=!0;var n=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"]),r={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"};t.default=function(e){return e=(e||"").toLowerCase(),r[e]||(n.has(e)?"span":"div")}},"7tlB":function(e,t,n){"use strict";function r(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function o(e){return this instanceof o?void(l.call(this,e),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",i)):new o(e)}function i(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){s(e,t,n)}):s(this,null,null)}function s(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}e.exports=o;var l=n("Hba+"),d=n("Q14w");d.inherits=n("4Bm0"),d.inherits(o,l),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},o.prototype._transform=function(){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},o.prototype._read=function(){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(e,t){var n=this;l.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},"7vHL":function(e,t,n){"use strict";n("eA7g")},"8Agl":function(e,t,n){"use strict";var r=n("0gyT");e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},"8JlO":function(e,t,n){"use strict";var r=null;r="undefined"==typeof Promise?n("xz3w"):Promise,e.exports={Promise:r}},"9Uuy":function(e,t,n){"use strict";var r=n("dvMn"),o=n("untT"),i=n("TCoK"),s=n("wOgZ"),l=n("daDe"),d=n("nR4t");e.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||o.uint8array?"nodebuffer"===t?new l(e):o.uint8array?new d(r.transformTo("uint8array",e)):new i(r.transformTo("array",e)):new s(e)}},"A9/K":function(e,t,n){"use strict";e.exports=n("tzeh").Transform},A9O4:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(e.eat(S))return e.start=e.pos,{count:e.eatWhile(y.isNumber)?+e.current():null}}function i(e){if((0,y.eatQuoted)(e,w))return e.current().slice(1,-1)}function s(e){var t=e.pos;if(e.eat(C)){for(var n=1,r=void 0,o="",i=e.pos;!e.eof();)if(r=e.next(),r===C)n++;else if(r!==T)r===_&&(r=e.next(),(r===C||r===T)&&(o+=e.substring(i,e.pos-2)+String.fromCharCode(r),i=e.pos));else if(n--,!n)return e.start=t,o+e.substring(i,e.pos-1);throw e.pos=t,e.error("Unable to find closing } for text start")}return null}function l(e){if(!e.eat(N))return null;for(var t=[],n=void 0,r=void 0;!e.eof();){if(e.eatWhile(y.isWhiteSpace),e.eat(L))return t;if(null!=(n=i(e)))t.push({name:null,value:n});else if(p(e))n=e.current(),O.test(n)?(r=d(n),t.push(r),e.eat(I)&&(null==(n=i(e))?null==(n=s(e))?p(e)&&(r.value=e.current()):(r.value=n,r.options={before:"{",after:"}"}):r.value=n)):t.push({name:null,value:n});else throw e.error("Expected attribute name")}throw e.error("Expected closing \"]\" brace")}function d(e){var t={};e.charCodeAt(0)===E&&(e=e.slice(1),t.implied=!0),e.charCodeAt(e.length-1)===A&&(e=e.slice(0,e.length-1),t.boolean=!0);var n={name:e};return Object.keys(t).length&&(n.options=t),n}function p(e){var t=e.pos;if(e.eatWhile(c))return e.start=t,!0}function c(e){return!(0,y.isSpace)(e)&&!(0,y.isQuote)(e)&&e!==N&&e!==L&&e!==I}function u(e){for(var t=e.pos,n=new x.default(h(e)),r=void 0;!e.eof();)if(e.eat(D))n.addClass(h(e));else if(e.eat(M))n.setAttribute("id",h(e));else if(e.eat(R)){if(n.isGroup)throw e.backUp(1),e.error("Unexpected self-closing indicator");n.selfClosing=!0,(r=o(e))&&(n.repeat=r);break}else if(r=l(e))for(var d=0,i=r.length;d<i;d++)n.setAttribute(r[d]);else if(null!==(r=s(e)))n.value=r;else if(r=o(e))n.repeat=r;else break;if(t===e.pos)throw e.error("Unable to consume abbreviation node, unexpected "+e.peek());return n}function h(e){return e.start=e.pos,e.eatWhile(m),e.current()}function m(e){return(0,y.isAlphaNumeric)(e)||45===e||58===e||36===e||64===e||33===e||95===e||37===e}function g(e){for(var t=new k.default(e.trim()),n=new x.default,r=n,i=[],s=void 0;!t.eof();){if(s=t.peek(),s===P){var l=new x.default;i.push([l,r,t.pos]),r=l,t.next();continue}else if(s===B){var d=i.pop();if(!d)throw t.error("Unexpected \")\" group end");var p=d[0];if(r=d[1],t.next(),p.repeat=o(t))r.appendChild(p);else for(;p.firstChild;)r.appendChild(p.firstChild);t.eat(F);continue}var c=u(t);if(r.appendChild(c),t.eof())break;switch(t.peek()){case F:t.next();continue;case U:t.next(),r=c;continue;case z:for(;t.eat(z);)r=r.parent||r;continue;}}if(i.length)throw t.pos=i.pop()[2],t.error("Expected group close");return n}function f(e){if(e.repeat&&e.repeat.count){for(var t=e.parent,n=t.children.indexOf(e),r=0,o;r<e.repeat.count;r++)if(o=e.clone(!0),o.repeat.value=r+1,o.walk(f),o.isGroup)for(;0<o.children.length;)o.firstChild.repeat=o.repeat,t.insertAt(o.firstChild,n++);else t.insertAt(o,n++);e.parent.removeChild(e)}}t.__esModule=!0;var y=n("rc1b"),b=n("aBJ1"),x=r(b),v=n("Lu2N"),k=r(v),S=42,w={throws:!0},C=123,T=125,_=92,E=33,A=46,I=61,N=91,L=93,O=/^\!?[\w\-:\$@]+\.?$/,M=35,D=46,R=47,P=40,B=41,F=43,U=62,z=94;t.default=function(e){var t=g(e);return t.walk(f),t}},ABU1:function(e,t,n){"use strict";function r(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=o.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(n){t.error(n)})}var o=n("dvMn"),i=n("ZKdc");o.inherits(r,i),r.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},r.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},r.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),!this.isFinished&&(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},r.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t);}return this.index=t,this.push({data:e,meta:{percent:this.max?100*(this.index/this.max):0}})},e.exports=r},AIXc:function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("HeB0"),n("qqFR"),n("ggoL"))})(function(e){function t(e,t,n){var r=e.current(),o=r.search(t);return-1<o?e.backUp(r.length-o):r.match(/<\/?$/)&&(e.backUp(r.length),!e.match(t,!1)&&e.match(r)),n}function n(e){var t=d[e];return t?t:d[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function r(e,t){var r=e.match(n(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function o(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function s(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),o=e[n],s=o.length-1;0<=s;s--)r.unshift(o[s])}function i(e,t){for(var n=0,o;n<e.length;n++)if(o=e[n],!o[0]||o[1].test(r(t,o[0])))return o[2]}var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},d={};e.defineMode("htmlmixed",function(n,r){function d(r,s){var l=p.token(r,s.htmlState),u=/\btag\b/.test(l),h;if(u&&!/[<>\s\/]/.test(r.current())&&(h=s.htmlState.tagName&&s.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(h))s.inTag=h+" ";else if(s.inTag&&u&&/>$/.test(r.current())){var m=/^([\S]+) (.*)/.exec(s.inTag);s.inTag=null;var g=">"==r.current()&&i(c[m[1]],m[2]),f=e.getMode(n,g),y=o(m[1],!0),b=o(m[1],!1);s.token=function(e,n){return e.match(y,!1)?(n.token=d,n.localState=n.localMode=null,null):t(e,b,n.localMode.token(e,n.localState))},s.localMode=f,s.localState=e.startState(f,p.indent(s.htmlState,""))}else s.inTag&&(s.inTag+=r.current(),r.eol()&&(s.inTag+=" "));return l}var p=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:r.multilineTagIndentFactor,multilineTagIndentPastTag:r.multilineTagIndentPastTag}),c={},u=r&&r.tags,h=r&&r.scriptTypes;if(s(l,c),u&&s(u,c),h)for(var m=h.length-1;0<=m;m--)c.script.unshift(["type",h[m].matches,h[m].mode]);return{startState:function(){var t=e.startState(p);return{token:d,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(p,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?p.indent(t.htmlState,n):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||p}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},AhD2:function(){"use strict";var e=Math.round;(function(){function t(e){var t=getComputedStyle(e).color;if(t)try{return t.match(/(\d+), (\d+), (\d+)/).slice(1)}catch(t){return[255,255,255]}else return[255,255,255]}function n(e,t,n){var r={x:e,y:t+10,alpha:1,color:n};return 1===N?(r.size=s(2,4),r.vx=T.x[0]+Math.random()*(T.x[1]-T.x[0]),r.vy=T.y[0]+Math.random()*(T.y[1]-T.y[0])):2===N&&(r.size=s(2,8),r.drag=0.92,r.vx=s(-3,3),r.vy=s(-3,3),r.wander=0.15,r.theta=s(0,360)*m/180),r}function r(t){t.vy+=S,t.x+=t.vx,t.y+=t.vy,t.alpha*=C,M.fillStyle="rgba("+t.color[0]+","+t.color[1]+","+t.color[2]+","+t.alpha+")",M.fillRect(e(t.x-1),e(t.y-1),t.size,t.size)}function o(t){t.x+=t.vx,t.y+=t.vy,t.vx*=t.drag,t.vy*=t.drag,t.theta+=s(-0.5,0.5),t.vx+=0.1*Math.sin(t.theta),t.vy+=0.1*Math.cos(t.theta),t.size*=0.96,M.fillStyle="rgba("+t.color[0]+","+t.color[1]+","+t.color[2]+","+t.alpha+")",M.beginPath(),M.arc(e(t.x-1),e(t.y-1),t.size,0,2*m),M.fill()}function i(){for(var e=x.length,t;e--;)(t=x[e],!(!t||0.01>t.alpha||0.5>=t.size))&&(1===N?r(t):2===N&&o(t))}function s(e,t){return t||(t=e,e=0),e+~~(Math.random()*(t-e+1))}function l(e,t){var n=!1;return function(){n||(e.apply(this,arguments),n=!0,setTimeout(function(){n=!1},t))}}function d(){h&&(M.clearRect(0,0,_,w),D=new Date().getTime(),!b&&(b=D),R=(D-b)/1e3,b=D,0<g&&(g-=R,P=g/f*y,B=s(-P,P),F=s(-P,P),L.style.transform="translate("+B+"px,"+F+"px)"),i(),requestAnimationFrame(d))}function p(e,t){"+input"!==t.origin&&"+delete"!==t.origin||((!0===e.getOption("blastCode")||void 0===e.getOption("blastCode").shake)&&A(e,0.3),I(e))}function c(e){h=!0,O||(O=document.createElement("canvas"),M=O.getContext("2d"),O.id="code-blast-canvas",O.style.position="absolute",O.style.top=0,O.style.left=0,O.style.zIndex=1,O.style.pointerEvents="none",O.width=_,O.height=w,document.body.appendChild(O),d()),e.on("change",p)}function u(e){e.off("change",p),E.splice(E.indexOf(e),1),E.length||(h=!1,O&&(O.remove(),O=null))}var m=Math.PI,g=0,f=0,y=5,b=0,x=[],v=0,k={min:2,max:7},S=0.08,C=0.96,T={x:[-1,1],y:[-3.5,-1.5]},_=window.innerWidth,w=window.innerHeight,h=!1,E=[],A=l(function(e,t){L=e.getWrapperElement(),g=f=t},100),I=l(function(e,r){var o=e.getCursor(),l=e.cursorCoords(),d=document.elementFromPoint(l.left-5,l.top+5);r=e.getTokenAt(o),r&&(r=r.type);for(var p=s(k.min,k.max),c=t(d),u=p;u--;)x[v]=n(l.left+10,l.top,c),v=(v+1)%100},100),N,L,O,M,D,R,P,B,F;CodeMirror.defineOption("blastCode",!1,function(e,t){t?(E.push(e),N=t.effect||2,c(e)):u(e)})})()},AsaI:function(e,t,n){"use strict";function r(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}var o=n("dvMn"),i=n("ZKdc");o.inherits(r,i),r.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(n){t.isPaused?this.generatedError=n:t.error(n)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},r.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},r.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=r},B9y7:function(e,t){"use strict";t.__esModule=!0;t.default={html:{a:"a[href]","a:link":"a[href='http://${0}']","a:mail":"a[href='mailto:${0}']","a:tel":"a[href='tel:+${0}']",abbr:"abbr[title]","acr|acronym":"acronym[title]",base:"base[href]/",basefont:"basefont/",br:"br/",frame:"frame/",hr:"hr/",bdo:"bdo[dir]","bdo:r":"bdo[dir=rtl]","bdo:l":"bdo[dir=ltr]",col:"col/",link:"link[rel=stylesheet href]/","link:css":"link[href='${1:style}.css']","link:print":"link[href='${1:print}.css' media=print]","link:favicon":"link[rel='shortcut icon' type=image/x-icon href='${1:favicon.ico}']","link:touch":"link[rel=apple-touch-icon href='${1:favicon.png}']","link:rss":"link[rel=alternate type=application/rss+xml title=RSS href='${1:rss.xml}']","link:atom":"link[rel=alternate type=application/atom+xml title=Atom href='${1:atom.xml}']","link:im|link:import":"link[rel=import href='${1:component}.html']",meta:"meta/","meta:utf":"meta[http-equiv=Content-Type content='text/html;charset=UTF-8']","meta:vp":"meta[name=viewport content='width=${1:device-width}, initial-scale=${2:1.0}']","meta:compat":"meta[http-equiv=X-UA-Compatible content='${1:IE=7}']","meta:edge":"meta:compat[content='${1:ie=edge}']","meta:redirect":"meta[http-equiv=refresh content='0; url=${1:http://example.com}']",style:"style",script:"script[!src]","script:src":"script[src]",img:"img[src alt]/","img:s|img:srcset":"img[srcset src alt]","img:z|img:sizes":"img[sizes srcset src alt]",picture:"picture","src|source":"source/","src:sc|source:src":"source[src type]","src:s|source:srcset":"source[srcset]","src:t|source:type":"source[srcset type='${1:image/}']","src:z|source:sizes":"source[sizes srcset]","src:m|source:media":"source[media='(${1:min-width: })' srcset]","src:mt|source:media:type":"source:media[type='${2:image/}']","src:mz|source:media:sizes":"source:media[sizes srcset]","src:zt|source:sizes:type":"source[sizes srcset type='${1:image/}']",iframe:"iframe[src frameborder=0]",embed:"embed[src type]/",object:"object[data type]",param:"param[name value]/",map:"map[name]",area:"area[shape coords href alt]/","area:d":"area[shape=default]","area:c":"area[shape=circle]","area:r":"area[shape=rect]","area:p":"area[shape=poly]",form:"form[action]","form:get":"form[method=get]","form:post":"form[method=post]",label:"label[for]",input:"input[type=${1:text}]/",inp:"input[name=${1} id=${1}]","input:h|input:hidden":"input[type=hidden name]","input:t|input:text":"inp[type=text]","input:search":"inp[type=search]","input:email":"inp[type=email]","input:url":"inp[type=url]","input:p|input:password":"inp[type=password]","input:datetime":"inp[type=datetime]","input:date":"inp[type=date]","input:datetime-local":"inp[type=datetime-local]","input:month":"inp[type=month]","input:week":"inp[type=week]","input:time":"inp[type=time]","input:tel":"inp[type=tel]","input:number":"inp[type=number]","input:color":"inp[type=color]","input:c|input:checkbox":"inp[type=checkbox]","input:r|input:radio":"inp[type=radio]","input:range":"inp[type=range]","input:f|input:file":"inp[type=file]","input:s|input:submit":"input[type=submit value]","input:i|input:image":"input[type=image src alt]","input:b|input:button":"input[type=button value]","input:reset":"input:button[type=reset]",isindex:"isindex/",select:"select[name=${1} id=${1}]","select:d|select:disabled":"select[disabled.]","opt|option":"option[value]",textarea:"textarea[name=${1} id=${1} cols=${2:30} rows=${3:10}]",marquee:"marquee[behavior direction]","menu:c|menu:context":"menu[type=context]","menu:t|menu:toolbar":"menu[type=toolbar]",video:"video[src]",audio:"audio[src]","html:xml":"html[xmlns=http://www.w3.org/1999/xhtml]",keygen:"keygen/",command:"command/","btn:s|button:s|button:submit":"button[type=submit]","btn:r|button:r|button:reset":"button[type=reset]","btn:d|button:d|button:disabled":"button[disabled.]","fst:d|fset:d|fieldset:d|fieldset:disabled":"fieldset[disabled.]",bq:"blockquote",fig:"figure",figc:"figcaption",pic:"picture",ifr:"iframe",emb:"embed",obj:"object",cap:"caption",colg:"colgroup",fst:"fieldset",btn:"button",optg:"optgroup",tarea:"textarea",leg:"legend",sect:"section",art:"article",hdr:"header",ftr:"footer",adr:"address",dlg:"dialog",str:"strong",prog:"progress",mn:"main",tem:"template",fset:"fieldset",datag:"datagrid",datal:"datalist",kg:"keygen",out:"output",det:"details",cmd:"command","ri:d|ri:dpr":"img:s","ri:v|ri:viewport":"img:z","ri:a|ri:art":"pic>src:m+img","ri:t|ri:type":"pic>src:t+img","!!!":"{<!DOCTYPE html>}",doc:"html[lang=${lang}]>(head>meta[charset=${charset}]+meta:vp+meta:edge+title{${1:Document}})+body","!|html:5":"!!!+doc",c:"{<!-- ${0} -->}","cc:ie":"{<!--[if IE]>${0}<![endif]-->}","cc:noie":"{<!--[if !IE]><!-->${0}<!--<![endif]-->}"},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|}","!!!":"{<?xml version=\"1.0\" encoding=\"UTF-8\"?>}"}}},BVSg:function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("1JcR"))})(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),r=[],p=t.getOption("autoCloseTags"),c=0;c<n.length;c++){if(!n[c].empty())return e.Pass;var i=n[c].head,u=t.getTokenAt(i),h=e.innerMode(t.getMode(),u.state),m=h.state;if("xml"!=h.mode.name||!m.tagName)return e.Pass;var g="html"==h.mode.configuration,f="object"==typeof p&&p.dontCloseTags||g&&l,y="object"==typeof p&&p.indentTags||g&&d,b=m.tagName;u.end>i.ch&&(b=b.slice(0,b.length-u.end+i.ch));var x=b.toLowerCase();if(!b||"string"==u.type&&(u.end!=i.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==m.type||u.string.indexOf("/")==u.string.length-1||f&&-1<o(f,x)||s(t,b,i,m,!0))return e.Pass;var v=y&&-1<o(y,x);r[c]={indent:v,text:">"+(v?"\n\n":"")+"</"+b+">",newPos:v?e.Pos(i.line+1,0):e.Pos(i.line,i.ch+1)}}for(var k="object"==typeof p&&p.dontIndentOnAutoClose,c=n.length-1,S;0<=c;c--){S=r[c],t.replaceRange(S.text,n[c].head,n[c].anchor,"+insert");var w=t.listSelections().slice(0);w[c]={head:S.newPos,anchor:S.newPos},t.setSelections(w),!k&&S.indent&&(t.indentLine(S.newPos.line,null,!0),t.indentLine(S.newPos.line+1,null,!0))}}function n(t,n){for(var r=t.listSelections(),o=[],l=n?"/":"</",d=t.getOption("autoCloseTags"),p="object"==typeof d&&d.dontIndentOnSlash,c=0;c<r.length;c++){if(!r[c].empty())return e.Pass;var i=r[c].head,u=t.getTokenAt(i),h=e.innerMode(t.getMode(),u.state),m=h.state;if(n&&("string"==u.type||"<"!=u.string.charAt(0)||u.start!=i.ch-1))return e.Pass;var g;if("xml"==h.mode.name){if(!m.context||!m.context.tagName||s(t,m.context.tagName,i,m))return e.Pass;g=l+m.context.tagName}else if("htmlmixed"==t.getMode().name&&"javascript"==h.mode.name)g=l+"script";else if("htmlmixed"==t.getMode().name&&"css"==h.mode.name)g=l+"style";else return e.Pass;">"!=t.getLine(i.line).charAt(u.end)&&(g+=">"),o[c]=g}if(t.replaceSelections(o),r=t.listSelections(),!p)for(var c=0;c<r.length;c++)(c==r.length-1||r[c].head.line<r[c+1].head.line)&&t.indentLine(r[c].head.line)}function r(t){return t.getOption("disableInput")?e.Pass:n(t,!0)}function o(t,n){if(t.indexOf)return t.indexOf(n);for(var r=0,o=t.length;r<o;++r)if(t[r]==n)return r;return-1}function s(t,n,r,o,s){if(!e.scanForClosingTag)return!1;var l=Math.min(t.lastLine()+1,r.line+500),d=e.scanForClosingTag(t,r,null,l);if(!d||d.tag!=n)return!1;for(var p=o.context,c=s?1:0;p&&p.tagName==n;p=p.prev)++c;r=d.to;for(var u=1,i;u<c;u++){if(i=e.scanForClosingTag(t,r,null,l),!i||i.tag!=n)return!1;r=i.to}return!0}e.defineOption("autoCloseTags",!1,function(n,o,i){if(i!=e.Init&&i&&n.removeKeyMap("autoCloseTags"),!!o){var s={name:"autoCloseTags"};("object"!=typeof o||o.whenClosing)&&(s["'/'"]=function(e){return r(e)}),("object"!=typeof o||o.whenOpening)&&(s["'>'"]=function(e){return t(e)}),n.addKeyMap(s)}});var l=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],d=["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"];e.commands.closeTag=function(e){return n(e)}})},BtxX:function(e){"use strict";(function(t){function n(){}function r(e,t){return function(){e.apply(t,arguments)}}function o(e){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function s(e,t){for(;3===e._state;)e=e._value;return 0===e._state?void e._deferreds.push(t):void(e._handled=!0,o._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._state?i:l)(t.promise,e._value);var r;try{r=n(e._value)}catch(n){return void l(t.promise,n)}i(t.promise,r)}))}function i(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void d(t);if("function"==typeof n)return void c(r(n,e),t)}t._state=1,t._value=e,d(t)}catch(n){l(t,n)}}function l(e,t){e._state=2,e._value=t,d(e)}function d(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)s(e,e._deferreds[t]);e._deferreds=null}function p(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function c(e,t){var n=!1;try{e(function(e){n||(n=!0,i(t,e))},function(e){n||(n=!0,l(t,e))})}catch(e){if(n)return;n=!0,l(t,e)}}var u=setTimeout;o.prototype["catch"]=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var r=new this.constructor(n);return s(this,new p(e,t,r)),r},o.all=function(e){return new o(function(t,n){function r(e,i){try{if(i&&("object"==typeof i||"function"==typeof i)){var l=i.then;if("function"==typeof l)return void l.call(i,function(t){r(e,t)},n)}o[e]=i,0==--s&&t(o)}catch(e){n(e)}}if(!e||"undefined"==typeof e.length)throw new TypeError("Promise.all accepts an array");var o=Array.prototype.slice.call(e);if(0===o.length)return t([]);for(var s=o.length,l=0;l<o.length;l++)r(l,o[l])})},o.resolve=function(e){return e&&"object"==typeof e&&e.constructor===o?e:new o(function(t){t(e)})},o.reject=function(e){return new o(function(t,n){n(e)})},o.race=function(e){return new o(function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)})},o._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){u(e,0)},o._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},o._setImmediateFn=function(e){o._immediateFn=e},o._setUnhandledRejectionFn=function(e){o._unhandledRejectionFn=e},"undefined"!=typeof e&&e.exports?e.exports=o:!t.Promise&&(t.Promise=o)})(void 0)},C6nS:function(e,t,n){"use strict";e.exports=n("tzeh").PassThrough},Ctqd:function(e,t){"use strict";t.LOCAL_FILE_HEADER="PK\x03\x04",t.CENTRAL_FILE_HEADER="PK\x01\x02",t.CENTRAL_DIRECTORY_END="PK\x05\x06",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",t.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",t.DATA_DESCRIPTOR="PK\x07\b"},DHrQ:function(e,t,n){"use strict";(function(t){function r(e){return F.from(e)}function o(e){return F.isBuffer(e)||e instanceof U}function i(e,t,n){return"function"==typeof e.prependListener?e.prependListener(t,n):void(e._events&&e._events[t]?M(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n))}function s(e,t){D=D||n("Hba+"),e=e||{};var r=t instanceof D;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,i=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(i||0===i)?i:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new V,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(!H&&(H=n("ES0U").StringDecoder),this.decoder=new H(e.encoding),this.encoding=e.encoding)}function l(e){return D=D||n("Hba+"),this instanceof l?void(this._readableState=new s(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),B.call(this)):new l(e)}function d(e,t,n,o,i){var s=e._readableState;if(null===t)s.reading=!1,g(e,s);else{var l;i||(l=c(s,t)),l?e.emit("error",l):s.objectMode||t&&0<t.length?("string"!=typeof t&&!s.objectMode&&Object.getPrototypeOf(t)!==F.prototype&&(t=r(t)),o?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):p(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?p(e,s,t,!1):b(e,s)):p(e,s,t,!1))):!o&&(s.reading=!1)}return u(s)}function p(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&f(e)),b(e,t)}function c(e,t){var n;return o(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function u(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function h(e){return e>=G?e=G:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function m(e,t){return 0>=e||0===t.length&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=h(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}function g(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,f(e)}}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(q("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?O.nextTick(y,e):y(e))}function y(e){q("emit readable"),e.emit("readable"),C(e)}function b(e,t){t.readingMore||(t.readingMore=!0,O.nextTick(x,e,t))}function x(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(q("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function v(e){return function(){var t=e._readableState;q("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&P(e,"data")&&(t.flowing=!0,C(e))}}function k(e){q("readable nexttick read 0"),e.read(0)}function S(e,t){t.resumeScheduled||(t.resumeScheduled=!0,O.nextTick(w,e,t))}function w(e,t){t.reading||(q("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),C(e),t.flowing&&!t.reading&&e.read(0)}function C(e){var t=e._readableState;for(q("flow",t.flowing);t.flowing&&null!==e.read(););}function T(e,t){if(0===t.length)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=_(e,t.buffer,t.decoder),r}function _(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?r=t.shift():r=n?E(e,t):A(e,t),r}function E(e,t){var n=t.head,r=1,o=n.data;for(e-=o.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(o+=s===i.length?i:i.slice(0,e),e-=s,0===e){s===i.length?(++r,t.head=n.next?n.next:t.tail=null):(t.head=n,n.data=i.slice(s));break}++r}return t.length-=r,o}function A(e,t){var n=F.allocUnsafe(e),r=t.head,o=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,s),e-=s,0===e){s===i.length?(++o,t.head=r.next?r.next:t.tail=null):(t.head=r,r.data=i.slice(s));break}++o}return t.length-=o,n}function I(e){var t=e._readableState;if(0<t.length)throw new Error("\"endReadable()\" called on non-empty stream");t.endEmitted||(t.ended=!0,O.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}var O=n("Yj0v");e.exports=l;var M=n("REa7"),D;l.ReadableState=s;var R=n("FRpO").EventEmitter,P=function(e,t){return e.listeners(t).length},B=n("1ExO"),F=n("38Wu").Buffer,U=t.Uint8Array||function(){},z=n("Q14w");z.inherits=n("4Bm0");var j=n(0),q=void 0;q=j&&j.debuglog?j.debuglog("stream"):function(){};var V=n("wl+m"),W=n("GRUB"),H;z.inherits(l,B);var K=["error","close","destroy","pause","resume"];Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),l.prototype.destroy=W.destroy,l.prototype._undestroy=W.undestroy,l.prototype._destroy=function(e,t){this.push(null),t(e)},l.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=F.from(e,t),t=""),r=!0),d(this,e,t,!1,r)},l.prototype.unshift=function(e){return d(this,e,null,!0,!1)},l.prototype.isPaused=function(){return!1===this._readableState.flowing},l.prototype.setEncoding=function(e){return H||(H=n("ES0U").StringDecoder),this._readableState.decoder=new H(e),this._readableState.encoding=e,this};var G=8388608;l.prototype.read=function(e){q("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return q("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):f(this),null;if(e=m(e,t),0===e&&t.ended)return 0===t.length&&I(this),null;var r=t.needReadable;q("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,q("length less than watermark",r)),t.ended||t.reading?(r=!1,q("reading or ended",r)):r&&(q("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,!t.reading&&(e=m(n,t)));var o;return o=0<e?T(e,t):null,null===o?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(!t.ended&&(t.needReadable=!0),n!==e&&t.ended&&I(this)),null!==o&&this.emit("data",o),o},l.prototype._read=function(){this.emit("error",new Error("_read() is not implemented"))},l.prototype.pipe=function(e,t){function n(e,t){q("onunpipe"),e===u&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,o())}function r(){q("onend"),e.end()}function o(){q("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",f),e.removeListener("error",l),e.removeListener("unpipe",n),u.removeListener("end",r),u.removeListener("end",c),u.removeListener("data",s),y=!0,h.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&f()}function s(t){q("ondata"),b=!1;var n=e.write(t);!1!==n||b||((1===h.pipesCount&&h.pipes===e||1<h.pipesCount&&-1!==L(h.pipes,e))&&!y&&(q("false write response, pause",u._readableState.awaitDrain),u._readableState.awaitDrain++,b=!0),u.pause())}function l(t){q("onerror",t),c(),e.removeListener("error",l),0===P(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",p),c()}function p(){q("onfinish"),e.removeListener("close",d),c()}function c(){q("unpipe"),u.unpipe(e)}var u=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e);}h.pipesCount+=1,q("pipe count=%d opts=%j",h.pipesCount,t);var m=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr,g=m?r:c;h.endEmitted?O.nextTick(g):u.once("end",g),e.on("unpipe",n);var f=v(u);e.on("drain",f);var y=!1,b=!1;return u.on("data",s),i(e,"error",l),e.once("close",d),e.once("finish",p),e.emit("pipe",u),h.flowing||(q("pipe resume"),u.resume()),e},l.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<o;s++)r[s].emit("unpipe",this,n);return this}var i=L(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},l.prototype.on=function(e,t){var n=B.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&f(this):O.nextTick(k,this))}return n},l.prototype.addListener=l.prototype.on,l.prototype.resume=function(){var e=this._readableState;return e.flowing||(q("resume"),e.flowing=!0,S(this,e)),this},l.prototype.pause=function(){return q("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(q("pause"),this._readableState.flowing=!1,this.emit("pause")),this},l.prototype.wrap=function(e){var t=this,r=this._readableState,o=!1;for(var s in e.on("end",function(){if(q("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(n){if((q("wrapped data"),r.decoder&&(n=r.decoder.write(n)),!(r.objectMode&&(null===n||void 0===n)))&&(r.objectMode||n&&n.length)){var i=t.push(n);i||(o=!0,e.pause())}}),e)void 0===this[s]&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var i=0;i<K.length;i++)e.on(K[i],this.emit.bind(this,K[i]));return this._read=function(t){q("wrapped _read",t),o&&(o=!1,e.resume())},this},Object.defineProperty(l.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),l._fromList=T}).call(t,n("h6ac"))},Dxv2:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){n=n||{};var r=p({},g,n&&n.format);return(0,u.default)(e,n.field,function(n){var o=n.node,l=s(o,r);if(o.attributes.length){var d=o.attributes.map(function(e){return s(e,r)});l=i(l,d)}return n.open=o.name&&t.name(o.name),n.afterOpen=r.between,n.text=n.renderFields(l||null),!n.open||n.text&&n.text.endsWith(";")||(n.afterText=r.after),t.get("format")&&(n.newline="\n",e.lastChild!==o&&(n.afterText+=n.newline)),n})}function i(e,t){var n=(0,m.default)(e),r=n.fields.length;if(r)for(t=t.slice(),t.length>r&&(t=t.slice(0,r-1).concat(t.slice(r-1).join(", ")));t.length;){var o=t.shift(),s=n.fields.shift(),l=o.length-s.length;n.string=n.string.slice(0,s.location)+o+n.string.slice(s.location+s.length);for(var d=0,i=n.fields.length;d<i;d++)n.fields[d].location+=l}return n}function s(e,t){return e.value&&"object"==typeof e.value&&"css-value"===e.value.type?e.value.value.map(function(e){return e&&"object"==typeof e?"color"===e.type?e.toString(t.shortHex):e.toString():e+""}).join(" "):null==e.value?"":e.value+""}function l(e){return!!e&&e in f}function d(e,t){var n=f[e];return"string"==typeof n&&(n=f[n]),p({},n,t&&t.format)}t.__esModule=!0,t.supports=void 0;var p=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},c=n("iOMi"),u=r(c),h=n("R0uB"),m=r(h),g={shortHex:!0,between:": ",after:";"},f={css:{between:": ",after:";"},scss:"css",less:"css",sass:{between:": ",after:""},stylus:{between:" ",after:""}};t.default=function(e,t,n,r){return"object"==typeof n&&(r=n,n=null),l(n)||(n="css"),r=p({},r,{format:d(n,r)}),o(e,t,r)},t.supports=l},EJg2:function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){return t?"upper"===t?e.toUpperCase():e.toLowerCase():e}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},i={indent:"\t",tagCase:"",attributeCase:"",attributeQuotes:"double",format:!0,formatSkip:["html"],formatForce:["body"],inlineBreak:3,compactBooleanAttributes:!1,booleanAttributes:["contenteditable","seamless","async","autofocus","autoplay","checked","controls","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","novalidate","readonly","required","reversed","selected","typemustmatch"],selfClosingStyle:"html",inlineElements:["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"]},s=function(){function e(t){n(this,e),this.options=o({},i,t),this.quoteChar="single"===this.options.attributeQuotes?"'":"\""}return e.prototype.get=function(e){return this.options[e]},e.prototype.quote=function(e){return""+this.quoteChar+(null==e?"":e)+this.quoteChar},e.prototype.name=function(e){return r(e,this.options.tagCase)},e.prototype.attribute=function(e){return r(e,this.options.attributeCase)},e.prototype.isBooleanAttribute=function(e){return e.options.boolean||-1!==this.get("booleanAttributes").indexOf((e.name||"").toLowerCase())},e.prototype.selfClose=function(){switch(this.options.selfClosingStyle){case"xhtml":return" /";case"xml":return"/";default:return"";}},e.prototype.indent=function(e){e=e||0;for(var t="";e--;)t+=this.options.indent;return t},e.prototype.isInline=function(e){return"string"==typeof e?-1!==this.get("inlineElements").indexOf(e.toLowerCase()):null==e.name?e.isTextOnly:this.isInline(e.name)},e.prototype.field=function(e,t){return this.options.field(e,t)},e}();t.default=s},ES0U:function(e,t,n){"use strict";function r(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0;}}function o(e){var t=r(e);if("string"!=typeof t&&(y.isEncoding===b||!b(e)))throw new Error("Unknown encoding: "+e);return t||e}function i(e){this.encoding=o(e);var t;switch(this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=p,t=4;break;case"base64":this.text=h,this.end=m,t=3;break;default:return this.write=g,void(this.end=f);}this.lastNeed=0,this.lastTotal=0,this.lastChar=y.allocUnsafe(t)}function s(e){return 127>=e?0:6==e>>5?2:14==e>>4?3:30==e>>3?4:2==e>>6?-1:-2}function l(e,t,n){var r=t.length-1;if(r<n)return 0;var o=s(t[r]);return 0<=o?(0<o&&(e.lastNeed=o-1),o):--r<n||-2===o?0:(o=s(t[r]),0<=o)?(0<o&&(e.lastNeed=o-2),o):--r<n||-2===o?0:(o=s(t[r]),0<=o?(0<o&&(2===o?o=0:e.lastNeed=o-3),o):0)}function d(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"\uFFFD";if(1<e.lastNeed&&1<t.length){if(128!=(192&t[1]))return e.lastNeed=1,"\uFFFD";if(2<e.lastNeed&&2<t.length&&128!=(192&t[2]))return e.lastNeed=2,"\uFFFD"}}function p(e){var t=this.lastTotal-this.lastNeed,n=d(this,e,t);return void 0===n?this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length):n}function c(e,t){if(0==(e.length-t)%2){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(55296<=r&&56319>=r)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function h(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}var y=n("38Wu").Buffer,b=y.isEncoding||function(e){switch(e=""+e,e&&e.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;}};t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t},i.prototype.text=function(e,t){var n=l(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){return this.lastNeed<=e.length?(e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length)}},FFEI:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){if(e.peek()===D){e.start=e.pos,e.next(),e.eat(116)||e.eatWhile(s);var t=e.current();if(e.start=e.pos,e.eat(R)&&!e.eatWhile(A.isNumber))throw e.error("Unexpected character for alpha value of color");return new P(t,e.current())}}function s(e){return(0,A.isNumber)(e)||(0,A.isAlpha)(e,65,70)}function l(e){return!(e%17)}function d(e){return(e>>4).toString(16)}function p(e){return c(e.toString(16),2)}function c(e,t){for(;e.length<t;)e="0"+e;return e}function u(e){return(0,A.isNumber)(e)||h(e)}function h(e){return 95===e||(0,A.isAlpha)(e)}function m(e){if(e.start=e.pos,g(e)){var t=e.current();return e.start=e.pos,e.eat(B)||e.eatWhile(h),new z(t,e.current())}}function g(e){var t=e.pos,n=e.eat(U),r=e.pos;e.eatWhile(A.isNumber);var o=e.pos;return e.eat(F)&&!e.eatWhile(A.isNumber)&&(e.pos=o),e.pos===r&&(e.pos=t),e.pos!==t}function f(e,t){return e.start=e.pos,e.eat(j)||e.eat(V)?e.eatWhile(b):t?e.eatWhile(h):e.eatWhile(y),e.start===e.pos?null:new W(e.current())}function y(e){return u(e)||e===q}function b(e){return 45===e||u(e)}function x(e){if((0,A.eatQuoted)(e,H))return new K(e.current())}function v(e){if(!e.eat(G))return null;for(var t=void 0,n=[];!e.eof();)if(t=k(e))n.push(t);else{if(e.eatWhile(A.isWhiteSpace),e.eat(X))break;if(!e.eat(Q))throw e.error("Expected , or )")}return n}function k(e){for(var t=new M,n=void 0;!e.eof()&&(e.eatWhile(A.isWhiteSpace),n=m(e)||i(e)||x(e)||S(e),!!n);)t.add(n);return t.size?t:null}function S(e){var t=f(e);if(t){var n=v(e);return n?new Y(t.toString(),n):t}}function w(e){return e.start=e.pos,e.eatWhile(_),e.eatWhile(T),e.start===e.pos?null:e.current()}function C(e){for(var t=new M,n=void 0;!e.eof()&&(e.eat(ee),(n=m(e)||i(e))?!n.unit&&e.eat(Z):(e.eat(Z),n=f(e,!0)),!!n);)t.add(n);return t}function T(e){return h(e)}function _(e){return e===te||e===$||e===J}t.__esModule=!0;var E=function(){function e(e,t){for(var n=0,r;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),A=n("rc1b"),I=n("aBJ1"),N=r(I),L=n("Lu2N"),O=r(L),M=function(){function e(){o(this,e),this.type="css-value",this.value=[]}return e.prototype.add=function(e){this.value.push(e)},e.prototype.has=function(e){return-1!==this.value.indexOf(e)},e.prototype.toString=function(){return this.value.join(" ")},E(e,[{key:"size",get:function(){return this.value.length}}]),e}(),D=35,R=46,P=function(){function e(t,n){o(this,e),this.type="color",this.raw=t,this.alpha=+(null!=n&&""!==n?n:1),t=t.slice(1);var i=0,r=0,s=0;if("t"===t)this.alpha=0;else switch(t.length){case 0:break;case 1:i=r=s=t+t;break;case 2:i=r=s=t;break;case 3:i=t[0]+t[0],r=t[1]+t[1],s=t[2]+t[2];break;default:t+=t,i=t.slice(0,2),r=t.slice(2,4),s=t.slice(4,6);}this.r=parseInt(i,16),this.g=parseInt(r,16),this.b=parseInt(s,16)}return e.prototype.toHex=function(e){var t=e&&l(this.r)&&l(this.g)&&l(this.b)?d:p;return"#"+t(this.r)+t(this.g)+t(this.b)},e.prototype.toRGB=function(){var e=[this.r,this.g,this.b];return 1!==this.alpha&&e.push(this.alpha.toFixed(8).replace(/\.?0+$/,"")),(3===e.length?"rgb":"rgba")+"("+e.join(", ")+")"},e.prototype.toString=function(e){return this.r||this.g||this.b||this.alpha?1===this.alpha?this.toHex(e):this.toRGB():"transparent"},e}(),B=37,F=46,U=45,z=function(){function e(t,n){o(this,e),this.type="numeric",this.value=+t,this.unit=n||""}return e.prototype.toString=function(){return""+this.value+this.unit},e}(),j=36,q=45,V=64,W=function(){function e(t){o(this,e),this.type="keyword",this.value=t}return e.prototype.toString=function(){return this.value},e}(),H={throws:!0},K=function(){function e(t){o(this,e),this.type="string",this.value=t}return e.prototype.toString=function(){return this.value},e}(),G=40,X=41,Q=44,Y=function(){function e(t,n){o(this,e),this.type="function",this.name=t,this.args=n||[]}return e.prototype.toString=function(){return this.name+"("+this.args.join(", ")+")"},e}(),J=33,$=36,Z=45,ee=58,te=64;t.default=function(e){for(var t=new N.default,n=new O.default(e),r;!n.eof();){r=new N.default(w(n)),r.value=C(n);var o=v(n);if(o)for(var s=0;s<o.length;s++)r.setAttribute(s+"",o[s]);if(n.eat(J)&&r.value.add("!"),t.appendChild(r),!n.eat(43))break}if(!n.eof())throw n.error("Unexpected character");return t}},FRpO:function(e){"use strict";function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function r(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}e.exports=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if(!r(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,r,l,d,p,i;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length))if(t=arguments[1],t instanceof Error)throw t;else{var c=new Error("Uncaught, unspecified \"error\" event. ("+t+")");throw c.context=t,c}if(r=this._events[e],s(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:d=Array.prototype.slice.call(arguments,1),r.apply(this,d);}else if(o(r))for(d=Array.prototype.slice.call(arguments,1),i=r.slice(),l=i.length,p=0;p<l;p++)i[p].apply(this,d);return!0},t.prototype.addListener=function(e,r){var i;if(!n(r))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(r.listener)?r.listener:r),this._events[e]?o(this._events[e])?this._events[e].push(r):this._events[e]=[this._events[e],r]:this._events[e]=r,o(this._events[e])&&!this._events[e].warned&&(i=s(this._maxListeners)?t.defaultMaxListeners:this._maxListeners,i&&0<i&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){function r(){this.removeListener(e,r),o||(o=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var o=!1;return r.listener=t,this.on(e,r),this},t.prototype.removeListener=function(e,t){var r,s,l,d;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],l=r.length,s=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(d=l;0<d--;)if(r[d]===t||r[d].listener&&r[d].listener===t){s=d;break}if(0>s)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[],t},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},GIDK:function(e,t,n){"use strict";function r(e){return(255&e>>>24)+(65280&e>>>8)+((65280&e)<<8)+((255&e)<<24)}function o(){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 h.Buf16(320),this.work=new h.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function i(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=E,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new h.Buf32(oe),t.distcode=t.distdyn=new h.Buf32(ae),t.sane=1,t.back=-1,S):w}function s(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,i(e)):w}function l(e,t){var n,r;return e&&e.state?(r=e.state,0>t?(n=0,t=-t):(n=(t>>4)+1,48>t&&(t&=15)),t&&(8>t||15<t))?w:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,s(e)):w}function d(e,t){var n,r;return e?(r=new o,e.state=r,r.window=null,n=l(e,t),n!==S&&(e.state=null),n):w}function p(e){if(ie){var t;for(se=new h.Buf32(512),le=new h.Buf32(32),t=0;144>t;)e.lens[t++]=8;for(;256>t;)e.lens[t++]=9;for(;280>t;)e.lens[t++]=7;for(;288>t;)e.lens[t++]=8;for(y(b,e.lens,0,288,se,0,e.work,{bits:9}),t=0;32>t;)e.lens[t++]=5;y(x,e.lens,0,32,le,0,e.work,{bits:5}),ie=!1}e.lencode=se,e.lenbits=9,e.distcode=le,e.distbits=5}function c(e,t,n,r){var o=e.state,i;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new h.Buf8(o.wsize)),r>=o.wsize?(h.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),h.arraySet(o.window,t,n-r,i,o.wnext),r-=i,r?(h.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}var u=String.fromCharCode,h=n("tbG5"),m=n("uxo6"),g=n("X4kj"),f=n("LP5M"),y=n("2u+n"),b=1,x=2,v=4,k=6,S=0,w=-2,C=-3,T=-4,_=8,E=1,A=2,I=3,N=4,L=5,O=6,M=7,D=8,R=9,P=10,B=11,F=12,U=13,z=14,j=15,q=16,V=17,W=18,H=19,K=20,G=21,X=22,Q=23,Y=24,J=25,$=26,Z=27,ee=28,te=29,ne=30,re=31,oe=852,ae=592,ie=!0,se,le;t.inflateReset=s,t.inflateReset2=l,t.inflateResetKeep=i,t.inflateInit=function(e){return d(e,15)},t.inflateInit2=d,t.inflate=function(e,t){var o=0,i=new h.Buf8(4),s=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l,d,oe,ae,ie,se,le,de,pe,ce,ue,he,me,ge,fe,ye,be,xe,ve,ke,Se,we,Ce,Te;if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return w;l=e.state,l.mode===F&&(l.mode=U),ie=e.next_out,oe=e.output,le=e.avail_out,ae=e.next_in,d=e.input,se=e.avail_in,de=l.hold,pe=l.bits,ce=se,ue=le,we=S;inf_leave:for(;;)switch(l.mode){case E:if(0===l.wrap){l.mode=U;break}for(;16>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}if(2&l.wrap&&35615===de){l.check=0,i[0]=255&de,i[1]=255&de>>>8,l.check=g(l.check,i,2,0),de=0,pe=0,l.mode=A;break}if(l.flags=0,l.head&&(l.head.done=!1),!(1&l.wrap)||(((255&de)<<8)+(de>>8))%31){e.msg="incorrect header check",l.mode=ne;break}if((15&de)!=_){e.msg="unknown compression method",l.mode=ne;break}if(de>>>=4,pe-=4,Se=(15&de)+8,0===l.wbits)l.wbits=Se;else if(Se>l.wbits){e.msg="invalid window size",l.mode=ne;break}l.dmax=1<<Se,e.adler=l.check=1,l.mode=512&de?P:F,de=0,pe=0;break;case A:for(;16>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}if(l.flags=de,(255&l.flags)!=_){e.msg="unknown compression method",l.mode=ne;break}if(57344&l.flags){e.msg="unknown header flags set",l.mode=ne;break}l.head&&(l.head.text=1&de>>8),512&l.flags&&(i[0]=255&de,i[1]=255&de>>>8,l.check=g(l.check,i,2,0)),de=0,pe=0,l.mode=I;case I:for(;32>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}l.head&&(l.head.time=de),512&l.flags&&(i[0]=255&de,i[1]=255&de>>>8,i[2]=255&de>>>16,i[3]=255&de>>>24,l.check=g(l.check,i,4,0)),de=0,pe=0,l.mode=N;case N:for(;16>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}l.head&&(l.head.xflags=255&de,l.head.os=de>>8),512&l.flags&&(i[0]=255&de,i[1]=255&de>>>8,l.check=g(l.check,i,2,0)),de=0,pe=0,l.mode=L;case L:if(1024&l.flags){for(;16>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}l.length=de,l.head&&(l.head.extra_len=de),512&l.flags&&(i[0]=255&de,i[1]=255&de>>>8,l.check=g(l.check,i,2,0)),de=0,pe=0}else l.head&&(l.head.extra=null);l.mode=O;case O:if(1024&l.flags&&(he=l.length,he>se&&(he=se),he&&(l.head&&(Se=l.head.extra_len-l.length,!l.head.extra&&(l.head.extra=Array(l.head.extra_len)),h.arraySet(l.head.extra,d,ae,he,Se)),512&l.flags&&(l.check=g(l.check,d,he,ae)),se-=he,ae+=he,l.length-=he),l.length))break inf_leave;l.length=0,l.mode=M;case M:if(2048&l.flags){if(0===se)break inf_leave;he=0;do Se=d[ae+he++],l.head&&Se&&65536>l.length&&(l.head.name+=u(Se));while(Se&&he<se);if(512&l.flags&&(l.check=g(l.check,d,he,ae)),se-=he,ae+=he,Se)break inf_leave}else l.head&&(l.head.name=null);l.length=0,l.mode=D;case D:if(4096&l.flags){if(0===se)break inf_leave;he=0;do Se=d[ae+he++],l.head&&Se&&65536>l.length&&(l.head.comment+=u(Se));while(Se&&he<se);if(512&l.flags&&(l.check=g(l.check,d,he,ae)),se-=he,ae+=he,Se)break inf_leave}else l.head&&(l.head.comment=null);l.mode=R;case R:if(512&l.flags){for(;16>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}if(de!==(65535&l.check)){e.msg="header crc mismatch",l.mode=ne;break}de=0,pe=0}l.head&&(l.head.hcrc=1&l.flags>>9,l.head.done=!0),e.adler=l.check=0,l.mode=F;break;case P:for(;32>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}e.adler=l.check=r(de),de=0,pe=0,l.mode=B;case B:if(0===l.havedict)return e.next_out=ie,e.avail_out=le,e.next_in=ae,e.avail_in=se,l.hold=de,l.bits=pe,2;e.adler=l.check=1,l.mode=F;case F:if(t===5||t===k)break inf_leave;case U:if(l.last){de>>>=7&pe,pe-=7&pe,l.mode=Z;break}for(;3>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}switch(l.last=1&de,de>>>=1,pe-=1,3&de){case 0:l.mode=z;break;case 1:if(p(l),l.mode=K,t===k){de>>>=2,pe-=2;break inf_leave}break;case 2:l.mode=V;break;case 3:e.msg="invalid block type",l.mode=ne;}de>>>=2,pe-=2;break;case z:for(de>>>=7&pe,pe-=7&pe;32>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}if((65535&de)!=(65535^de>>>16)){e.msg="invalid stored block lengths",l.mode=ne;break}if(l.length=65535&de,de=0,pe=0,l.mode=j,t===k)break inf_leave;case j:l.mode=q;case q:if(he=l.length,he){if(he>se&&(he=se),he>le&&(he=le),0===he)break inf_leave;h.arraySet(oe,d,ae,he,ie),se-=he,ae+=he,le-=he,ie+=he,l.length-=he;break}l.mode=F;break;case V:for(;14>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}if(l.nlen=(31&de)+257,de>>>=5,pe-=5,l.ndist=(31&de)+1,de>>>=5,pe-=5,l.ncode=(15&de)+4,de>>>=4,pe-=4,286<l.nlen||30<l.ndist){e.msg="too many length or distance symbols",l.mode=ne;break}l.have=0,l.mode=W;case W:for(;l.have<l.ncode;){for(;3>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}l.lens[s[l.have++]]=7&de,de>>>=3,pe-=3}for(;19>l.have;)l.lens[s[l.have++]]=0;if(l.lencode=l.lendyn,l.lenbits=7,Ce={bits:l.lenbits},we=y(0,l.lens,0,19,l.lencode,0,l.work,Ce),l.lenbits=Ce.bits,we){e.msg="invalid code lengths set",l.mode=ne;break}l.have=0,l.mode=H;case H:for(;l.have<l.nlen+l.ndist;){for(;;){if(o=l.lencode[de&(1<<l.lenbits)-1],fe=o>>>24,ye=255&o>>>16,be=65535&o,fe<=pe)break;if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}if(16>be)de>>>=fe,pe-=fe,l.lens[l.have++]=be;else{if(16===be){for(Te=fe+2;pe<Te;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}if(de>>>=fe,pe-=fe,0===l.have){e.msg="invalid bit length repeat",l.mode=ne;break}Se=l.lens[l.have-1],he=3+(3&de),de>>>=2,pe-=2}else if(17===be){for(Te=fe+3;pe<Te;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}de>>>=fe,pe-=fe,Se=0,he=3+(7&de),de>>>=3,pe-=3}else{for(Te=fe+7;pe<Te;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}de>>>=fe,pe-=fe,Se=0,he=11+(127&de),de>>>=7,pe-=7}if(l.have+he>l.nlen+l.ndist){e.msg="invalid bit length repeat",l.mode=ne;break}for(;he--;)l.lens[l.have++]=Se}}if(l.mode===ne)break;if(0===l.lens[256]){e.msg="invalid code -- missing end-of-block",l.mode=ne;break}if(l.lenbits=9,Ce={bits:l.lenbits},we=y(b,l.lens,0,l.nlen,l.lencode,0,l.work,Ce),l.lenbits=Ce.bits,we){e.msg="invalid literal/lengths set",l.mode=ne;break}if(l.distbits=6,l.distcode=l.distdyn,Ce={bits:l.distbits},we=y(x,l.lens,l.nlen,l.ndist,l.distcode,0,l.work,Ce),l.distbits=Ce.bits,we){e.msg="invalid distances set",l.mode=ne;break}if(l.mode=K,t===k)break inf_leave;case K:l.mode=G;case G:if(6<=se&&258<=le){e.next_out=ie,e.avail_out=le,e.next_in=ae,e.avail_in=se,l.hold=de,l.bits=pe,f(e,ue),ie=e.next_out,oe=e.output,le=e.avail_out,ae=e.next_in,d=e.input,se=e.avail_in,de=l.hold,pe=l.bits,l.mode===F&&(l.back=-1);break}for(l.back=0;;){if(o=l.lencode[de&(1<<l.lenbits)-1],fe=o>>>24,ye=255&o>>>16,be=65535&o,fe<=pe)break;if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}if(ye&&0==(240&ye)){for(xe=fe,ve=ye,ke=be;;){if(o=l.lencode[ke+((de&(1<<xe+ve)-1)>>xe)],fe=o>>>24,ye=255&o>>>16,be=65535&o,xe+fe<=pe)break;if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}de>>>=xe,pe-=xe,l.back+=xe}if(de>>>=fe,pe-=fe,l.back+=fe,l.length=be,0===ye){l.mode=$;break}if(32&ye){l.back=-1,l.mode=F;break}if(64&ye){e.msg="invalid literal/length code",l.mode=ne;break}l.extra=15&ye,l.mode=X;case X:if(l.extra){for(Te=l.extra;pe<Te;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}l.length+=de&(1<<l.extra)-1,de>>>=l.extra,pe-=l.extra,l.back+=l.extra}l.was=l.length,l.mode=Q;case Q:for(;;){if(o=l.distcode[de&(1<<l.distbits)-1],fe=o>>>24,ye=255&o>>>16,be=65535&o,fe<=pe)break;if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}if(0==(240&ye)){for(xe=fe,ve=ye,ke=be;;){if(o=l.distcode[ke+((de&(1<<xe+ve)-1)>>xe)],fe=o>>>24,ye=255&o>>>16,be=65535&o,xe+fe<=pe)break;if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}de>>>=xe,pe-=xe,l.back+=xe}if(de>>>=fe,pe-=fe,l.back+=fe,64&ye){e.msg="invalid distance code",l.mode=ne;break}l.offset=be,l.extra=15&ye,l.mode=Y;case Y:if(l.extra){for(Te=l.extra;pe<Te;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}l.offset+=de&(1<<l.extra)-1,de>>>=l.extra,pe-=l.extra,l.back+=l.extra}if(l.offset>l.dmax){e.msg="invalid distance too far back",l.mode=ne;break}l.mode=J;case J:if(0===le)break inf_leave;if(he=ue-le,l.offset>he){if(he=l.offset-he,he>l.whave&&l.sane){e.msg="invalid distance too far back",l.mode=ne;break}he>l.wnext?(he-=l.wnext,me=l.wsize-he):me=l.wnext-he,he>l.length&&(he=l.length),ge=l.window}else ge=oe,me=ie-l.offset,he=l.length;he>le&&(he=le),le-=he,l.length-=he;do oe[ie++]=ge[me++];while(--he);0===l.length&&(l.mode=G);break;case $:if(0===le)break inf_leave;oe[ie++]=l.length,le--,l.mode=G;break;case Z:if(l.wrap){for(;32>pe;){if(0===se)break inf_leave;se--,de|=d[ae++]<<pe,pe+=8}if(ue-=le,e.total_out+=ue,l.total+=ue,ue&&(e.adler=l.check=l.flags?g(l.check,oe,ue,ie-ue):m(l.check,oe,ue,ie-ue)),ue=le,(l.flags?de:r(de))!==l.check){e.msg="incorrect data check",l.mode=ne;break}de=0,pe=0}l.mode=ee;case ee:if(l.wrap&&l.flags){for(;32>pe;){if(0===se)break inf_leave;se--,de+=d[ae++]<<pe,pe+=8}if(de!==(4294967295&l.total)){e.msg="incorrect length check",l.mode=ne;break}de=0,pe=0}l.mode=te;case te:we=1;break inf_leave;case ne:we=C;break inf_leave;case re:return T;case 32:default:return w;}return(e.next_out=ie,e.avail_out=le,e.next_in=ae,e.avail_in=se,l.hold=de,l.bits=pe,(l.wsize||ue!==e.avail_out&&l.mode<ne&&(l.mode<Z||t!==v))&&c(e,e.output,e.next_out,ue-e.avail_out))?(l.mode=re,T):(ce-=e.avail_in,ue-=e.avail_out,e.total_in+=ce,e.total_out+=ue,l.total+=ue,l.wrap&&ue&&(e.adler=l.check=l.flags?g(l.check,oe,ue,e.next_out-ue):m(l.check,oe,ue,e.next_out-ue)),e.data_type=l.bits+(l.last?64:0)+(l.mode===F?128:0)+(l.mode===K||l.mode===j?256:0),(0===ce&&0===ue||t===v)&&we===S&&(we=-5),we)},t.inflateEnd=function(e){if(!e||!e.state)return w;var t=e.state;return t.window&&(t.window=null),e.state=null,S},t.inflateGetHeader=function(e,t){var n;return e&&e.state?(n=e.state,0==(2&n.wrap))?w:(n.head=t,t.done=!1,S):w},t.inflateSetDictionary=function(e,t){var n=t.length,r,o,i;return e&&e.state?(r=e.state,0!==r.wrap&&r.mode!==B)?w:r.mode===B&&(o=1,o=m(o,t,n,0),o!==r.check)?C:(i=c(e,t,n,n),i)?(r.mode=re,T):(r.havedict=1,S):w},t.inflateInfo="pako inflate (from Nodeca project)"},GRUB:function(e,t,n){"use strict";function r(e,t){e.emit("error",t)}var o=n("Yj0v");e.exports={destroy:function(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?(t?t(e):e&&(!this._writableState||!this._writableState.errorEmitted)&&o.nextTick(r,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(o.nextTick(r,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},GTg1:function(e,t,n){"use strict";var r=n("XfO6"),o=n("xtj2"),i=function(e,t){var n=e||t,o=r[n];if(!o)throw new Error(n+" is not a valid compression method !");return o};t.generateWorker=function(e,t,n){var r=new o(t.streamFiles,n,t.platform,t.encodeFileName),s=0;try{e.forEach(function(e,n){s++;var o=i(n.options.compression,t.compression),l=n.options.compressionOptions||t.compressionOptions||{},d=n.dir,p=n.date;n._compressWorker(o,l).withStreamInfo("file",{name:e,dir:d,date:p,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(r)}),r.entriesCount=s}catch(t){r.error(t)}return r}},"H+g/":function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(t){function e(e,o,i,s){function l(t){var n=d(e,o);if(!n||n.to.line-n.from.line<p)return null;for(var r=e.findMarksAt(n.from),l=0;l<r.length;++l)if(r[l].__isFold&&"fold"!==s){if(!t)return null;n.cleared=!0,r[l].clear()}return n}if(i&&i.call){var d=i;i=null}else var d=r(e,i,"rangeFinder");"number"==typeof o&&(o=t.Pos(o,0));var p=r(e,i,"minFoldSize"),c=l(!0);if(r(e,i,"scanUp"))for(;!c&&o.line>e.firstLine();)o=t.Pos(o.line-1,0),c=l(!1);if(c&&!c.cleared&&"unfold"!==s){var u=n(e,i);t.on(u,"mousedown",function(n){h.clear(),t.e_preventDefault(n)});var h=e.markText(c.from,c.to,{replacedWith:u,clearOnEnter:r(e,i,"clearOnEnter"),__isFold:!0});h.on("clear",function(n,r){t.signal(e,"unfold",e,n,r)}),t.signal(e,"fold",e,c.from,c.to)}}function n(e,t){var n=r(e,t,"widget");if("string"==typeof n){var o=document.createTextNode(n);n=document.createElement("span"),n.appendChild(o),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}function r(e,t,n){if(t&&void 0!==t[n])return t[n];var r=e.options.foldOptions;return r&&void 0!==r[n]?r[n]:o[n]}t.newFoldFunction=function(t,n){return function(r,o){e(r,o,{rangeFinder:t,widget:n})}},t.defineExtension("foldCode",function(t,n,r){e(this,t,n,r)}),t.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0}),t.commands.toggleFold=function(e){e.foldCode(e.getCursor())},t.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},t.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},t.commands.foldAll=function(n){n.operation(function(){for(var r=n.firstLine(),o=n.lastLine();r<=o;r++)n.foldCode(t.Pos(r,0),null,"fold")})},t.commands.unfoldAll=function(n){n.operation(function(){for(var r=n.firstLine(),o=n.lastLine();r<=o;r++)n.foldCode(t.Pos(r,0),null,"unfold")})},t.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0,o;r<e.length;++r)if(o=e[r](t,n),o)return o}}),t.registerHelper("fold","auto",function(e,t){for(var n=e.getHelpers(t,"fold"),r=0,o;r<n.length;r++)if(o=n[r](e,t),o)return o});var o={rangeFinder:t.fold.auto,widget:"\u2194",minFoldSize:0,scanUp:!1,clearOnEnter:!0};t.defineOption("foldOptions",null),t.defineExtension("foldOption",function(e,t){return r(this,e,t)})})},"Hba+":function(e,t,n){"use strict";function r(e){return this instanceof r?void(p.call(this,e),c.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",o)):new r(e)}function o(){this.allowHalfOpen||this._writableState.ended||s.nextTick(i,this)}function i(e){e.end()}var s=n("Yj0v"),l=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=r;var d=n("Q14w");d.inherits=n("4Bm0");var p=n("DHrQ"),c=n("WSyY");d.inherits(r,p);for(var u=l(c.prototype),h=0,m;h<u.length;h++)m=u[h],r.prototype[m]||(r.prototype[m]=c.prototype[m]);Object.defineProperty(r.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(r.prototype,"destroyed",{get:function(){return void 0===this._readableState||void 0===this._writableState?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0===this._readableState||void 0===this._writableState||(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),r.prototype._destroy=function(e,t){this.push(null),this.end(),s.nextTick(t,e)}},HeB0:function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(r,o){function i(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(d("atom","]]>")):null:e.match("--")?n(d("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(p(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=d("meta","?>"),"meta"):(E=e.eat("/")?"closeTag":"openTag",t.tokenize=s,"tag bracket");if("&"==r){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function s(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=i,E=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return E="equals",null;if("<"==n){t.tokenize=i,t.state=m,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return /[\'\"]/.test(n)?(t.tokenize=l(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=s;break}return"string"};return t.isInAttribute=!0,t}function d(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=i;break}n.next()}return e}}function p(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=p(e+1),n.tokenize(t,n);if(">"==r)if(1==e){n.tokenize=i;break}else return n.tokenize=p(e-1),n.tokenize(t,n)}return"meta"}}function c(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(C.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!C.contextGrabbers.hasOwnProperty(n)||!C.contextGrabbers[n].hasOwnProperty(t))return;u(e)}}function m(e,t,n){return"openTag"==e?(n.tagStart=t.column(),g):"closeTag"==e?f:m}function g(e,t,n){return"word"==e?(n.tagName=t.current(),A="tag",x):C.allowMissingTagName&&"endTag"==e?(A="tag bracket",x(e,t,n)):(A="error",g)}function f(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&C.implicitlyClosed.hasOwnProperty(n.context.tagName)&&u(n),n.context&&n.context.tagName==r||!1===C.matchClosing?(A="tag",y):(A="tag error",b)}return C.allowMissingTagName&&"endTag"==e?(A="tag bracket",y(e,t,n)):(A="error",b)}function y(e,t,n){return"endTag"==e?(u(n),m):(A="error",y)}function b(e,t,n){return A="error",y(e,t,n)}function x(e,t,n){if("word"==e)return A="attribute",v;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||C.autoSelfClosers.hasOwnProperty(r)?h(n,r):(h(n,r),n.context=new c(n,r,o==n.indented)),m}return A="error",x}function v(e,t,n){return"equals"==e?k:(C.allowMissing||(A="error"),x(e,t,n))}function k(e,t,n){return"string"==e?S:"word"==e&&C.allowUnquoted?(A="string",x):(A="error",x(e,t,n))}function S(e,t,n){return"string"==e?S:x(e,t,n)}var w=r.indentUnit,C={},T=o.htmlMode?t:n;for(var _ in T)C[_]=T[_];for(var _ in o)C[_]=o[_];var E,A;return i.isInText=!0,{startState:function(e){var t={tokenize:i,state:m,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;E=null;var n=t.tokenize(e,t);return(n||E)&&"comment"!=n&&(A=null,t.state=t.state(E||n,e,t),A&&(n="error"==A?n+" error":A)),n},indent:function(t,n,r){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+w;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=s&&t.tokenize!=i)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1===C.multilineTagIndentPastTag?t.tagStart+w*(C.multilineTagIndentFactor||1):t.tagStart+t.tagName.length+2;if(C.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var l=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(l&&l[1]){for(;o;)if(o.tagName==l[2]){o=o.prev;break}else if(C.implicitlyClosed.hasOwnProperty(o.tagName))o=o.prev;else break;}else if(l)for(;o;){var d=C.contextGrabbers[o.tagName];if(d&&d.hasOwnProperty(l[2]))o=o.prev;else break}for(;o&&o.prev&&!o.startOfLine;)o=o.prev;return o?o.indent+w:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=x)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},HyWd:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},IDli:function(e,t,n){"use strict";e.exports=!n("s0rf")&&!n("6TpT")(function(){return 7!=Object.defineProperty(n("kdYR")("div"),"a",{get:function(){return 7}}).a})},IIoC:function(e,t,n){"use strict";var r=Math.round,o=Math.floor,i=Math.max;(function(t){(function(){function s(e){return"string"==typeof e}function l(e,t){e=e.split("."),t=t||Mr;for(var n=0;n<e.length;n++)if(t=t[e[n]],null==t)return null;return t}function n(){}function d(e){var t=typeof e;if("object"==t){if(e){if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof e.length&&"undefined"!=typeof e.splice&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof e.call&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else return"null";}else if("function"==t&&"undefined"==typeof e.call)return"object";return t}function v(e){return"array"==d(e)}function p(e){var t=d(e);return"array"==t||"object"==t&&"number"==typeof e.length}function h(e){return"function"==d(e)}function _(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function c(e){return e.call.apply(e.bind,arguments)}function m(e,t){if(!e)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var r=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(r,n),e.apply(t,r)}}return function(){return e.apply(t,arguments)}}function j(){return j=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?c:m,j.apply(null,arguments)}function f(e){var t=Array.prototype.slice.call(arguments,1);return function(){var n=t.slice();return n.push.apply(n,arguments),e.apply(this,n)}}function b(e,t){function n(){}n.prototype=t.prototype,e.H=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Ib=function(n,r){for(var o=Array(arguments.length-2),i=2;i<arguments.length;i++)o[i-2]=arguments[i];return t.prototype[r].apply(n,o)}}function u(e){if(Error.captureStackTrace)Error.captureStackTrace(this,u);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=e+"")}function I(t,n){t=t.split("%s");for(var r="",o=t.length-1,i=0;i<o;i++)r+=t[i]+(i<n.length?n[i]:"%s");u.call(this,r+t[o])}function X(e){throw new I("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1))}function $(){0!=g&&(Rr[this[k]||(this[k]=++q)]=this),this.i=this.i,this.m=this.m}function w(t){a:{for(var n=se,r=t.length,o=s(t)?t.split(""):t,i=0;i<r;i++)if(i in o&&n.call(void 0,o[i],i,t)){n=i;break a}n=-1}return 0>n?null:s(t)?t.charAt(n):t[n]}function _e(e){if(!v(e))for(var t=e.length-1;0<=t;t--)delete e[t];e.length=0}function et(){return Array.prototype.concat.apply([],arguments)}function tt(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function nt(e){return /^[\s\xa0]*$/.test(e)}function rt(e,t){return e<t?-1:e>t?1:0}function ot(e){return-1!=Ur.indexOf(e)}function y(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function at(e){var t=[],n=0,r;for(r in e)t[n++]=e[r];return t}function it(e){var t=[],n=0,r;for(r in e)t[n++]=r;return t}function st(e){var t={},n;for(n in e)t[n]=e[n];return t}function lt(t){for(var n=1,e,r;n<arguments.length;n++){for(e in r=arguments[n],r)t[e]=r[e];for(var o=0;o<jr.length;o++)e=jr[o],Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}}function dt(e){return dt[" "](e),e}function pt(e,t){var n=$r;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}function ct(){var e=Mr.document;return e?e.documentMode:void 0}function ut(t){return pt(t,function(){for(var n=0,r=Fr(Xr+"").split("."),o=Fr(t+"").split("."),s=i(r.length,o.length),e=0;0==n&&e<s;e++){var l=r[e]||"",d=o[e]||"";do{if(l=/(\d*)(\D*)(.*)/.exec(l)||["","","",""],d=/(\d*)(\D*)(.*)/.exec(d)||["","","",""],0==l[0].length&&0==d[0].length)break;n=rt(0==l[1].length?0:parseInt(l[1],10),0==d[1].length?0:parseInt(d[1],10))||rt(0==l[2].length,0==d[2].length)||rt(l[2],d[2]),l=l[3],d=d[3]}while(0==n)}return 0<=n})}function ht(e,t){this.type=e,this.a=this.target=t,this.Ra=!0}function A(t,n){if(ht.call(this,t?t.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,t){var r=this.type=t.type,o=t.changedTouches?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.a=n,!(n=t.relatedTarget))"mouseover"==r?n=t.fromElement:"mouseout"==r&&(n=t.toElement);else if(Kr){a:{try{dt(n.nodeName);var i=!0;break a}catch(e){}i=!1}i||(n=null)}this.relatedTarget=n,null===o?(this.clientX=void 0===t.clientX?t.pageX:t.clientX,this.clientY=void 0===t.clientY?t.pageY:t.clientY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0===o.clientX?o.pageX:o.clientX,this.clientY=void 0===o.clientY?o.pageY:o.clientY,this.screenX=o.screenX||0,this.screenY=o.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=s(t.pointerType)?t.pointerType:ao[t.pointerType]||"",this.c=t,t.defaultPrevented&&this.b()}}function mt(t,n,r,o,i){this.listener=t,this.proxy=null,this.src=n,this.type=r,this.capture=!!o,this.ga=i,this.key=++so,this.Z=this.ba=!1}function gt(e){e.Z=!0,e.listener=null,e.proxy=null,e.src=null,e.ga=null}function ft(e){this.src=e,this.a={},this.b=0}function yt(t,n){var r=n.type;if(r in t.a){var o=t.a[r],i=Pr(o,n),e;(e=0<=i)&&Array.prototype.splice.call(o,i,1),e&&(gt(n),0==t.a[r].length&&(delete t.a[r],t.b--))}}function bt(t,n,r,o){for(var i=0,e;i<t.length;++i)if(e=t[i],!e.Z&&e.listener==n&&e.capture==!!r&&e.ga==o)return i;return-1}function xt(t,n,r,o,i){if(o&&o.once)return St(t,n,r,o,i);if(v(n)){for(var e=0;e<n.length;e++)xt(t,n[e],r,o,i);return null}return r=Nt(r),t&&t[io]?t.Ia(n,r,_(o)?!!o.capture:!!o,i):vt(t,n,r,!1,o,i)}function vt(t,n,r,o,i,s){if(!n)throw Error("Invalid event type");var l=_(i)?!!i.capture:!!i,d=It(t);if(d||(t[lo]=d=new ft(t)),r=d.add(n,r,o,l,s),r.proxy)return r;if(o=kt(),r.proxy=o,o.src=t,o.listener=r,t.addEventListener)oo||(i=l),void 0===i&&(i=!1),t.addEventListener(n.toString(),o,i);else if(t.attachEvent)t.attachEvent(Tt(n.toString()),o);else if(t.addListener&&t.removeListener)t.addListener(o);else throw Error("addEventListener and attachEvent are unavailable.");return co++,r}function kt(){var e=At,t=no?function(n){return e.call(t.src,t.listener,n)}:function(n){if(n=e.call(t.src,t.listener,n),!n)return n};return t}function St(t,n,r,o,i){if(v(n)){for(var e=0;e<n.length;e++)St(t,n[e],r,o,i);return null}return r=Nt(r),t&&t[io]?t.Ja(n,r,_(o)?!!o.capture:!!o,i):vt(t,n,r,!0,o,i)}function wt(t,n,r,o,i){if(v(n))for(var e=0;e<n.length;e++)wt(t,n[e],r,o,i);else(o=_(o)?!!o.capture:!!o,r=Nt(r),t&&t[io])?(t=t.f,n=(n+"").toString(),n in t.a&&(e=t.a[n],r=bt(e,r,o,i),-1<r&&(gt(e[r]),Array.prototype.splice.call(e,r,1),0==e.length&&(delete t.a[n],t.b--)))):t&&(t=It(t))&&(n=t.a[n.toString()],t=-1,n&&(t=bt(n,r,o,i)),(r=-1<t?n[t]:null)&&Ct(r))}function Ct(e){if("number"!=typeof e&&e&&!e.Z){var t=e.src;if(t&&t[io])yt(t.f,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(Tt(n),r):t.addListener&&t.removeListener&&t.removeListener(r),co--,(n=It(t))?(yt(n,e),0==n.b&&(n.src=null,t[lo]=null)):gt(e)}}}function Tt(e){return e in po?po[e]:po[e]="on"+e}function _t(t,n,r,o){var i=!0;if((t=It(t))&&(n=t.a[n.toString()]))for(n=n.concat(),t=0;t<n.length;t++){var e=n[t];e&&e.capture==r&&!e.Z&&(e=Et(e,o),i=i&&!1!==e)}return i}function Et(e,t){var n=e.listener,r=e.ga||e.src;return e.ba&&Ct(e),n.call(r,t)}function At(t,n){if(t.Z)return!0;if(!no){var r=n||l("window.event");n=new A(r,this);var o=!0;if(!(0>r.keyCode||void 0!=r.returnValue)){a:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break a}catch(e){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=n.a;i;i=i.parentNode)r.push(i);for(t=t.type,i=r.length-1;0<=i;i--){n.a=r[i];var e=_t(r[i],t,!0,n);o=o&&e}for(i=0;i<r.length;i++)n.a=r[i],e=_t(r[i],t,!1,n),o=o&&e}return o}return Et(t,new A(n,this))}function It(e){return e=e[lo],e instanceof ft?e:null}function Nt(e){return h(e)?e:(e[uo]||(e[uo]=function(t){return e.handleEvent(t)}),e[uo])}function Lt(){$.call(this),this.f=new ft(this),this.N=this,this.J=null}function B(t,n,r,o){if(n=t.f.a[n+""],!n)return!0;n=n.concat();for(var i=!0,e=0,s;e<n.length;++e)if(s=n[e],s&&!s.Z&&s.capture==r){var l=s.listener,d=s.ga||s.src;s.ba&&yt(t.f,s),i=!1!==l.call(d,o)&&i}return i&&0!=o.Ra}function Ot(e){return!/^\s*$/.test(e)&&/^[\],:{}\s\u2028\u2029]*$/.test(e.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))}function Mt(e){if(e+="",Ot(e))try{return eval("("+e+")")}catch(e){}throw Error("Invalid JSON string: "+e)}function Dt(e){var t=[];return Pt(new Rt,e,t),t.join("")}function Rt(){}function Pt(t,n,r){if(null==n)r.push("null");else{if("object"==typeof n){if(v(n)){var o=n;n=o.length,r.push("[");for(var i="",e=0;e<n;e++)r.push(i),Pt(t,o[e],r),i=",";return void r.push("]")}if(n instanceof String||n instanceof Number||n instanceof Boolean)n=n.valueOf();else{for(o in r.push("{"),i="",n)Object.prototype.hasOwnProperty.call(n,o)&&(e=n[o],"function"!=typeof e&&(r.push(i),Bt(o,r),r.push(":"),Pt(t,e,r),i=","));return void r.push("}")}}switch(typeof n){case"string":Bt(n,r);break;case"number":r.push(isFinite(n)&&!isNaN(n)?n+"":"null");break;case"boolean":r.push(n+"");break;case"function":r.push("null");break;default:throw Error("Unknown type: "+typeof n);}}}function Bt(e,t){t.push("\"",e.replace(mo,function(e){var t=ho[e];return t||(t="\\u"+(65536|e.charCodeAt(0)).toString(16).substr(1),ho[e]=t),t}),"\"")}function Ft(e,t){this.c=e,this.f=t,this.b=0,this.a=null}function Ut(){this.b=this.a=null}function zt(){var e=yo,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function jt(){this.next=this.b=this.a=null}function qt(e){Mr.setTimeout(function(){throw e},0)}function Vt(){var e=Mr.MessageChannel;if("undefined"==typeof e&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!ot("Presto")&&(e=function(){var e=document.createElement("IFRAME");e.style.display="none",e.src="",document.documentElement.appendChild(e);var t=e.contentWindow;e=t.document,e.open(),e.write(""),e.close();var n="callImmediate"+Math.random(),r="file:"==t.location.protocol?"*":t.location.protocol+"//"+t.location.host;e=j(function(e){("*"==r||e.origin==r)&&e.data==n&&this.port1.onmessage()},this),t.addEventListener("message",e,!1),this.port1={},this.port2={postMessage:function(){t.postMessage(n,r)}}}),"undefined"!=typeof e&&!ot("Trident")&&!ot("MSIE")){var t=new e,n={},r=n;return t.port1.onmessage=function(){if(void 0!==n.next){n=n.next;var e=n.za;n.za=null,e()}},function(e){r.next={za:e},r=r.next,t.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(e){var t=document.createElement("SCRIPT");t.onreadystatechange=function(){t.onreadystatechange=null,t.parentNode.removeChild(t),t=null,e(),e=null},document.documentElement.appendChild(t)}:function(e){Mr.setTimeout(e,0)}}function Wt(){if(-1!=(Mr.Promise+"").indexOf("[native code]")){var e=Mr.Promise.resolve(void 0);xo=function(){e.then(Ht)}}else xo=function(){var e=Ht;!h(Mr.setImmediate)||Mr.Window&&Mr.Window.prototype&&!ot("Edge")&&Mr.Window.prototype.setImmediate==Mr.setImmediate?(bo||(bo=Vt()),bo(e)):Mr.setImmediate(e)}}function Ht(){for(var e;e=zt();){try{e.a.call(e.b)}catch(e){qt(e)}var t=go;t.f(e),100>t.b&&(t.b++,e.next=t.a,t.a=e)}fo=!1}function Kt(e,t){Lt.call(this),this.b=e||1,this.a=t||Mr,this.c=j(this.qb,this),this.g=Dr()}function Gt(e){e.ea=!1,e.O&&(e.a.clearTimeout(e.O),e.O=null)}function Xt(e,t,n){if(h(e))n&&(e=j(e,n));else if(e&&"function"==typeof e.handleEvent)e=j(e.handleEvent,e);else throw Error("Invalid listener argument");return 2147483647<+t?-1:Mr.setTimeout(e,t||0)}function Qt(e,t,n){$.call(this),this.f=null==n?e:j(e,n),this.c=t,this.b=j(this.kb,this),this.a=[]}function Yt(e){e.Y=Xt(e.b,e.c),e.f.apply(null,e.a)}function Jt(e){$.call(this),this.b=e,this.a={}}function $t(t,n,r,o){v(r)||(r&&(vo[0]=r.toString()),r=vo);for(var i=0,e;i<r.length&&(e=xt(n,r[i],o||t.handleEvent,!1,t.b||t),!!e);i++)t.a[e.key]=e}function Zt(e){y(e.a,function(e,t){this.a.hasOwnProperty(t)&&Ct(e)},e),e.a={}}function en(e,t,n){this.reset(e,t,n,void 0,void 0)}function tn(e){this.f=e,this.b=this.c=this.a=null}function nn(e,t){this.name=e,this.value=t}function C(e){return e.c?e.c:e.a?C(e.a):(X("Root logger has no level set."),null)}function rn(e){Ao||(Ao=new tn(""),Eo[""]=Ao,Ao.c=To);var t;if(!(t=Eo[e])){t=new tn(e);var n=e.lastIndexOf("."),r=e.substr(n+1);n=rn(e.substr(0,n)),n.b||(n.b={}),n.b[r]=t,t.a=n,Eo[e]=t}return t}function on(e,t){e&&e.log(wo,t,void 0)}function D(e,t){e&&e.log(Co,t,void 0)}function an(e,t){e&&e.log(_o,t,void 0)}function E(){this.a=rn("goog.labs.net.webChannel.WebChannelDebug"),this.b=!0}function sn(t,n,r,o,i,e){cn(t,function(){if(!t.b)s=e;else if(e){for(var s="",l=e.split("&"),d=0,p;d<l.length;d++)if(p=l[d].split("="),1<p.length){var c=p[0];p=p[1];var u=c.split("_");s=2<=u.length&&"type"==u[1]?s+(c+"="+p+"&"):s+(c+"=redacted&")}}else s=null;return"XMLHTTP REQ ("+o+") [attempt "+i+"]: "+n+"\n"+r+"\n"+s})}function ln(t,n,r,o,i,e,s){cn(t,function(){return"XMLHTTP RESP ("+o+") [ attempt "+i+"]: "+n+"\n"+r+"\n"+e+" "+s})}function dn(e,t,n,r){cn(e,function(){return"XMLHTTP TEXT ("+t+"): "+J(e,n)+(r?" "+r:"")})}function G(e,t){cn(e,function(){return"TIMEOUT: "+t})}function pn(e,t){an(e.a,t)}function H(e,t,n){(e=e.a)&&e.log(So,n||"Exception",t)}function cn(e,t){D(e.a,t)}function F(e,t){(e=e.a)&&e.log(So,t,void 0)}function J(t,n){if(!t.b)return n;if(!n)return null;try{var r=JSON.parse(n);if(r)for(var o=0;o<r.length;o++)if(v(r[o])){var i=r[o];if(!(2>i.length)){var e=i[1];if(v(e)&&!(1>e.length)){var s=e[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var l=1;l<e.length;l++)e[l]=""}}}return Dt(r)}catch(e){return pn(t,"Exception parsing expected JS array - probably was not JS"),n}}function un(e){ht.call(this,"serverreachability",e)}function hn(e){Io.dispatchEvent(new un(Io,e))}function mn(e){ht.call(this,"statevent",e)}function gn(e){Io.dispatchEvent(new mn(Io,e))}function K(e){ht.call(this,"timingevent",e)}function fn(e,t,n){Io.dispatchEvent(new K(Io,e,t,n))}function yn(e,t){if(!h(e))throw Error("Fn must not be null and must be a function");return Mr.setTimeout(function(){e()},t)}function bn(){}function xn(e){var t;return(t=e.a)||(t={},Tn(e)&&(t[0]=!0,t[1]=!0),t=e.a=t),t}function vn(){}function kn(){ht.call(this,"d")}function Sn(){ht.call(this,"c")}function wn(){}function Cn(e){return(e=Tn(e))?new ActiveXObject(e):new XMLHttpRequest}function Tn(e){if(!e.b&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var t=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0,r;n<t.length;n++){r=t[n];try{return new ActiveXObject(r),e.b=r}catch(t){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return e.b}function _n(e,t,n,r){this.i=e,this.b=t,this.c=n,this.T=r||1,this.L=new Jt(this),this.R=Do,e=Hr?125:void 0,this.S=new Kt(e),this.j=null,this.f=!1,this.l=this.g=this.h=this.J=this.D=this.U=this.s=null,this.u=[],this.a=null,this.G=0,this.m=this.o=null,this.C=-1,this.B=!1,this.N=0,this.I=null,this.v=this.X=this.K=!1}function L(e,t){return 0===e?"Non-200 return code ("+t+")":1===e?"XMLHTTP failure (no data)":2===e?"HttpConnection timeout":"Unknown error"}function En(e,t,n){e.J=1,e.h=$n(Q(t)),e.l=n,e.K=!0,In(e,null)}function An(e,t,n,r){e.J=1,e.h=$n(Q(t)),e.l=null,e.K=n,In(e,r)}function In(e,t){e.D=Dr(),Rn(e),e.g=Q(e.h),R(e.g,"t",e.T),e.G=0,e.a=e.i.ca(e.i.ia()?t:null),0<e.N&&(e.I=new Qt(j(e.Sa,e,e.a),e.N)),$t(e.L,e.a,"readystatechange",e.nb),t=e.j?st(e.j):{},e.l?(e.o||(e.o="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.a.fa(e.g,e.o,e.l,t)):(e.o="GET",e.a.fa(e.g,e.o,null,t)),hn(1),sn(e.b,e.o,e.g,e.c,e.T,e.l)}function Nn(t){var n=re(t.a),r=t.a.Ga(),o=t.a.W();if(!(3>n)&&(3!=n||Hr||t.a.V())){t.B||4!=n||7==r||(8==r||0>=o?hn(3):hn(2)),Bn(t);var i=t.a.W();t.C=i,(r=t.a.V())||pn(t.b,function(){return"No response text for uri "+t.g+" status "+i}),t.f=200==i,ln(t.b,t.o,t.g,t.c,t.T,n,i),t.f?((o=Ln(t))&&(dn(t.b,t.c,o,"Initial handshake response via X-HTTP-Initial-Response"),t.v=!0,zn(t,o)),t.K?(On(t,n,r),Hr&&t.f&&3==n&&Mn(t)):(dn(t.b,t.c,r,null),zn(t,r)),4==n&&Un(t),t.f&&!t.B&&(4==n?t.i.ta(t):(t.f=!1,Rn(t)))):(400==i&&0<r.indexOf("Unknown SID")?(t.m=3,gn(12),on(t.b.a,"XMLHTTP Unknown SID ("+t.c+")")):(t.m=0,gn(13),on(t.b.a,"XMLHTTP Bad status "+i+" ("+t.c+")")),Un(t),Fn(t))}}function Ln(e){return!e.X||e.v?null:e.a&&(e=N(e.a,"X-HTTP-Initial-Response"))&&!nt(e)?e:null}function On(t,n,r){for(var o=!0,i;!t.B&&t.G<r.length;)if(i=Dn(t,r),i==Po){4==n&&(t.m=4,gn(14),o=!1),dn(t.b,t.c,null,"[Incomplete Response]");break}else if(i==Ro){t.m=4,gn(15),dn(t.b,t.c,r,"[Invalid Chunk]"),o=!1;break}else dn(t.b,t.c,i,null),zn(t,i);4==n&&0==r.length&&(t.m=1,gn(16),o=!1),t.f=t.f&&o,o||(dn(t.b,t.c,r,"[Invalid Chunked Response]"),Un(t),Fn(t))}function Mn(e){$t(e.L,e.S,"tick",e.mb),e.S.start()}function Dn(e,t){var n=e.G,r=t.indexOf("\n",n);return-1==r?Po:(n=+t.substring(n,r),isNaN(n))?Ro:(r+=1,r+n>t.length)?Po:(t=t.substr(r,n),e.G=r+n,t)}function Rn(e){e.U=Dr()+e.R,Pn(e,e.R)}function Pn(e,t){if(null!=e.s)throw Error("WatchDog timer not null");e.s=yn(j(e.lb,e),t)}function Bn(e){e.s&&(Mr.clearTimeout(e.s),e.s=null)}function Fn(e){e.i.La()||e.B||e.i.ta(e)}function Un(e){Bn(e);var t=e.I;t&&"function"==typeof t.$&&t.$(),e.I=null,Gt(e.S),Zt(e.L),e.a&&(t=e.a,e.a=null,t.abort(),t.$())}function zn(e,t){try{e.i.Oa(e,t),hn(4)}catch(t){H(e.b,t,"Error in httprequest callback")}}function jn(e){if(e.A&&"function"==typeof e.A)return e.A();if(s(e))return e.split("");if(p(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}return at(e)}function qn(t,n){if(t.forEach&&"function"==typeof t.forEach)t.forEach(n,void 0);else if(p(t)||s(t))Br(t,n,void 0);else{if(t.M&&"function"==typeof t.M)var r=t.M();else if(t.A&&"function"==typeof t.A)r=void 0;else if(p(t)||s(t)){r=[];for(var o=t.length,i=0;i<o;i++)r.push(i)}else r=it(t);o=jn(t),i=o.length;for(var e=0;e<i;e++)n.call(void 0,o[e],r&&r[e],t)}}function Vn(e){this.b={},this.a=[],this.c=0;var t=arguments.length;if(1<t){if(t%2)throw Error("Uneven number of arguments");for(var n=0;n<t;n+=2)this.set(arguments[n],arguments[n+1])}else if(e)if(e instanceof Vn)for(t=e.M(),n=0;n<t.length;n++)this.set(t[n],e.get(t[n]));else for(n in e)this.set(n,e[n])}function O(e){e.b={},e.a.length=0,e.c=0}function Wn(e,t){return!!Kn(e.b,t)&&(delete e.b[t],e.c--,e.a.length>2*e.c&&Hn(e),!0)}function Hn(t){if(t.c!=t.a.length){for(var n=0,r=0,o;n<t.a.length;)o=t.a[n],Kn(t.b,o)&&(t.a[r++]=o),n++;t.a.length=r}if(t.c!=t.a.length){var i={};for(r=n=0;n<t.a.length;)o=t.a[n],Kn(i,o)||(t.a[r++]=o,i[o]=1),n++;t.a.length=r}}function Kn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function P(t,n){if(t){t=t.split("&");for(var r=0;r<t.length;r++){var o=t[r].indexOf("="),i=null;if(0<=o){var e=t[r].substring(0,o);i=t[r].substring(o+1)}else e=t[r];n(e,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}function Gn(e,t){this.b=this.j=this.f="",this.i=null,this.g=this.a="",this.h=!1;var n;e instanceof Gn?(this.h=void 0===t?e.h:t,M(this,e.f),this.j=e.j,Xn(this,e.b),Qn(this,e.i),this.a=e.a,Yn(this,lr(e.c)),this.g=e.g):e&&(n=(e+"").match(Bo))?(this.h=!!t,M(this,n[1]||"",!0),this.j=tr(n[2]||""),Xn(this,n[3]||"",!0),Qn(this,n[4]),this.a=tr(n[5]||"",!0),Yn(this,n[6]||"",!0),this.g=tr(n[7]||"")):(this.h=!!t,this.c=new or(null,this.h))}function Q(e){return new Gn(e)}function M(e,t,n){e.f=n?tr(t,!0):t,e.f&&(e.f=e.f.replace(/:$/,""))}function Xn(e,t,n){e.b=n?tr(t,!0):t}function Qn(e,t){if(t){if(t=+t,isNaN(t)||0>t)throw Error("Bad port number "+t);e.i=t}else e.i=null}function Yn(e,t,n){t instanceof or?(e.c=t,pr(e.c,e.h)):(n||(t=nr(t,jo)),e.c=new or(t,e.h))}function Jn(e,t,n){e.c.set(t,n)}function R(e,t,n){v(n)||(n=[n+""]),sr(e.c,t,n)}function $n(e){return Jn(e,"zx",o(2147483648*Math.random()).toString(36)+Math.abs(o(2147483648*Math.random())^Dr()).toString(36)),e}function Zn(e){return e instanceof Gn?Q(e):new Gn(e,void 0)}function er(t,n,r,o){var i=new Gn(null,void 0);return t&&M(i,t),n&&Xn(i,n),r&&Qn(i,r),o&&(i.a=o),i}function tr(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function nr(e,t,n){return s(e)?(e=encodeURI(e).replace(t,rr),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function rr(e){return e=e.charCodeAt(0),"%"+(15&e>>4).toString(16)+(15&e).toString(16)}function or(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function ar(e){e.a||(e.a=new Vn,e.b=0,e.c&&P(e.c,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function S(e,t){ar(e),t=dr(e,t),Kn(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,Wn(e.a,t))}function ir(e,t){return ar(e),t=dr(e,t),Kn(e.a.b,t)}function sr(e,t,n){S(e,t),0<n.length&&(e.c=null,e.a.set(dr(e,t),tt(n)),e.b+=n.length)}function lr(e){var t=new or;return t.c=e.c,e.a&&(t.a=new Vn(e.a),t.b=e.b),t}function dr(e,t){return t+="",e.f&&(t=t.toLowerCase()),t}function pr(e,t){t&&!e.f&&(ar(e),e.c=null,e.a.forEach(function(e,t){var n=t.toLowerCase();t!=n&&(S(this,t),sr(this,n,e))},e)),e.f=t}function cr(){this.a=Dr()}function ur(){Vo||(Vo=new cr)}function hr(){Vo||(Vo=new cr)}function mr(e,t){this.a=e,this.b=t,this.c=this.i=null,this.h=!1,this.m=null,this.f=-1,this.l=this.g=null}function gr(t){pn(t.b,"TestConnection: starting stage 2");var n=t.a.I.a;if(null!=n)pn(t.b,function(){return"Buffered"}),gn(4),n?(gn(10),Le(t.a,t,!1)):(gn(11),Le(t.a,t,!0));else{t.c=new _n(t,t.b,void 0,void 0),t.c.j=t.i;var r=Me(t.a,t.g,t.m);gn(4),R(r,"TYPE","xmlhttp");var o=t.a.j,i=t.a.K;o&&i&&Jn(r,o,i),An(t.c,r,!1,t.g)}}function fr(){this.a=this.b=null}function yr(){this.a=new Vn}function br(e){var t=typeof e;return"object"==t&&e||"function"==t?"o"+(e[k]||(e[k]=++q)):t.charAt(0)+e}function xr(e,t){this.a=e,this.b=t}function vr(e){this.g=e||Wo,Mr.PerformanceNavigationTiming?(e=Mr.performance.getEntriesByType("navigation"),e=0<e.length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol)):e=!!(Mr.oa&&Mr.oa.Ma&&Mr.oa.Ma()&&Mr.oa.Ma().Jb),this.f=e?this.g:1,this.a=null,1<this.f&&(this.a=new yr),this.b=null,this.c=[]}function kr(e,t){e.a||-1==t.indexOf("spdy")&&-1==t.indexOf("quic")&&-1==t.indexOf("h2")||(e.f=e.g,e.a=new yr,e.b&&(ee(e,e.b),e.b=null))}function be(e){return!!e.b||!!e.a&&e.a.a.c>=e.f}function de(e,t){return e.b?e=e.b==t:e.a?(t=br(t),e=Kn(e.a.a.b,t)):e=!1,e}function ee(e,t){e.a?e.a.add(t):e.b=t}function ce(e,t){if(e.b&&e.b==t)e.b=null;else{var n;(n=e.a)&&(n=br(t),n=Kn(e.a.a.b,n)),n&&Wn(e.a.a,br(t))}}function fe(e){if(null!=e.b)return e.c.concat(e.b.u);if(null!=e.a&&0!=e.a.a.c){var t=e.c;return Br(e.a.A(),function(e){t=t.concat(e.u)}),t}return tt(e.c)}function ge(e,t){e.c=e.c.concat(t)}function he(){}function ie(){this.a=new he}function je(e,t,n){var r=n||"";try{qn(e,function(n,o){var i=n;_(n)&&(i=Dt(n)),t.push(r+o+"="+encodeURIComponent(i))})}catch(n){throw t.push(r+"type="+encodeURIComponent("_badmap")),n}}function ke(e,t){var n=new E;pn(n,"TestLoadImage: loading "+e);var r=new Image;r.onload=f(le,n,r,"TestLoadImage: loaded",!0,t),r.onerror=f(le,n,r,"TestLoadImage: error",!1,t),r.onabort=f(le,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=f(le,n,r,"TestLoadImage: timeout",!1,t),Mr.setTimeout(function(){r.ontimeout&&r.ontimeout()},1E4),r.src=e}function le(t,n,r,o,i){try{pn(t,r),n.onload=null,n.onerror=null,n.onabort=null,n.ontimeout=null,i(o)}catch(e){H(t,e)}}function me(e){Lt.call(this),this.headers=new Vn,this.s=e||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=ae,this.v=this.o=!1}function T(e){return Vr&&ut(9)&&"number"==typeof e.timeout&&void 0!==e.ontimeout}function se(e){return"content-type"==e.toLowerCase()}function Sr(e,t){e.c=!1,e.a&&(e.h=!0,e.a.abort(),e.h=!1),e.g=t,e.j=5,qe(e),ve(e)}function qe(e){e.G||(e.G=!0,e.dispatchEvent("complete"),e.dispatchEvent("error"))}function te(t){if(t.c&&"undefined"!=typeof Or)if(t.D[1]&&4==re(t)&&2==t.W())an(t.b,wr(t,"Local request error detected and ignored"));else if(t.u&&4==re(t))Xt(t.Na,0,t);else if(t.dispatchEvent("readystatechange"),4==re(t)){an(t.b,wr(t,"Request complete")),t.c=!1;try{var n=t.W();a:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break a;default:r=!1;}var o;if(!(o=r)){var i;if(i=0===n){var e=(t.B+"").match(Bo)[1]||null;if(!e&&Mr.self&&Mr.self.location){var s=Mr.self.location.protocol;e=s.substr(0,s.length-1)}i=!ne.test(e?e.toLowerCase():"")}o=i}o?(t.dispatchEvent("complete"),t.dispatchEvent("success")):(t.j=6,t.g=t.Ha()+" ["+t.W()+"]",qe(t))}finally{ve(t)}}}function ve(t,e){if(t.a){ue(t);var r=t.a,o=t.D[0]?n:null;t.a=null,t.D=null,e||t.dispatchEvent("ready");try{r.onreadystatechange=o}catch(n){(t=t.b)&&t.log(So,"Problem encountered resetting onreadystatechange: "+n.message,void 0)}}}function ue(e){e.a&&e.v&&(e.a.ontimeout=null),e.C&&(Mr.clearTimeout(e.C),e.C=null)}function re(e){return e.a?e.a.readyState:0}function N(e,t){return e.a?e.a.getResponseHeader(t):null}function wr(e,t){return t+" ["+e.K+" "+e.B+" "+e.W()+"]"}function U(e){var t="";return y(e,function(e,n){t+=n,t+=":",t+=e,t+="\r\n"}),t}function we(t,n,r){a:{for(o in r){var o=!1;break a}o=!0}if(o)return t;if(r=U(r),s(t)){if(n=encodeURIComponent(n+""),r=null==r?"":"="+encodeURIComponent(r+""),n+=r){if(r=t.indexOf("#"),0>r&&(r=t.length),o=t.indexOf("?"),0>o||o>r){o=r;var i=""}else i=t.substring(o+1,r);t=[t.substr(0,o),i,t.substr(r)],r=t[1],t[1]=n?r?r+"&"+n:n:r,t=t[0]+(t[1]?"?"+t[1]:"")+t[2]}return t}return Jn(t,n,r),t}function xe(e){this.ya=0,this.g=[],this.a=new E,this.I=new fr,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=!!l("internalChannelParams.failFast",e),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=l("internalChannelParams.baseRetryDelayMs",e)||5E3,this.$a=l("internalChannelParams.retryDelaySeedMs",e)||1E4,this.Ya=l("internalChannelParams.forwardChannelMaxRetries",e)||2,this.wa=l("internalChannelParams.forwardChannelRequestTimeoutMs",e)||2E4,this.Ta=e&&e.Kb||void 0,this.G=void 0,this.S=e&&e.supportsCrossDomainXhr||!1,this.J="",this.c=new vr(e&&e.concurrentRequestLimit),this.la=new ie,this.o=e&&void 0!==e.backgroundChannelTest?e.backgroundChannelTest:!0,(this.va=e&&e.fastHandshake||!1)&&!this.o&&(on(this.a.a,"Force backgroundChannelTest when fastHandshake is enabled."),this.o=!0),e&&e.Fa&&this.a.Fa()}function ye(e){if(pn(e.a,"disconnect()"),ze(e),3==e.F){var t=e.R++,n=Q(e.D);Jn(n,"SID",e.J),Jn(n,"RID",t),Jn(n,"TYPE","terminate"),Je(e,n),t=new _n(e,e.a,t,void 0),t.J=2,t.h=$n(Q(n)),n=!1,Mr.navigator&&Mr.navigator.sendBeacon&&(n=Mr.navigator.sendBeacon(t.h.toString(),"")),!n&&Mr.Image&&(new Image().src=t.h,n=!0),n||(t.a=t.i.ca(null),t.a.fa(t.h)),t.D=Dr(),Rn(t)}V(e)}function ze(e){e.C&&(e.C.abort(),e.C=null),e.b&&(e.b.cancel(),e.b=null),e.l&&(Mr.clearTimeout(e.l),e.l=null),Tr(e),e.c.cancel(),e.m&&(Mr.clearTimeout(e.m),e.m=null)}function Ae(e,t){1E3==e.g.length&&F(e.a,function(){return"Already have 1000 queued maps upon queueing "+Dt(t)}),e.g.push(new xr(e.Za++,t)),3==e.F&&Ee(e)}function Ee(e){be(e.c)||e.m||(e.m=yn(j(e.Qa,e),0),e.v=0)}function Fe(e,t){var n=e.c;return(n.b?1:n.a?n.a.a.c:0)>=e.c.f-(e.m?1:0)?(F(e.a,"Unexpected retry request is scheduled."),!1):e.m?(pn(e.a,"Use the retry request that is already scheduled."),e.g=t.u.concat(e.g),!0):1==e.F||2==e.F||e.v>=(e.Xa?0:e.Ya)?!1:(pn(e.a,"Going to retry POST"),e.m=yn(j(e.Qa,e,t),De(e,e.v)),e.v++,!0)}function Ge(e,t){var n=t?t.c:e.R++;var o=Q(e.D);Jn(o,"SID",e.J),Jn(o,"RID",n),Jn(o,"AID",e.N),Je(e,o),e.h&&e.i&&we(o,e.h,e.i),n=new _n(e,e.a,n,e.v+1),null===e.h&&(n.j=e.i),t&&(e.g=t.u.concat(e.g)),t=Be(e,n),n.setTimeout(r(.5*e.wa)+r(.5*e.wa*Math.random())),ee(e.c,n),En(n,o,t)}function Je(e,t){e.f&&qn({},function(e,n){Jn(t,n,e)})}function Be(t,n){var r=Math.min(t.g.length,1E3),o=t.f?j(t.f.ab,t.f,t):null;a:for(var s=t.g,e=-1,l;;){l=["count="+r],-1==e?0<r?(e=s[0].a,l.push("ofs="+e)):e=0:l.push("ofs="+e);for(var d=!0,p=0;p<r;p++){var c=s[p].a,u=s[p].b;if(c-=e,0>c)e=i(0,s[p].a-100),d=!1;else try{je(u,l,"req"+c+"_")}catch(e){o&&o(u)}}if(d){o=l.join("&");break a}}return t=t.g.splice(0,r),n.u=t,o}function Ie(e){if(!e.b&&!e.l){e.T=1;var t=e.Pa;xo||Wt(),fo||(xo(),fo=!0),yo.add(t,e),e.B=0}}function Ke(e){return e.b||e.l?(F(e.a,"Request already in progress"),!1):!(3<=e.B)&&(pn(e.a,"Going to retry GET"),e.T++,e.l=yn(j(e.Pa,e),De(e,e.B)),e.B++,!0)}function Le(e,t,n){pn(e.a,"Test Connection Finished");var r=t.l;r&&kr(e.c,r),e.ka=n,e.u=t.f,pn(e.a,"connectChannel_()"),e.D=Ce(e,e.ja),Ee(e)}function Cr(e,t){pn(e.a,"Test Connection Failed"),e.u=t.f,He(e,2)}function Tr(e){null!=e.s&&(Mr.clearTimeout(e.s),e.s=null)}function De(e,t){var n=e.Wa+o(Math.random()*e.$a);return e.qa()||(pn(e.a,"Inactive channel"),n*=2),n*t}function He(e,t){if(cn(e.a,"Error code "+t),2==t){var n=null;e.f&&(n=null);var r=j(e.pb,e);n||(n=new Gn("//www.google.com/images/cleardot.gif"),Mr.location&&"http"==Mr.location.protocol||M(n,"https"),$n(n)),ke(n.toString(),r)}else gn(2);pn(e.a,"HttpChannel: error - "+t),e.F=0,e.f&&e.f.Ba(t),V(e),ze(e)}function V(e){if(e.F=0,e.u=-1,e.f){var t=fe(e.c);(0!=t.length||0!=e.g.length)&&(pn(e.a,function(){return"Number of undelivered maps, pending: "+t.length+", outgoing: "+e.g.length}),e.c.c.length=0,tt(e.g),e.g.length=0),e.f.Aa()}}function Ce(e,t){return t=_r(e,null,t),pn(e.a,"GetForwardChannelUri: "+t),t}function Me(e,t,n){return t=_r(e,e.ia()?t:null,n),pn(e.a,"GetBackChannelUri: "+t),t}function _r(t,n,r){var o=Zn(r);if(""!=o.b)n&&Xn(o,n+"."+o.b),Qn(o,o.i);else{var i=Mr.location,e;e=n?n+"."+i.hostname:i.hostname,o=er(i.protocol,e,i.port,r)}return t.U&&y(t.U,function(e,t){Jn(o,t,e)}),n=t.j,r=t.K,n&&r&&Jn(o,n,r),Jn(o,"VER",t.na),Je(t,o),o}function Ne(){}function Oe(){for(var t=arguments[0],n=1,r;n<arguments.length;n++)if(r=arguments[n],0==r.lastIndexOf("/",0))t=r;else{var o;(o=""==t)||(o=t.length-1,o=0<=o&&t.indexOf("/",o)==o),t+=o?r:"/"+r}return t}function Pe(){if(Vr&&!(10<=+eo))throw Error("Environmental error: no available transport.")}function Qe(e,t){Lt.call(this),this.a=new xe(t),this.b=e,this.o=t&&t.testUrl?t.testUrl:Oe(this.b,"test"),this.c=rn("goog.labs.net.webChannel.WebChannelBaseTransport"),this.g=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.a.i=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.Ea&&(e?e["X-WebChannel-Client-Profile"]=t.Ea:e={"X-WebChannel-Client-Profile":t.Ea}),this.a.L=e,(e=t&&t.httpHeadersOverwriteParam)&&!nt(e)&&(this.a.h=e),this.l=t&&t.supportsCrossDomainXhr||!1,this.j=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!nt(t)&&(this.a.j=t,e=this.g,null!==e&&t in e&&(e=this.g,t in e&&delete e[t],on(this.c,"Ignore httpSessionIdParam also specified with messageUrlParams: "+t))),this.h=new Te(this)}function W(e){kn.call(this);var t=e.__sm__;if(t){a:{for(var n in t){e=n;break a}e=void 0}(this.c=e)?(e=this.c,this.data=null!==t&&e in t?t[e]:void 0):this.data=t}else this.data=e}function Se(){Sn.call(this),this.status=1}function Te(e){this.a=e}function Re(){this.b=[],this.a=[]}function Ve(e){return 0==e.b.length&&(e.b=e.a,e.b.reverse(),e.a=[]),e.b.pop()}function We(e){return e.b.length+e.a.length}function Xe(e,t){if($.call(this),this.h=e||0,this.c=t||10,this.h>this.c)throw Error(Ho);this.a=new Re,this.b=new yr,this.g=null,this.aa()}function Ye(e){if("function"==typeof e.$)e.$();else for(var t in e)e[t]=null}function Er(e){return We(e.a)+e.b.a.c}function $e(e,t){this.a=e,this.b=t}function Ar(e){if(this.a=[],e)a:{if(e instanceof Ar){var t=e.M();if(e=e.A(),0>=this.a.length){for(var n=this.a,r=0;r<t.length;r++)n.push(new $e(t[r],e[r]));break a}}else t=it(e),e=at(e);for(r=0;r<t.length;r++)Ir(this,t[r],e[r])}}function Ir(e,t,n){var r=e.a;for(r.push(new $e(t,n)),t=r.length-1,e=e.a,n=e[t];0<t&&(r=t-1>>1,e[r].a>n.a);)e[t]=e[r],t=r;e[t]=n}function Nr(){Ar.call(this)}function Lr(e,t){this.f=new Nr,Xe.call(this,e,t)}function Y(e,t,n,r){this.l=e,this.j=!!r,Lr.call(this,t,n)}var Or=Or||{},Mr=this,k="closure_uid_"+(1E9*Math.random()>>>0),q=0,Dr=Date.now||function(){return+new Date},t;b(u,Error),u.prototype.name="CustomError",b(I,u),I.prototype.name="AssertionError";var g=0,Rr={};$.prototype.i=!1,$.prototype.$=function(){},$.prototype.w=function(){if(this.m)for(;this.m.length;)this.m.shift()()};var Pr=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if(s(e))return s(t)&&1==t.length?e.indexOf(t,0):-1;for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},Br=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(t,n,r){for(var o=t.length,i=s(t)?t.split(""):t,e=0;e<o;e++)e in i&&n.call(r,i[e],e,t)},Fr=String.prototype.trim?function(e){return e.trim()}:function(e){return /^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},Ur;a:{var x=Mr.navigator;if(x){var zr=x.userAgent;if(zr){Ur=zr;break a}}Ur=""}var jr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];dt[" "]=n;var qr=ot("Opera"),Vr=ot("Trident")||ot("MSIE"),Wr=ot("Edge"),Hr=Wr||Vr,Kr=ot("Gecko")&&(-1==Ur.toLowerCase().indexOf("webkit")||ot("Edge"))&&!(ot("Trident")||ot("MSIE"))&&!ot("Edge"),Gr=-1!=Ur.toLowerCase().indexOf("webkit")&&!ot("Edge"),Xr;a:{var Qr="",Yr=function(){var e=Ur;return Kr?/rv:([^\);]+)(\)|;)/.exec(e):Wr?/Edge\/([\d\.]+)/.exec(e):Vr?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):Gr?/WebKit\/(\S+)/.exec(e):qr?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(Yr&&(Qr=Yr?Yr[1]:""),Vr){var Jr=ct();if(null!=Jr&&Jr>parseFloat(Qr)){Xr=Jr+"";break a}}Xr=Qr}var $r={},Zr=Mr.document,eo;eo=Zr&&Vr?ct()||("CSS1Compat"==Zr.compatMode?parseInt(Xr,10):5):void 0;var to=Object.freeze||function(e){return e},no=!Vr||9<=+eo,ro=Vr&&!ut("9"),oo=function(){if(!Mr.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});return Mr.addEventListener("test",n,t),Mr.removeEventListener("test",n,t),e}();ht.prototype.b=function(){this.Ra=!1},b(A,ht);var ao=to({2:"touch",3:"pen",4:"mouse"});A.prototype.b=function(){A.H.b.call(this);var e=this.c;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,ro)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(e){}};var io="closure_listenable_"+(0|1E6*Math.random()),so=0;ft.prototype.add=function(t,n,r,o,i){var e=t.toString();t=this.a[e],t||(t=this.a[e]=[],this.b++);var s=bt(t,n,o,i);return-1<s?(n=t[s],r||(n.ba=!1)):(n=new mt(n,this.src,e,!!o,i),n.ba=r,t.push(n)),n};var lo="closure_lm_"+(0|1E6*Math.random()),po={},co=0,uo="__closure_events_fn_"+(1E9*Math.random()>>>0);b(Lt,$),Lt.prototype[io]=!0,t=Lt.prototype,t.addEventListener=function(e,t,n,r){xt(this,e,t,n,r)},t.removeEventListener=function(e,t,n,r){wt(this,e,t,n,r)},t.dispatchEvent=function(t){var n=this.J,r;if(n)for(r=[];n;n=n.J)r.push(n);n=this.N;var o=t.type||t;if(s(t))t=new ht(t,n);else if(t instanceof ht)t.target=t.target||n;else{var i=t;t=new ht(o,n),lt(t,i)}if(i=!0,r)for(var e=r.length-1,l;0<=e;e--)l=t.a=r[e],i=B(l,o,!0,t)&&i;if(l=t.a=n,i=B(l,o,!0,t)&&i,i=B(l,o,!1,t)&&i,r)for(e=0;e<r.length;e++)l=t.a=r[e],i=B(l,o,!1,t)&&i;return i},t.w=function(){if(Lt.H.w.call(this),this.f){var t=this.f,n=0,r;for(r in t.a){for(var o=t.a[r],i=0;i<o.length;i++)++n,gt(o[i]);delete t.a[r],t.b--}}this.J=null},t.Ia=function(e,t,n,r){return this.f.add(e+"",t,!1,n,r)},t.Ja=function(e,t,n,r){return this.f.add(e+"",t,!0,n,r)};var ho={'"':"\\\"","\\":"\\\\","/":"\\/","":"\\b","":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","":"\\u000b"},mo=/\uffff/.test("\uFFFF")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;Ft.prototype.get=function(){if(0<this.b){this.b--;var e=this.a;this.a=e.next,e.next=null}else e=this.c();return e};var go=new Ft(function(){return new jt},function(e){e.reset()});Ut.prototype.add=function(e,t){var n=go.get();n.set(e,t),this.b?this.b.next=n:this.a=n,this.b=n},jt.prototype.set=function(e,t){this.a=e,this.b=t,this.next=null},jt.prototype.reset=function(){this.next=this.b=this.a=null};var fo=!1,yo=new Ut,bo,xo;b(Kt,Lt),t=Kt.prototype,t.ea=!1,t.O=null,t.qb=function(){if(this.ea){var e=Dr()-this.g;0<e&&e<.8*this.b?this.O=this.a.setTimeout(this.c,this.b-e):(this.O&&(this.a.clearTimeout(this.O),this.O=null),this.dispatchEvent("tick"),this.ea&&(this.O=this.a.setTimeout(this.c,this.b),this.g=Dr()))}},t.start=function(){this.ea=!0,this.O||(this.O=this.a.setTimeout(this.c,this.b),this.g=Dr())},t.w=function(){Kt.H.w.call(this),Gt(this),delete this.a},b(Qt,$),t=Qt.prototype,t.ha=!1,t.Y=null,t.cb=function(){this.a=arguments,this.Y?this.ha=!0:Yt(this)},t.w=function(){Qt.H.w.call(this),this.Y&&(Mr.clearTimeout(this.Y),this.Y=null,this.ha=!1,this.a=[])},t.kb=function(){this.Y=null,this.ha&&(this.ha=!1,Yt(this))},b(Jt,$);var vo=[];Jt.prototype.w=function(){Jt.H.w.call(this),Zt(this)},Jt.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},en.prototype.a=null;var ko=0;en.prototype.reset=function(t,n,r,o,i){"number"==typeof i||ko++,o||Dr(),delete this.a},nn.prototype.toString=function(){return this.name};var So=new nn("SEVERE",1E3),wo=new nn("WARNING",900),Co=new nn("INFO",800),To=new nn("CONFIG",700),_o=new nn("FINE",500);tn.prototype.log=function(e,t,n){if(e.value>=C(this).value)for(h(t)&&(t=t()),e=new en(e,t+"",this.f),n&&(e.a=n),n=this;n;)n=n.a};var Eo={},Ao=null;E.prototype.Fa=function(){this.b=!1};var Io=new Lt;b(un,ht),b(mn,ht),b(K,ht);var No={NO_ERROR:0,rb:1,yb:2,xb:3,ub:4,wb:5,zb:6,Ua:7,TIMEOUT:8,Cb:9},Lo={tb:"complete",Gb:"success",Va:"error",Ua:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",vb:"downloadprogress",Hb:"uploadprogress"};bn.prototype.a=null;var Oo={OPEN:"a",sb:"b",Va:"c",Bb:"d"};b(kn,ht),b(Sn,ht);var Mo;b(wn,bn),Mo=new wn;var Do=45E3,Ro={},Po={};t=_n.prototype,t.setTimeout=function(e){this.R=e},t.nb=function(e){e=e.target;var t=this.I;t&&3==re(e)?(pn(this.b,"Throttling readystatechange."),t.cb()):this.Sa(e)},t.Sa=function(e){try{e==this.a?Nn(this):on(this.b.a,"Called back with an unexpected xmlhttp")}catch(e){if(pn(this.b,"Failed call to OnXmlHttpReadyStateChanged_"),this.a&&this.a.V()){var t=this;H(this.b,e,function(){return"ResponseText: "+t.a.V()})}else H(this.b,e,"No response text")}finally{}},t.mb=function(){if(this.a){var e=re(this.a),t=this.a.V();this.G<t.length&&(Bn(this),On(this,e,t),this.f&&4!=e&&Rn(this))}},t.cancel=function(){this.B=!0,Un(this)},t.lb=function(){this.s=null;var e=Dr();0<=e-this.U?(this.f&&F(this.b,"Received watchdog timeout even though request loaded successfully"),G(this.b,this.g),2!=this.J&&(hn(3),gn(17)),Un(this),this.m=2,Fn(this)):(on(this.b.a,"WatchDog timer called too early"),Pn(this,this.U-e))},t=Vn.prototype,t.A=function(){Hn(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.b[this.a[t]]);return e},t.M=function(){return Hn(this),this.a.concat()},t.get=function(e,t){return Kn(this.b,e)?this.b[e]:t},t.set=function(e,t){Kn(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},t.forEach=function(t,n){for(var r=this.M(),o=0;o<r.length;o++){var i=r[o],e=this.get(i);t.call(n,e,i,this)}};var Bo=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;Gn.prototype.toString=function(){var e=[],t=this.f;t&&e.push(nr(t,Fo,!0),":");var n=this.b;return(n||"file"==t)&&(e.push("//"),(t=this.j)&&e.push(nr(t,Fo,!0),"@"),e.push(encodeURIComponent(n+"").replace(/%25([0-9a-fA-F]{2})/g,"%$1")),n=this.i,null!=n&&e.push(":",n+"")),(n=this.a)&&(this.b&&"/"!=n.charAt(0)&&e.push("/"),e.push(nr(n,"/"==n.charAt(0)?zo:Uo,!0))),(n=this.c.toString())&&e.push("?",n),(n=this.g)&&e.push("#",nr(n,qo)),e.join("")},Gn.prototype.resolve=function(t){var n=Q(this),r=!!t.f;r?M(n,t.f):r=!!t.j,r?n.j=t.j:r=!!t.b,r?Xn(n,t.b):r=null!=t.i;var o=t.a;if(r)Qn(n,t.i);else if(r=!!t.a){if("/"!=o.charAt(0))if(this.b&&!this.a)o="/"+o;else{var i=n.a.lastIndexOf("/");-1!=i&&(o=n.a.substr(0,i+1)+o)}if(i=o,".."==i||"."==i)o="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){o=0==i.lastIndexOf("/",0),i=i.split("/");for(var e=[],s=0,l;s<i.length;)l=i[s++],"."==l?o&&s==i.length&&e.push(""):".."==l?((1<e.length||1==e.length&&""!=e[0])&&e.pop(),o&&s==i.length&&e.push("")):(e.push(l),o=!0);o=e.join("/")}else o=i}return r?n.a=o:r=""!==t.c.toString(),r?Yn(n,lr(t.c)):r=!!t.g,r&&(n.g=t.g),n};var Fo=/[#\/\?@]/g,Uo=/[#\?:]/g,zo=/[#\?]/g,jo=/[#\?@]/g,qo=/#/g;t=or.prototype,t.add=function(e,t){ar(this),this.c=null,e=dr(this,e);var n=this.a.get(e);return n||this.a.set(e,n=[]),n.push(t),this.b+=1,this},t.forEach=function(e,t){ar(this),this.a.forEach(function(n,r){Br(n,function(n){e.call(t,n,r,this)},this)},this)},t.M=function(){ar(this);for(var t=this.a.A(),n=this.a.M(),r=[],o=0;o<n.length;o++)for(var i=t[o],e=0;e<i.length;e++)r.push(n[o]);return r},t.A=function(e){ar(this);var t=[];if(s(e))ir(this,e)&&(t=et(t,this.a.get(dr(this,e))));else{e=this.a.A();for(var n=0;n<e.length;n++)t=et(t,e[n])}return t},t.set=function(e,t){return ar(this),this.c=null,e=dr(this,e),ir(this,e)&&(this.b-=this.a.get(e).length),this.a.set(e,[t]),this.b+=1,this},t.get=function(e,t){return e=e?this.A(e):[],0<e.length?e[0]+"":t},t.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],n=this.a.M(),r=0;r<n.length;r++){var o=n[r],i=encodeURIComponent(o+"");o=this.A(o);for(var e=0,s;e<o.length;e++)s=i,""!==o[e]&&(s+="="+encodeURIComponent(o[e]+"")),t.push(s)}return this.c=t.join("&")};var Vo=null;cr.prototype.set=function(e){this.a=e},cr.prototype.reset=function(){this.set(Dr())},cr.prototype.get=function(){return this.a},b(hr,ur),t=mr.prototype,t.P=null,t.ca=function(e){return this.a.ca(e)},t.abort=function(){this.c&&(this.c.cancel(),this.c=null),this.f=-1},t.La=function(){return!1},t.Oa=function(e,t){if(this.f=e.C,0==this.P){if(pn(this.b,"TestConnection: Got data for stage 1"),!this.a.o&&(e=e.a)){var n=N(e,"X-Client-Wire-Protocol");this.l=n?n:null,this.a.j&&((e=N(e,"X-HTTP-Session-Id"))?this.a.K=e:on(this.b.a,"Missing X_HTTP_SESSION_ID in the handshake response"))}if(t){try{var r=this.a.la.a.parse(t)}catch(t){return H(this.b,t),void Cr(this.a,this)}this.g=r[0]}else pn(this.b,"TestConnection: Null responseText"),Cr(this.a,this)}else 1==this.P&&(this.h?gn(6):"11111"==t?(gn(5),this.h=!0,!Vr||10<=+eo)&&(this.f=200,this.c.cancel(),pn(this.b,"Test connection succeeded; using streaming connection"),gn(11),Le(this.a,this,!0)):(gn(7),this.h=!1))},t.ta=function(){this.f=this.c.C,this.c.f?0==this.P?(this.P=1,pn(this.b,"TestConnection: request complete for initial check"),gr(this)):1==this.P&&(pn(this.b,"TestConnection: request complete for stage 2"),this.h?(pn(this.b,"Test connection succeeded; using streaming connection"),gn(11),Le(this.a,this,!0)):(pn(this.b,"Test connection failed; not using streaming"),gn(10),Le(this.a,this,!1))):(pn(this.b,"TestConnection: request failed, in state "+this.P),0==this.P?gn(8):1==this.P&&gn(9),Cr(this.a,this))},t.ia=function(){return this.a.ia()},t.qa=function(){return this.a.qa()},yr.prototype.add=function(e){this.a.set(br(e),e)},yr.prototype.A=function(){return this.a.A()};var Wo=10;vr.prototype.cancel=function(){this.c=fe(this),this.b?(this.b.cancel(),this.b=null):this.a&&0!=this.a.a.c&&(Br(this.a.A(),function(e){e.cancel()}),O(this.a.a))},he.prototype.stringify=function(e){return Mr.JSON.stringify(e,void 0)},he.prototype.parse=function(e){return Mr.JSON.parse(e,void 0)},b(me,Lt);var ae="";me.prototype.b=rn("goog.net.XhrIo");var ne=/^https?$/i,oe=["POST","PUT"];t=me.prototype,t.fa=function(t,n,r,o){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+t);n=n?n.toUpperCase():"GET",this.B=t,this.g="",this.j=0,this.K=n,this.G=!1,this.c=!0,this.a=this.s?Cn(this.s):Cn(Mo),this.D=this.s?xn(this.s):xn(Mo),this.a.onreadystatechange=j(this.Na,this);try{an(this.b,wr(this,"Opening Xhr")),this.I=!0,this.a.open(n,t+"",!0),this.I=!1}catch(e){return an(this.b,wr(this,"Error opening Xhr: "+e.message)),void Sr(this,e)}t=r||"";var i=new Vn(this.headers);o&&qn(o,function(e,t){i.set(t,e)}),o=w(i.M()),r=Mr.FormData&&t instanceof Mr.FormData,!(0<=Pr(oe,n))||o||r||i.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),i.forEach(function(e,t){this.a.setRequestHeader(t,e)},this),this.L&&(this.a.responseType=this.L),"withCredentials"in this.a&&this.a.withCredentials!==this.o&&(this.a.withCredentials=this.o);try{ue(this),0<this.l&&(this.v=T(this.a),an(this.b,wr(this,"Will abort after "+this.l+"ms if incomplete, xhr2 "+this.v)),this.v?(this.a.timeout=this.l,this.a.ontimeout=j(this.Ka,this)):this.C=Xt(this.Ka,this.l,this)),an(this.b,wr(this,"Sending request")),this.u=!0,this.a.send(t),this.u=!1}catch(e){an(this.b,wr(this,"Send error: "+e.message)),Sr(this,e)}},t.Ka=function(){"undefined"!=typeof Or&&this.a&&(this.g="Timed out after "+this.l+"ms, aborting",this.j=8,an(this.b,wr(this,this.g)),this.dispatchEvent("timeout"),this.abort(8))},t.abort=function(e){this.a&&this.c&&(an(this.b,wr(this,"Aborting")),this.c=!1,this.h=!0,this.a.abort(),this.h=!1,this.j=e||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ve(this))},t.w=function(){this.a&&(this.c&&(this.c=!1,this.h=!0,this.a.abort(),this.h=!1),ve(this,!0)),me.H.w.call(this)},t.Na=function(){this.i||(this.I||this.u||this.h?te(this):this.jb())},t.jb=function(){te(this)},t.W=function(){try{return 2<re(this)?this.a.status:-1}catch(e){return-1}},t.Ha=function(){try{return 2<re(this)?this.a.statusText:""}catch(e){return an(this.b,"Can not get status: "+e.message),""}},t.V=function(){try{return this.a?this.a.responseText:""}catch(e){return an(this.b,"Can not get responseText: "+e.message),""}},t.eb=function(e){if(this.a){var t=this.a.responseText;e&&0==t.indexOf(e)&&(t=t.substring(e.length));a:{if(e=t,Mr.JSON)try{var n=Mr.JSON.parse(e);break a}catch(e){}n=Mt(e)}return n}},t.Ga=function(){return this.j},t.hb=function(){return s(this.g)?this.g:this.g+""},t=xe.prototype,t.na=8,t.F=1,t.La=function(){return 0==this.F},t.Qa=function(t){if(this.m=null,pn(this.a,"startForwardChannel_"),1!=this.F)3==this.F&&(t?Ge(this,t):0==this.g.length?pn(this.a,"startForwardChannel_ returned: nothing to send"):be(this.c)?F(this.a,"startForwardChannel_ returned: connection already in progress"):(Ge(this),pn(this.a,"startForwardChannel_ finished, sent request")));else if(t)F(this.a,"Not supposed to retry the open");else{pn(this.a,"open_()"),this.R=o(1E5*Math.random()),t=this.R++;var n=new _n(this,this.a,t,void 0),r=this.i;this.L&&(r?(r=st(r),lt(r,this.L)):r=this.L),null===this.h&&(n.j=r);var i=Be(this,n),s=Q(this.D);Jn(s,"RID",t),Jn(s,"CVER",22),this.o&&this.j&&Jn(s,"X-HTTP-Session-Id",this.j),Je(this,s),this.h&&r&&we(s,this.h,r),ee(this.c,n),this.va?(Jn(s,"$req",i),Jn(s,"SID","null"),n.X=!0,En(n,s,null)):En(n,s,i),this.F=2}},t.Pa=function(){this.l=null,pn(this.a,"Creating new HttpRequest"),this.b=new _n(this,this.a,"rpc",this.T),null===this.h&&(this.b.j=this.i),this.b.N=0;var e=Q(this.ua);Jn(e,"RID","rpc"),Jn(e,"SID",this.J),Jn(e,"CI",this.ka?"0":"1"),Jn(e,"AID",this.N),Je(this,e),Jn(e,"TYPE","xmlhttp"),this.h&&this.i&&we(e,this.h,this.i),this.G&&this.b.setTimeout(this.G),An(this.b,e,!0,this.X),pn(this.a,"New Request created")},t.Oa=function(t,n){if(0!=this.F&&(this.b==t||de(this.c,t)))if(this.u=t.C,!t.v&&de(this.c,t)&&3==this.F){try{var r=this.la.a.parse(n)}catch(e){r=null}if(!(v(r)&&3==r.length))pn(this.a,"Bad POST response data returned"),He(this,11);else if(n=r,0==n[0]){a:if(pn(this.a,"Server claims our backchannel is missing."),this.l)pn(this.a,"But we are currently starting the request.");else{if(!this.b)on(this.a.a,"We do not have a BackChannel established");else if(this.b.D+3E3<t.D)Tr(this),this.b.cancel(),this.b=null;else break a;Ke(this),gn(18)}}else this.xa=n[1],t=this.xa-this.N,0<t&&(n=n[2],pn(this.a,n+" bytes (in "+t+" arrays) are outstanding on the BackChannel"),37500>n&&this.ka&&0==this.B&&!this.s&&(this.s=yn(j(this.ib,this),6E3)))}else if((t.v||this.b==t)&&Tr(this),!nt(n))for(n=r=this.la.a.parse(n),r=0;r<n.length;r++){var o=n[r];if(this.N=o[0],o=o[1],2!=this.F)3==this.F&&("stop"==o[0]||"close"==o[0]?"stop"==o[0]?He(this,7):ye(this):"noop"!=o[0]&&this.f&&this.f.Ca(o),this.B=0);else if("c"==o[0]){this.J=o[1],this.X=o[2];var i=o[3];null!=i&&(this.na=i,cn(this.a,"VER="+this.na)),i=o[4],null!=i&&(this.ya=i,cn(this.a,"SVER="+this.ya)),o=o[5],null!=o&&"number"==typeof o&&0<o&&(this.G=o*=1.5,cn(this.a,"backChannelRequestTimeoutMs_="+o)),this.o&&(o=t.a)&&((i=N(o,"X-Client-Wire-Protocol"))&&kr(this.c,i),this.j&&((o=N(o,"X-HTTP-Session-Id"))?(this.K=o,Jn(this.D,this.j,o)):on(this.a.a,"Missing X_HTTP_SESSION_ID in the handshake response"))),this.F=3,this.f&&this.f.Da(),o=t,this.ua=Me(this,this.X,this.ja),o.v?(pn(this.a,"Upgrade the handshake request to a backchannel."),ce(this.c,o),(i=this.G)&&o.setTimeout(i),o.s&&(Bn(o),Rn(o)),this.b=o):Ie(this)}else"stop"!=o[0]&&"close"!=o[0]||He(this,7)}},t.ib=function(){null!=this.s&&(this.s=null,this.b.cancel(),this.b=null,Ke(this),gn(19))},t.ta=function(t){pn(this.a,"Request complete");var n=null;if(this.b==t){Tr(this),this.b=null;var r=2}else if(de(this.c,t))n=t.u,ce(this.c,t),r=1;else return;if(this.u=t.C,0!=this.F)if(t.f)1==r?(fn(t.l?t.l.length:0,Dr()-t.D,this.v),Ee(this)):Ie(this);else{var o=t.m;if(3==o||0==o&&0<this.u)pn(this.a,"Not retrying due to error type");else{var i=this;if(pn(this.a,function(){return"Maybe retrying, last error: "+L(o,i.u)}),1==r&&Fe(this,t)||2==r&&Ke(this))return;pn(this.a,"Exceeded max number of retries")}n&&0<n.length&&ge(this.c,n),pn(this.a,"Error: HTTP request failed"),1===o?He(this,5):4===o?He(this,10):3===o?He(this,6):He(this,2)}},t.pb=function(e){e?(cn(this.a,"Successfully pinged google.com"),gn(2)):(cn(this.a,"Failed to ping google.com"),gn(1))},t.ca=function(e){if(e&&!this.S)throw Error("Can't create secondary domain capable XhrIo object.");return e=new me(this.Ta),e.o=this.S,e},t.qa=function(){return!!this.f&&!0},t.ia=function(){return this.S},new hr,t=Ne.prototype,t.Da=function(){},t.Ca=function(){},t.Ba=function(){},t.Aa=function(){},t.ab=function(){},Pe.prototype.a=function(e,t){return new Qe(e,t)},b(Qe,Lt),t=Qe.prototype,t.addEventListener=function(e,t,n,r){Qe.H.addEventListener.call(this,e,t,n,r)},t.removeEventListener=function(e,t,n,r){Qe.H.removeEventListener.call(this,e,t,n,r)},t.fb=function(){this.a.f=this.h,this.l&&(this.a.S=!0);var e=this.a,t=this.o,n=this.b,r=this.g||void 0;pn(e.a,"connect()"),gn(0),e.ja=n,e.U=r||{},e.o&&(pn(e.a,"connect() bypassed channel-test."),e.I.b=[],e.I.a=!1),pn(e.a,"connectTest_()"),e.C=new mr(e,e.a),null===e.h&&(e.C.i=e.i),n=t,e.h&&e.i&&(n=we(t,e.h,e.i)),e=e.C,e.m=n,t=Ce(e.a,e.m),gn(3),n=e.a.I.b,null==n?(R(t,"MODE","init"),!e.a.o&&e.a.j&&R(t,"X-HTTP-Session-Id",e.a.j),e.c=new _n(e,e.b,void 0,void 0),e.c.j=e.i,An(e.c,t,!1,null),e.P=0):(e.g=n[0],e.P=1,gr(e))},t.close=function(){ye(this.a)},t.gb=function(e){if(s(e)){var t={};t.__data__=e,Ae(this.a,t)}else this.j?(t={},t.__data__=Dt(e),Ae(this.a,t)):Ae(this.a,e)},t.w=function(){this.a.f=null,delete this.h,ye(this.a),delete this.a,Qe.H.w.call(this)},b(W,kn),b(Se,Sn),b(Te,Ne),Te.prototype.Da=function(){D(this.a.c,"WebChannel opened on "+this.a.b),this.a.dispatchEvent("a")},Te.prototype.Ca=function(e){this.a.dispatchEvent(new W(e))},Te.prototype.Ba=function(e){D(this.a.c,"WebChannel aborted on "+this.a.b+" due to channel error: "+e),this.a.dispatchEvent(new Se(e))},Te.prototype.Aa=function(){D(this.a.c,"WebChannel closed on "+this.a.b),this.a.dispatchEvent("b")};var pe=f(function(e){function t(){}t.prototype=e.prototype;var n=new t;return e.apply(n,Array.prototype.slice.call(arguments,1)),n},Pe);Re.prototype.A=function(){for(var e=[],t=this.b.length-1;0<=t;--t)e.push(this.b[t]);var n=this.a.length;for(t=0;t<n;++t)e.push(this.a[t]);return e},b(Xe,$);var Ho="[goog.structs.Pool] Min can not be greater than max";t=Xe.prototype,t.da=function(){var e=Dr();if(!(null!=this.g&&0>e-this.g)){for(var t;0<We(this.a)&&(t=Ve(this.a),!this.sa(t));)this.aa();return!t&&Er(this)<this.c&&(t=this.pa()),t&&(this.g=e,this.b.add(t)),t}},t.ob=function(e){return!!Wn(this.b.a,br(e))&&(this.ma(e),!0)},t.ma=function(e){Wn(this.b.a,br(e)),this.sa(e)&&Er(this)<this.c?this.a.a.push(e):Ye(e)},t.aa=function(){for(var e=this.a,t;Er(this)<this.h;)t=this.pa(),e.a.push(t);for(;Er(this)>this.c&&0<We(this.a);)Ye(Ve(e))},t.pa=function(){return{}},t.sa=function(e){return"function"!=typeof e.bb||e.bb()},t.w=function(){if(Xe.H.w.call(this),0<this.b.a.c)throw Error("[goog.structs.Pool] Objects not released");delete this.b;for(var e=this.a;0!=e.b.length||0!=e.a.length;)Ye(Ve(e));delete this.a},Ar.prototype.A=function(){for(var e=this.a,t=[],n=e.length,r=0;r<n;r++)t.push(e[r].b);return t},Ar.prototype.M=function(){for(var e=this.a,t=[],n=e.length,r=0;r<n;r++)t.push(e[r].a);return t},b(Nr,Ar),b(Lr,Xe),t=Lr.prototype,t.da=function(e,t){return e?void(Ir(this.f,void 0===t?100:t,e),this.ra()):Lr.H.da.call(this)},t.ra=function(){for(var t=this.f,n;0<t.a.length&&(n=this.da(),n);){var r=t,o=r.a,i=o.length,e=o[0];if(0>=i)e=void 0;else{if(1==i)_e(o);else{o[0]=o.pop(),o=0,r=r.a,i=r.length;for(var s=r[o];o<i>>1;){var l=2*o+1,d=2*o+2;if(l=d<i&&r[d].a<r[l].a?d:l,r[l].a>s.a)break;r[o]=r[l],o=l}r[o]=s}e=e.b}e.apply(this,[n])}},t.ma=function(e){Lr.H.ma.call(this,e),this.ra()},t.aa=function(){Lr.H.aa.call(this),this.ra()},t.w=function(){Lr.H.w.call(this),Mr.clearTimeout(void 0),_e(this.f.a),this.f=null},b(Y,Lr),Y.prototype.pa=function(){var e=new me,t=this.l;return t&&t.forEach(function(t,n){e.headers.set(n,t)}),this.j&&(e.o=!0),e},Y.prototype.sa=function(e){return!e.i&&!e.a},Pe.prototype.createWebChannel=Pe.prototype.a,Qe.prototype.send=Qe.prototype.gb,Qe.prototype.open=Qe.prototype.fb,Qe.prototype.close=Qe.prototype.close,No.NO_ERROR=0,No.TIMEOUT=8,No.HTTP_ERROR=6,Lo.COMPLETE="complete",vn.EventType=Oo,Oo.OPEN="a",Oo.CLOSE="b",Oo.ERROR="c",Oo.MESSAGE="d",Lt.prototype.listen=Lt.prototype.Ia,Y.prototype.getObject=Y.prototype.da,Y.prototype.releaseObject=Y.prototype.ob,me.prototype.listenOnce=me.prototype.Ja,me.prototype.getLastError=me.prototype.hb,me.prototype.getLastErrorCode=me.prototype.Ga,me.prototype.getStatus=me.prototype.W,me.prototype.getStatusText=me.prototype.Ha,me.prototype.getResponseJson=me.prototype.eb,me.prototype.getResponseText=me.prototype.V,me.prototype.getResponseText=me.prototype.V,me.prototype.send=me.prototype.fa,e.exports={createWebChannelTransport:pe,ErrorCode:No,EventType:Lo,WebChannel:vn,XhrIoPool:Y}}).call("undefined"==typeof t?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:t)}).call(t,n("h6ac"))},IYZm:function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("LiPu"))})(function(e){function t(e){for(var t in u)u.hasOwnProperty(t)&&(e.attrs[t]=u[t])}var n=["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"],r=["_blank","_self","_top","_parent"],o=["ascii","utf-8","utf-16","latin1","latin1"],i=["get","post","put","delete"],l=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],d=["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]"],p={attrs:{}},c={a:{attrs:{href:null,ping:null,type:null,media:d,target:r,hreflang:n}},abbr:p,acronym:p,address:p,applet:p,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:d,hreflang:n,type:null,shape:["default","rect","circle","poly"]}},article:p,aside:p,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:p,base:{attrs:{href:null,target:r}},basefont:p,bdi:p,bdo:p,big:p,blockquote:{attrs:{cite:null}},body:p,br:p,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:l,formmethod:i,formnovalidate:["","novalidate"],formtarget:r,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:p,center:p,cite:p,code:p,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:p,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:p,dir:p,div:p,dl:p,dt:p,em:p,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:p,figure:p,font:p,footer:p,form:{attrs:{action:null,name:null,"accept-charset":o,autocomplete:["on","off"],enctype:l,method:i,novalidate:["","novalidate"],target:r}},frame:p,frameset:p,h1:p,h2:p,h3:p,h4:p,h5:p,h6:p,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:p,hgroup:p,hr:p,html:{attrs:{manifest:null},children:["head","body"]},i:p,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:l,formmethod:i,formnovalidate:["","novalidate"],formtarget:r,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:p,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:p,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:n,media:d,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:p,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:o,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:p,noframes:p,noscript:p,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:p,param:{attrs:{name:null,value:null}},pre:p,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:p,rt:p,ruby:p,s:p,samp:p,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:o}},section:p,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:p,source:{attrs:{src:null,type:null,media:null}},span:p,strike:p,strong:p,style:{attrs:{type:["text/css"],media:d,scoped:null}},sub:p,summary:p,sup:p,table:p,tbody:p,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:p,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:p,time:{attrs:{datetime:null}},title:p,tr:p,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:n}},tt:p,u:p,ul:p,var:p,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:p},u={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 h in t(p),c)c.hasOwnProperty(h)&&c[h]!=p&&t(c[h]);e.htmlSchema=c,e.registerHelper("hint","html",function(t,n){var r={schemaInfo:c};if(n)for(var o in n)r[o]=n[o];return e.hint.xml(t,r)})})},Ib92:function(e,t,n){"use strict";var r=n("iktq"),o=n("3Rhr"),i=n("zH6J"),s=n("kdYR"),l=n("3Vd+"),d=l.process,p=l.setImmediate,c=l.clearImmediate,u=l.MessageChannel,h=0,m={},g="onreadystatechange",f=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},y=function(e){f.call(e.data)},b,x,v;p&&c||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++h]=function(){o("function"==typeof e?e:Function(e),t)},b(h),h},c=function(e){delete m[e]},"process"==n("1ROC")(d)?b=function(e){d.nextTick(r(f,e,1))}:u?(x=new u,v=x.port2,x.port1.onmessage=y,b=r(v.postMessage,v,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(b=function(e){l.postMessage(e+"","*")},l.addEventListener("message",y,!1)):g in s("script")?b=function(e){i.appendChild(s("script"))[g]=function(){i.removeChild(this),f.call(e)}}:b=function(e){setTimeout(r(f,e,1),0)}),e.exports={set:p,clear:c}},Ipt8:function(e,t){"use strict";function n(e,t){for(var n=e.attributes,o=0,i=n.length,s;o<i;o++)s=n[o],"string"==typeof s.value&&e.setAttribute(s.name,r(s.value,t));return null!=e.value&&(e.value=r(e.value,t)),e}function r(e,t){for(var n=o(e),r=0,s="",l=0,i=n.variables.length;l<i;l++){var d=n.variables[l],p=d.name in t?t[d.name]:d.name;"function"==typeof p&&(p=p(n.string,d,r+d.location)),s+=n.string.slice(r,d.location)+p,r=d.location+d.length}return s+n.string.slice(r)}function o(e){for(var t=/\$\{([a-z][\w\-]*)\}/ig,n=92,r=[],o=new Map,s=void 0;s=t.exec(e);)o.set(s.index,s);if(o.size){for(var l=0,d=0,p=e.length,c="";d<p;){if(e.charCodeAt(d)===n&&o.has(d+1)){var u=o.get(d+1);c+=e.slice(l,d)+u[0],l=d=u.index+u[0].length,o.delete(d+1);continue}d++}e=c+e.slice(l);for(var h=Array.from(o.values()),m=0,i=h.length,g;m<i;m++)g=h[m],r.push({name:g[1],location:g.index,length:g[0].length})}return{string:e,variables:r}}t.__esModule=!0,t.default=function(e,t){return t=t||{},e.walk(function(e){return n(e,t)}),e}},JgNJ:function(e,t){"use strict";var n=Math.pow;t.read=function(t,r,o,l,p){var c=8*p-l-1,u=(1<<c)-1,h=u>>1,g=-7,f=o?p-1:0,i=o?-1:1,d=t[r+f],s,e;for(f+=i,s=d&(1<<-g)-1,d>>=-g,g+=c;0<g;s=256*s+t[r+f],f+=i,g-=8);for(e=s&(1<<-g)-1,s>>=-g,g+=l;0<g;e=256*e+t[r+f],f+=i,g-=8);if(0===s)s=1-h;else{if(s===u)return e?NaN:(d?-1:1)*Infinity;e+=n(2,l),s-=h}return(d?-1:1)*e*n(2,s-l)},t.write=function(t,r,o,l,p,u){var h=8*u-p-1,g=(1<<h)-1,f=g>>1,y=23===p?5.960464477539063e-8-6.617444900424222e-24:0,b=l?0:u-1,i=l?1:-1,d=0>r||0===r&&0>1/r?1:0,s,x,m;for(r=Math.abs(r),isNaN(r)||r===Infinity?(x=isNaN(r)?1:0,s=g):(s=Math.floor(Math.log(r)/Math.LN2),1>r*(m=n(2,-s))&&(s--,m*=2),r+=1<=s+f?y/m:y*n(2,1-f),2<=r*m&&(s++,m/=2),s+f>=g?(x=0,s=g):1<=s+f?(x=(r*m-1)*n(2,p),s+=f):(x=r*n(2,f-1)*n(2,p),s=0));8<=p;t[o+b]=255&x,b+=i,x/=256,p-=8);for(s=s<<p|x,h+=p;0<h;t[o+b]=255&s,b+=i,s/=256,h-=8);t[o+b-i]|=128*d}},"Jo/m":function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("29F7"),n("4e7A"))})(function(e){function t(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):!e.global&&(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);return n&&n.index==t.pos?(t.pos+=n[0].length||1,"searching"):void(n?t.pos=n.index:t.skipToEnd())}}}function n(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function r(e){return e.state.search||(e.state.search=new n)}function o(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,t,n){return e.getSearchCursor(t,n,{caseFold:o(t),multiline:!0})}function s(e,t,n,r,o){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){g(e)},onKeyDown:o})}function l(e,t,n,r,o){e.openDialog?e.openDialog(t,o,{value:r,selectValueOnOpen:!0}):o(prompt(n,r))}function d(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}function p(e){return e.replace(/\\(.)/g,function(e,t){return"n"==t?"\n":"r"==t?"\r":t})}function c(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(t){}else e=p(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function u(e,n,r){n.queryText=r,n.query=c(r),e.removeOverlay(n.overlay,o(n.query)),n.overlay=t(n.query,o(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&(n.annotate.clear(),n.annotate=null),n.annotate=e.showMatchesOnScrollbar(n.query,o(n.query)))}function h(t,n,o,i){var d=r(t);if(d.query)return m(t,n);var p=t.getSelection()||d.lastQuery;if(p instanceof RegExp&&"x^"==p.source&&(p=null),o&&t.openDialog){var c=null,h=function(n,r){e.e_stop(r),n&&(n!=d.queryText&&(u(t,d,n),d.posFrom=d.posTo=t.getCursor()),c&&(c.style.opacity=1),m(t,r.shiftKey,function(e,n){var r;3>n.line&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((c=r).style.opacity=.4)}))};s(t,b,p,h,function(n,o){var i=e.keyName(n),s=t.getOption("extraKeys"),l=s&&s[i]||e.keyMap[t.getOption("keyMap")][i];"findNext"==l||"findPrev"==l||"findPersistentNext"==l||"findPersistentPrev"==l?(e.e_stop(n),u(t,r(t),o),t.execCommand(l)):("find"==l||"findPersistent"==l)&&(e.e_stop(n),h(o,n))}),i&&p&&(u(t,d,p),m(t,n))}else l(t,b,"Search for:",p,function(e){e&&!d.query&&t.operation(function(){u(t,d,e),d.posFrom=d.posTo=t.getCursor(),m(t,n)})})}function m(t,n,o){t.operation(function(){var s=r(t),l=i(t,s.query,n?s.posFrom:s.posTo);!l.find(n)&&(l=i(t,s.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0)),!l.find(n))||(t.setSelection(l.from(),l.to()),t.scrollIntoView({from:l.from(),to:l.to()},20),s.posFrom=l.from(),s.posTo=l.to(),o&&o(l.from(),l.to()))})}function g(e){e.operation(function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function f(e,t,n){e.operation(function(){for(var r=i(e,t);r.findNext();)if("string"!=typeof t){var o=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,function(e,t){return o[t]}))}else r.replace(n)})}function y(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||r(e).lastQuery,o="<span class=\"CodeMirror-search-label\">"+(t?"Replace all:":"Replace:")+"</span>";l(e,o+x,o,n,function(n){n&&(n=c(n),l(e,v,"Replace with:","",function(r){if(r=p(r),t)f(e,n,r);else{g(e);var o=i(e,n,e.getCursor("from")),s=function t(){var s=o.from(),p;!(p=o.findNext())&&(o=i(e,n),!(p=o.findNext())||s&&o.from().line==s.line&&o.from().ch==s.ch)||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()}),d(e,k,"Replace?",[function(){l(p)},t,function(){f(e,n,r)}]))},l=function(e){o.replace("string"==typeof n?r:r.replace(/\$(\d)/g,function(t,n){return e[n]})),s()};s()}}))})}}var b="<span class=\"CodeMirror-search-label\">Search:</span> <input type=\"text\" style=\"width: 10em\" class=\"CodeMirror-search-field\"/> <span style=\"color: #888\" class=\"CodeMirror-search-hint\">(Use /re/ syntax for regexp search)</span>",x=" <input type=\"text\" style=\"width: 10em\" class=\"CodeMirror-search-field\"/> <span style=\"color: #888\" class=\"CodeMirror-search-hint\">(Use /re/ syntax for regexp search)</span>",v="<span class=\"CodeMirror-search-label\">With:</span> <input type=\"text\" style=\"width: 10em\" class=\"CodeMirror-search-field\"/>",k="<span class=\"CodeMirror-search-label\">Replace?</span> <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>";e.commands.find=function(e){g(e),h(e)},e.commands.findPersistent=function(e){g(e),h(e,!1,!0)},e.commands.findPersistentNext=function(e){h(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){h(e,!0,!0,!0)},e.commands.findNext=h,e.commands.findPrev=function(e){h(e,!0)},e.commands.clearSearch=g,e.commands.replace=y,e.commands.replaceAll=function(e){y(e,!0)}})},KM04:function(O){"use strict";!function(){function M(){}function B(e,s){var n=L,d,o,p,i;for(i=arguments.length;2<i--;)_.push(arguments[i]);for(s&&null!=s.children&&(_.length||_.push(s.children),delete s.children);_.length;)if((o=_.pop())&&void 0!==o.pop)for(i=o.length;i--;)_.push(o[i]);else"boolean"==typeof o&&(o=null),(p="function"!=typeof e)&&(null==o?o="":"number"==typeof o?o+="":"string"!=typeof o&&(p=!1)),p&&d?n[n.length-1]+=o:n===L?n=[o]:n.push(o),d=p;var l=new M;return l.nodeName=e,l.children=n,l.attributes=null==s?void 0:s,l.key=null==s?void 0:s.key,void 0!==N.vnode&&N.vnode(l),l}function F(r,e){for(var t in e)r[t]=e[t];return r}function e(t,e){return B(t.nodeName,F(F({},t.attributes),e),2<arguments.length?[].slice.call(arguments,2):t.children)}function z(t){!t.__d&&(t.__d=!0)&&1==U.push(t)&&(N.debounceRendering||E)(n)}function n(){var n=U,t;for(U=[];t=n.pop();)t.__d&&v(t)}function q(r,e,o){return"string"==typeof e||"number"==typeof e?void 0!==r.splitText:"string"==typeof e.nodeName?!r._componentConstructor&&K(r,e.nodeName):o||r._componentConstructor===e.nodeName}function K(n,e){return n.__n===e||n.nodeName.toLowerCase()===e.toLowerCase()}function G(n){var e=F({},n.attributes);e.children=n.children;var t=n.nodeName.defaultProps;if(void 0!==t)for(var o in t)void 0===e[o]&&(e[o]=t[o]);return e}function X(r,e){var t=e?document.createElementNS("http://www.w3.org/2000/svg",r):document.createElement(r);return t.__n=r,t}function l(n){var e=n.parentNode;e&&e.removeChild(n)}function r(d,e,t,c,u){if("className"===e&&(e="class"),"key"===e);else if("ref"===e)t&&t(null),c&&c(d);else if(!("class"!==e||u))d.className=c||"";else if("style"===e){if(c&&"string"!=typeof c&&"string"!=typeof t||(d.style.cssText=c||""),c&&"object"==typeof c){if("string"!=typeof t)for(var h in t)h in c||(d.style[h]="");for(var h in c)d.style[h]="number"==typeof c[h]&&!1===P.test(h)?c[h]+"px":c[h]}}else if("dangerouslySetInnerHTML"===e)c&&(d.innerHTML=c.__html||"");else if("o"==e[0]&&"n"==e[1]){var i=e!==(e=e.replace(/Capture$/,""));e=e.toLowerCase().substring(2),c?t||d.addEventListener(e,s,i):d.removeEventListener(e,s,i),(d.__l||(d.__l={}))[e]=c}else if("list"!==e&&"type"!==e&&!u&&e in d)p(d,e,null==c?"":c),null!=c&&!1!==c||d.removeAttribute(e);else{var l=u&&e!==(e=e.replace(/^xlink:?/,""));null==c||!1===c?l?d.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):d.removeAttribute(e):"function"!=typeof c&&(l?d.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),c):d.setAttribute(e,c))}}function p(r,e,t){try{r[e]=t}catch(t){}}function s(t){return this.__l[t.type](N.event&&N.event(t)||t)}function u(){for(var t;t=A.pop();)N.afterMount&&N.afterMount(t),t.componentDidMount&&t.componentDidMount()}function d(s,e,t,n,o,r){D++||(V=null!=o&&void 0!==o.ownerSVGElement,R=null!=s&&!("__preactattr_"in s));var i=Q(s,e,t,n,r);return o&&i.parentNode!==o&&o.appendChild(i),--D||(R=!1,r||u()),i}function Q(g,b,x,n,o){var r=g,i=V;if(null!=b&&"boolean"!=typeof b||(b=""),"string"==typeof b||"number"==typeof b)return g&&void 0!==g.splitText&&g.parentNode&&(!g._component||o)?g.nodeValue!=b&&(g.nodeValue=b):(r=document.createTextNode(b),g&&(g.parentNode&&g.parentNode.replaceChild(r,g),m(g,!0))),r.__preactattr_=!0,r;var l=b.nodeName;if("function"==typeof l)return k(g,b,x,n);if(V="svg"===l||"foreignObject"!==l&&V,l+="",(!g||!K(g,l))&&(r=X(l,V),g)){for(;g.firstChild;)r.appendChild(g.firstChild);g.parentNode&&g.parentNode.replaceChild(r,g),m(g,!0)}var v=r.firstChild,p=r.__preactattr_,c=b.children;if(null==p){p=r.__preactattr_={};for(var s=r.attributes,f=s.length;f--;)p[s[f].name]=s[f].value}return!R&&c&&1===c.length&&"string"==typeof c[0]&&null!=v&&void 0!==v.splitText&&null==v.nextSibling?v.nodeValue!=c[0]&&(v.nodeValue=c[0]):(c&&c.length||null!=v)&&h(r,c,x,n,R||null!=p.dangerouslySetInnerHTML),y(r,b.attributes,p),V=i,r}function h(p,e,t,n,o){var b=p.childNodes,s=[],f={},d=0,h=0,S=b.length,y=0,g=e?e.length:0,w,i,T,u,_;if(0!==S)for(var E=0;E<S;E++){var C=b[E],x=C.__preactattr_,A=g&&x?C._component?C._component.__k:x.key:null;null==A?(x||(void 0===C.splitText?o:!o||C.nodeValue.trim()))&&(s[y++]=C):(d++,f[A]=C)}if(0!==g)for(var E=0;E<g;E++){u=e[E],_=null;var A=u.key;if(null!=A)d&&void 0!==f[A]&&(_=f[A],f[A]=void 0,d--);else if(!_&&h<y)for(w=h;w<y;w++)if(void 0!==s[w]&&q(i=s[w],u,o)){_=i,s[w]=void 0,w===y-1&&y--,w===h&&h++;break}_=Q(_,u,t,n),T=b[E],_&&_!==p&&_!==T&&(null==T?p.appendChild(_):_===T.nextSibling?l(T):p.insertBefore(_,T))}if(d)for(var E in f)void 0!==f[E]&&m(f[E],!1);for(;h<=y;)void 0!==(_=s[y--])&&m(_,!1)}function m(r,e){var t=r._component;t?C(t):(null!=r.__preactattr_&&r.__preactattr_.ref&&r.__preactattr_.ref(null),!1!==e&&null!=r.__preactattr_||l(r),c(r))}function c(n){for(n=n.lastChild;n;){var e=n.previousSibling;m(n,!0),n=e}}function y(i,e,t){for(var n in t)e&&null!=e[n]||null==t[n]||r(i,n,t[n],t[n]=void 0,V);for(n in e)"children"===n||"innerHTML"===n||n in t&&e[n]===("value"===n||"checked"===n?i[n]:t[n])||r(i,n,t[n],t[n]=e[n],V)}function g(n){var e=n.constructor.name;(W[e]||(W[e]=[])).push(n)}function f(s,e,t){var n=W[s.name],r;if(s.prototype&&s.prototype.render?(r=new s(e,t),w.call(r,e,t)):(r=new w(e,t),r.constructor=s,r.render=b),n)for(var o=n.length;o--;)if(n[o].constructor===s){r.__b=n[o].__b,n.splice(o,1);break}return r}function b(r,e,t){return this.constructor(r,t)}function x(r,e,t,n,o){r.__x||(r.__x=!0,(r.__r=e.ref)&&delete e.ref,(r.__k=e.key)&&delete e.key,!r.base||o?r.componentWillMount&&r.componentWillMount():r.componentWillReceiveProps&&r.componentWillReceiveProps(e,n),n&&n!==r.context&&(r.__c||(r.__c=r.context),r.context=n),r.__p||(r.__p=r.props),r.props=e,r.__x=!1,0!==t&&(1!==t&&!1===N.syncComponentUpdates&&r.base?z(r):v(r,1,o)),r.__r&&r.__r(r))}function v(n,e,t,o){if(!n.__x){var h=n.props,b=n.state,p=n.context,c=n.__p||h,s=n.__s||b,k=n.__c||p,S=n.base,_=n.__b,y=S||_,g=n._component,w=!1,I,i,l;if(S&&(n.props=c,n.state=s,n.context=k,2!==e&&n.shouldComponentUpdate&&!1===n.shouldComponentUpdate(h,b,p)?w=!0:n.componentWillUpdate&&n.componentWillUpdate(h,b,p),n.props=h,n.state=b,n.context=p),n.__p=n.__s=n.__c=n.__b=null,n.__d=!1,!w){I=n.render(h,b,p),n.getChildContext&&(p=F(F({},p),n.getChildContext()));var L=I&&I.nodeName,O,R;if("function"==typeof L){var T=G(I);i=g,i&&i.constructor===L&&T.key==i.__k?x(i,T,1,p,!1):(O=i,n._component=i=f(L,T,p),i.__b=i.__b||_,i.__u=n,x(i,T,0,p,!1),v(i,1,t,!0)),R=i.base}else l=y,O=g,O&&(l=n._component=null),(y||1===e)&&(l&&(l._component=null),R=d(l,I,p,t||!S,y&&y.parentNode,!0));if(y&&R!==y&&i!==g){var B=y.parentNode;B&&R!==B&&(B.replaceChild(R,y),O||(y._component=null,m(y,!1)))}if(O&&C(O),n.base=R,R&&!o){for(var E=n,P=n;P=P.__u;)(E=P).base=R;R._component=E,R._componentConstructor=E.constructor}}if(!S||t?A.unshift(n):w||(n.componentDidUpdate&&n.componentDidUpdate(c,s,k),N.afterUpdate&&N.afterUpdate(n)),null!=n.__h)for(;n.__h.length;)n.__h.pop().call(n);D||o||u()}}function k(s,e,t,n){for(var d=s&&s._component,r=d,i=s,l=d&&s._componentConstructor===e.nodeName,c=l,u=G(e);d&&!c&&(d=d.__u);)c=d.constructor===e.nodeName;return d&&c&&(!n||d._component)?(x(d,u,3,t,n),s=d.base):(r&&!l&&(C(r),s=i=null),d=f(e.nodeName,u,t),s&&!d.__b&&(d.__b=s,i=null),x(d,u,1,t,n),s=d.base,i&&s!==i&&(i._component=null,m(i,!1))),s}function C(r){N.beforeUnmount&&N.beforeUnmount(r);var e=r.base;r.__x=!0,r.componentWillUnmount&&r.componentWillUnmount(),r.base=null;var t=r._component;t?C(t):e&&(e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),r.__b=e,l(e),g(r),c(e)),r.__r&&r.__r(null)}function w(n,e){this.__d=!0,this.context=e,this.props=n,this.state=this.state||{}}var N={},_=[],L=[],E="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,P=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,U=[],A=[],D=0,V=!1,R=!1,W={};F(w.prototype,{setState:function(n,r){var t=this.state;this.__s||(this.__s=F({},t)),F(t,"function"==typeof n?n(t,this.props):n),r&&(this.__h=this.__h||[]).push(r),z(this)},forceUpdate:function(t){t&&(this.__h=this.__h||[]).push(t),v(this,2)},render:function(){}});var I={h:B,createElement:B,cloneElement:e,Component:w,render:function(r,e,t){return d(t,r,{},!1,e,!1)},rerender:n,options:N};O.exports=I}()},KxJl:function(e){"use strict";var t=e.exports={version:"2.3.0"};"number"==typeof __e&&(__e=t)},LP5M:function(e){"use strict";var t=30;e.exports=function(e,n){var r,o,i,s,l,d,p,c,u,h,m,g,f,y,b,x,v,k,S,w,C,T,_,E,A;r=e.state,o=e.next_in,E=e.input,i=o+(e.avail_in-5),s=e.next_out,A=e.output,l=s-(n-e.avail_out),d=s+(e.avail_out-257),p=r.dmax,c=r.wsize,u=r.whave,h=r.wnext,m=r.window,g=r.hold,f=r.bits,y=r.lencode,b=r.distcode,x=(1<<r.lenbits)-1,v=(1<<r.distbits)-1;top:do{15>f&&(g+=E[o++]<<f,f+=8,g+=E[o++]<<f,f+=8),k=y[g&x];dolen:for(;;){if(S=k>>>24,g>>>=S,f-=S,S=255&k>>>16,0===S)A[s++]=65535&k;else if(16&S){w=65535&k,S&=15,S&&(f<S&&(g+=E[o++]<<f,f+=8),w+=g&(1<<S)-1,g>>>=S,f-=S),15>f&&(g+=E[o++]<<f,f+=8,g+=E[o++]<<f,f+=8),k=b[g&v];dodist:for(;;){if(S=k>>>24,g>>>=S,f-=S,S=255&k>>>16,16&S){if(C=65535&k,S&=15,f<S&&(g+=E[o++]<<f,f+=8,f<S&&(g+=E[o++]<<f,f+=8)),C+=g&(1<<S)-1,C>p){e.msg="invalid distance too far back",r.mode=t;break top}if(g>>>=S,f-=S,S=s-l,C>S){if(S=C-S,S>u&&r.sane){e.msg="invalid distance too far back",r.mode=t;break top}if(T=0,_=m,0===h){if(T+=c-S,S<w){w-=S;do A[s++]=m[T++];while(--S);T=s-C,_=A}}else if(h<S){if(T+=c+h-S,S-=h,S<w){w-=S;do A[s++]=m[T++];while(--S);if(T=0,h<w){S=h,w-=S;do A[s++]=m[T++];while(--S);T=s-C,_=A}}}else if(T+=h-S,S<w){w-=S;do A[s++]=m[T++];while(--S);T=s-C,_=A}for(;2<w;)A[s++]=_[T++],A[s++]=_[T++],A[s++]=_[T++],w-=3;w&&(A[s++]=_[T++],1<w&&(A[s++]=_[T++]))}else{T=s-C;do A[s++]=A[T++],A[s++]=A[T++],A[s++]=A[T++],w-=3;while(2<w);w&&(A[s++]=A[T++],1<w&&(A[s++]=A[T++]))}}else if(0==(64&S)){k=b[(65535&k)+(g&(1<<S)-1)];continue dodist}else{e.msg="invalid distance code",r.mode=t;break top}break}}else if(0==(64&S)){k=y[(65535&k)+(g&(1<<S)-1)];continue dolen}else if(32&S){r.mode=12;break top}else{e.msg="invalid literal/length code",r.mode=t;break top}break}}while(o<i&&s<d);return w=f>>3,o-=w,f-=w<<3,g&=(1<<f)-1,e.next_in=o,e.next_out=s,e.avail_in=o<i?5+(i-o):5-(o-i),e.avail_out=s<d?257+(d-s):257-(s-d),r.hold=g,void(r.bits=f)}},LZfN:function(e,t,n){"use strict";function r(e,t,n){o.call(this,t),this._helper=e;var r=this;e.on("data",function(e,t){r.push(e)||r._helper.pause(),n&&n(t)}).on("error",function(t){r.emit("error",t)}).on("end",function(){r.push(null)})}var o=n("fOjT").Readable,i=n("dvMn");i.inherits(r,o),r.prototype._read=function(){this._helper.resume()},e.exports=r},LiPu:function(e,t,n){"use strict";var r=Math.max;(function(e){e(n("tQq4"))})(function(e){var t=e.Pos;e.registerHelper("hint","xml",function(o,s){var l=s&&s.schemaInfo,d=s&&s.quoteChar||"\"";if(l){var p=o.getCursor(),c=o.getTokenAt(p);c.end>p.ch&&(c.end=p.ch,c.string=c.string.slice(0,p.ch-c.start));var u=e.innerMode(o.getMode(),c.state);if("xml"==u.mode.name){var h=[],m=!1,g=/\btag\b/.test(c.type)&&!/>$/.test(c.string),f=g&&/^\w/.test(c.string),y,b;if(f){var x=o.getLine(p.line).slice(r(0,c.start-2),c.start),v=/<\/$/.test(x)?"close":/<$/.test(x)?"open":null;v&&(b=c.start-("close"==v?2:1))}else g&&"<"==c.string?v="open":g&&"</"==c.string&&(v="close");if(!g&&!u.state.tagName||v){f&&(y=c.string),m=v;var k=u.state.context,S=k&&l[k.tagName],w=k?S&&S.children:l["!top"];if(w&&"close"!=v)for(var C=0;C<w.length;++C)y&&0!=w[C].lastIndexOf(y,0)||h.push("<"+w[C]);else if("close"!=v)for(var i in l)l.hasOwnProperty(i)&&"!top"!=i&&"!attrs"!=i&&(!y||0==i.lastIndexOf(y,0))&&h.push("<"+i);k&&(!y||"close"==v&&0==k.tagName.lastIndexOf(y,0))&&h.push("</"+k.tagName+">")}else{var S=l[u.state.tagName],T=S&&S.attrs,_=l["!attrs"];if(!T&&!_)return;if(!T)T=_;else if(_){var E={};for(var A in _)_.hasOwnProperty(A)&&(E[A]=_[A]);for(var A in T)T.hasOwnProperty(A)&&(E[A]=T[A]);T=E}if("string"==c.type||"="==c.string){var x=o.getRange(t(p.line,r(0,p.ch-60)),t(p.line,"string"==c.type?c.start:c.end)),I=x.match(/([^\s\u00a0=<>\"\']+)=$/),N;if(!I||!T.hasOwnProperty(I[1])||!(N=T[I[1]]))return;if("function"==typeof N&&(N=N.call(this,o)),"string"==c.type){y=c.string;var L=0;/['"]/.test(c.string.charAt(0))&&(d=c.string.charAt(0),y=c.string.slice(1),L++);var n=c.string.length;/['"]/.test(c.string.charAt(n-1))&&(d=c.string.charAt(n-1),y=c.string.substr(L,n-2)),m=!0}for(var C=0;C<N.length;++C)y&&0!=N[C].lastIndexOf(y,0)||h.push(d+N[C]+d)}else for(var O in"attribute"==c.type&&(y=c.string,m=!0),T)T.hasOwnProperty(O)&&(!y||0==O.lastIndexOf(y,0))&&h.push(O)}return{list:h,from:m?t(p.line,null==b?c.start:b):p,to:m?t(p.line,c.end):p}}}})})},LnjZ:function(e,t,n){"use strict";e.exports=n("WSyY")},Lu2N:function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(t,r,o){n(this,e),null==o&&"string"==typeof t&&(o=t.length),this.string=t,this.pos=this.start=r||0,this.end=o}return e.prototype.eof=function(){return this.pos>=this.end},e.prototype.limit=function(e,t){return new this.constructor(this.string,e,t)},e.prototype.peek=function(){return this.string.charCodeAt(this.pos)},e.prototype.next=function(){if(this.pos<this.string.length)return this.string.charCodeAt(this.pos++)},e.prototype.eat=function(e){var t=this.peek(),n="function"==typeof e?e(t):t===e;return n&&this.next(),n},e.prototype.eatWhile=function(e){for(var t=this.pos;!this.eof()&&this.eat(e););return this.pos!==t},e.prototype.backUp=function(e){this.pos-=e||1},e.prototype.current=function(){return this.substring(this.start,this.pos)},e.prototype.substring=function(e,t){return this.string.slice(e,t)},e.prototype.error=function(e){var t=new Error(e+" at char "+(this.pos+1));return t.originalMessage=e,t.pos=this.pos,t.string=this.string,t},e}();t.default=r},MCp7:function(){"use strict";(function(e){function t(e){if("string"!=typeof e&&(e+=""),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e+=""),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return b.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function s(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function l(e){var t=new FileReader,n=s(t);return t.readAsArrayBuffer(e),n}function d(e){var t=new FileReader,n=s(t);return t.readAsText(e),n}function p(e){for(var t=new Uint8Array(e),n=Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function c(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function u(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,!e)this._bodyText="";else if("string"==typeof e)this._bodyText=e;else if(b.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(b.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(b.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(b.arrayBuffer&&b.blob&&v(e))this._bodyArrayBuffer=c(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else if(b.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||k(e)))this._bodyArrayBuffer=c(e);else throw new Error("unsupported BodyInit type");this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):b.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},b.blob&&(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");else return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(l)}),this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return d(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(p(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");else return Promise.resolve(this._bodyText)},b.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}function h(e){var t=e.toUpperCase();return-1<S.indexOf(t)?t:e}function m(e,t){t=t||{};var n=t.body;if(e instanceof m){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e+"";if(this.credentials=t.credentials||this.credentials||"omit",(t.headers||!this.headers)&&(this.headers=new o(t.headers)),this.method=h(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function g(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function f(e){var t=new o,n=e.replace(/\r?\n[\t ]+/g," ");return n.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function y(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=200<=this.status&&300>this.status,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var b={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(b.arrayBuffer)var x=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=function(e){return e&&DataView.prototype.isPrototypeOf(e)},k=ArrayBuffer.isView||function(e){return e&&-1<x.indexOf(Object.prototype.toString.call(e))};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype["delete"]=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},b.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var S=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},u.call(m.prototype),u.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];y.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=m,e.Response=y,e.fetch=function(e,t){return new Promise(function(n,r){var o=new m(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:f(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;n(new y(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&b.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}})("undefined"==typeof self?void 0:self)},"ML/b":function(e,t,n){"use strict";function r(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}var o=n("dvMn");r.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||0>e)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t=0,n;for(this.checkOffset(e),n=this.index+e-1;n>=this.index;n--)t=(t<<8)+this.byteAt(n);return this.index+=e,t},readString:function(e){return o.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((127&e>>25)+1980,(15&e>>21)-1,31&e>>16,31&e>>11,63&e>>5,(31&e)<<1))}},e.exports=r},PO9O:function(e,t,n){"use strict";function r(e,t,n,r,o){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=o}var o=n("8JlO"),i=n("ABU1"),s=n("S9RN"),l=n("gpbE"),s=n("S9RN");r.prototype={getContentWorker:function(){var e=new i(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},r.createWorkerFrom=function(e,t,n){return e.pipe(new l).pipe(new s("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},e.exports=r},Ps3q:function(e,t,n){"use strict";var r=n("dvMn"),o=n("untT"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.encode=function(e){for(var t=[],n=0,o=e.length,i=o,l="string"!==r.getTypeOf(e),d,p,c,u,h,m,g;n<e.length;)i=o-n,l?(d=e[n++],p=n<o?e[n++]:0,c=n<o?e[n++]:0):(d=e.charCodeAt(n++),p=n<o?e.charCodeAt(n++):0,c=n<o?e.charCodeAt(n++):0),u=d>>2,h=(3&d)<<4|p>>4,m=1<i?(15&p)<<2|c>>6:64,g=2<i?63&c:64,t.push(s.charAt(u)+s.charAt(h)+s.charAt(m)+s.charAt(g));return t.join("")},t.decode=function(e){var t=0,n=0,r="data:",i,l,d,p,c,u,h;if(e.substr(0,r.length)===r)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");var m=3*e.length/4;if(e.charAt(e.length-1)===s.charAt(64)&&m--,e.charAt(e.length-2)===s.charAt(64)&&m--,0!=m%1)throw new Error("Invalid base64 input, bad content length.");var g;for(g=o.uint8array?new Uint8Array(0|m):Array(0|m);t<e.length;)p=s.indexOf(e.charAt(t++)),c=s.indexOf(e.charAt(t++)),u=s.indexOf(e.charAt(t++)),h=s.indexOf(e.charAt(t++)),i=p<<2|c>>4,l=(15&c)<<4|u>>2,d=(3&u)<<6|h,g[n++]=i,64!==u&&(g[n++]=l),64!==h&&(g[n++]=d);return g}},Q14w:function(e,t){"use strict";function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e},t.isBuffer=Buffer.isBuffer},QAmr:function(e,t){"use strict";t.__esModule=!0;var n="function"==typeof fetch?fetch.bind():function(e,t){return t=t||{},new Promise(function(n,r){function o(){var e=[],t=[],r={},n;return s.getAllResponseHeaders().replace(/^(.*?):\s*([\s\S]*?)$/gm,function(o,i,s){e.push(i=i.toLowerCase()),t.push([i,s]),n=r[i],r[i]=n?n+","+s:s}),{ok:1==(0|s.status/200),status:s.status,statusText:s.statusText,url:s.responseURL,clone:o,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},headers:{keys:function(){return e},entries:function(){return t},get:function(e){return r[e.toLowerCase()]},has:function(e){return e.toLowerCase()in r}}}}var s=new XMLHttpRequest;for(var l in s.open(t.method||"get",e),t.headers)s.setRequestHeader(l,t.headers[l]);s.withCredentials="include"==t.credentials,s.onload=function(){n(o())},s.onerror=r,s.send(t.body)})};t.default=n},R0uB:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){n=n||i;var r=t.map(function(e,t){return{order:t,field:e,end:e.location+e.length}}).sort(function(e,t){return e.end-t.end||e.order-t.order}),o=0,s=r.map(function(t){var r=e.substr(t.field.location,t.field.length),i=e.slice(o,t.field.location);return o=t.end,i+n(t.field.index,r)});return s.join("")+e.slice(o)}function i(e,t){return t?"${"+e+":"+t+"}":"${"+e+"}"}function s(e,t){var n=e.pos;if(e.eat(h)){var r=d(e),o="";if(null!=r)return new y(r,o,t);if(e.eat(g)&&(r=d(e),null!=r&&(e.eat(m)&&(o=l(e)),e.eat(f))))return new y(r,o,t)}e.pos=n}function l(e){var t=void 0,n=[];for(e.start=e.pos;!e.eof();){if(t=e.peek(),t===g)n.push(e.pos);else if(t===f){if(!n.length)break;n.pop()}e.next()}if(n.length)throw e.error("Unable to find matching \"}\" for curly brace at "+n.pop());return e.current()}function d(e){if(e.start=e.pos,e.eatWhile(u.isNumber))return+e.current()}t.__esModule=!0,t.createToken=t.mark=void 0;var p=n("Lu2N"),c=function(e){return e&&e.__esModule?e:{default:e}}(p),u=n("rc1b"),h=36,m=58,g=123,f=125,y=function e(t,n,o){r(this,e),this.index=t,this.placeholder=n,this.location=o,this.length=this.placeholder.length},b=function(){function e(t,n){r(this,e),this.string=t,this.fields=n}return e.prototype.mark=function(e){return o(this.string,this.fields,e)},e.prototype.toString=function(){return this.string},e}();t.default=function(e){for(var t=new c.default(e),n=[],r="",o=0,i=0,l=void 0,d=void 0;!t.eof();)l=t.peek(),i=t.pos,l===92?(t.next(),t.next()):(d=s(t,r.length+i-o))?(n.push(d),r+=t.string.slice(o,i)+d.placeholder,o=t.pos):t.next();return new b(r+t.string.slice(o),n)},t.mark=o,t.createToken=i},REa7:function(e){"use strict";var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},RJVP:function(e,t,o){"use strict";var i=Math.floor,n=Math.max;(function(e){(function(){function s(e){return"string"==typeof e}function e(e){return"boolean"==typeof e}function p(){}function d(e){var t=typeof e;if("object"==t){if(e){if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof e.length&&"undefined"!=typeof e.splice&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof e.call&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else return"null";}else if("function"==t&&"undefined"==typeof e.call)return"object";return t}function c(e){return null===e}function _(e){return"array"==d(e)}function h(e){var t=d(e);return"array"==t||"object"==t&&"number"==typeof e.length}function m(e){return"function"==d(e)}function z(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function f(e){return e.call.apply(e.bind,arguments)}function b(e,t){if(!e)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var r=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(r,n),e.apply(t,r)}}return function(){return e.apply(t,arguments)}}function j(){return j=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?f:b,j.apply(null,arguments)}function r(e){var t=Array.prototype.slice.call(arguments,1);return function(){var n=t.slice();return n.push.apply(n,arguments),e.apply(this,n)}}function $(e,t){function n(){}n.prototype=t.prototype,e.lb=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.cd=function(n,r){for(var o=Array(arguments.length-2),i=2;i<arguments.length;i++)o[i-2]=arguments[i];return t.prototype[r].apply(n,o)}}function t(e){e.prototype.then=e.prototype.then,e.prototype.$goog_Thenable=!0}function _e(e){if(!e)return!1;try{return!!e.$goog_Thenable}catch(e){return!1}}function et(e){if(Error.captureStackTrace)Error.captureStackTrace(this,et);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=e+"")}function u(t,n){t=t.split("%s");for(var r="",o=t.length-1,i=0;i<o;i++)r+=t[i]+(i<n.length?n[i]:"%s");et.call(this,r+t[o])}function tt(e){throw new u("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1))}function nt(e,t){this.c=e,this.f=t,this.b=0,this.a=null}function rt(e,t){e.f(t),100>e.b&&(e.b++,t.next=e.a,e.a=t)}function ot(){this.b=this.a=null}function at(){var e=cp,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function it(){this.next=this.b=this.a=null}function st(e,t){var n=e.length,r=s(e)?e.split(""):e;for(--n;0<=n;--n)n in r&&t.call(void 0,r[n],n,e)}function lt(t){a:{for(var n=No,r=t.length,o=s(t)?t.split(""):t,i=0;i<r;i++)if(i in o&&n.call(void 0,o[i],i,t)){n=i;break a}n=-1}return 0>n?null:s(t)?t.charAt(n):t[n]}function dt(e,t){return 0<=wa(e,t)}function pt(e,t){t=wa(e,t);var n;return(n=0<=t)&&Array.prototype.splice.call(e,t,1),n}function ct(t,n){var r=0;st(t,function(o,i){n.call(void 0,o,i,t)&&1==Array.prototype.splice.call(t,i,1).length&&r++})}function ut(){return Array.prototype.concat.apply([],arguments)}function ht(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function mt(t){for(var n=t.split("%s"),r="",o=Array.prototype.slice.call(arguments,1);o.length&&1<n.length;)r+=n.shift()+o.shift();return r+n.join("%s")}function gt(e){return Ta.test(e)?(-1!=e.indexOf("&")&&(e=e.replace(La,"&")),-1!=e.indexOf("<")&&(e=e.replace(Oa,"<")),-1!=e.indexOf(">")&&(e=e.replace(Pa,">")),-1!=e.indexOf("\"")&&(e=e.replace(Qa,""")),-1!=e.indexOf("'")&&(e=e.replace(Ra,"'")),-1!=e.indexOf("\0")&&(e=e.replace(Sa,"�")),e):e}function ft(e,t){return-1!=e.indexOf(t)}function w(e,t){return e<t?-1:e>t?1:0}function yt(e){return ft(Na,e)}function x(e,t){for(var n in e)t.call(void 0,e[n],n,e)}function bt(e){for(var t in e)return!1;return!0}function xt(e){var t={},n;for(n in e)t[n]=e[n];return t}function vt(t){for(var n=1,e,r;n<arguments.length;n++){for(e in r=arguments[n],r)t[e]=r[e];for(var o=0;o<Xa.length;o++)e=Xa[o],Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}}function kt(e){dp.setTimeout(function(){throw e},0)}function St(){var e=dp.MessageChannel;if("undefined"==typeof e&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!yt("Presto")&&(e=function(){var e=document.createElement("IFRAME");e.style.display="none",e.src="",document.documentElement.appendChild(e);var t=e.contentWindow;e=t.document,e.open(),e.write(""),e.close();var n="callImmediate"+Math.random(),r="file:"==t.location.protocol?"*":t.location.protocol+"//"+t.location.host;e=j(function(e){("*"==r||e.origin==r)&&e.data==n&&this.port1.onmessage()},this),t.addEventListener("message",e,!1),this.port1={},this.port2={postMessage:function(){t.postMessage(n,r)}}}),"undefined"!=typeof e&&!yt("Trident")&&!yt("MSIE")){var t=new e,n={},r=n;return t.port1.onmessage=function(){if(void 0!==n.next){n=n.next;var e=n.tb;n.tb=null,e()}},function(e){r.next={tb:e},r=r.next,t.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(e){var t=document.createElement("SCRIPT");t.onreadystatechange=function(){t.onreadystatechange=null,t.parentNode.removeChild(t),t=null,e(),e=null},document.documentElement.appendChild(t)}:function(e){dp.setTimeout(e,0)}}function wt(e,t){gp||Ct(),pp||(gp(),pp=!0),cp.add(e,t)}function Ct(){if(dp.Promise&&dp.Promise.resolve){var e=dp.Promise.resolve(void 0);gp=function(){e.then(Tt)}}else gp=function(){var e=Tt;!m(dp.setImmediate)||dp.Window&&dp.Window.prototype&&!yt("Edge")&&dp.Window.prototype.setImmediate==dp.setImmediate?(mp||(mp=St()),mp(e)):dp.setImmediate(e)}}function Tt(){for(var e;e=at();){try{e.a.call(e.b)}catch(e){kt(e)}rt(g,e)}pp=!1}function _t(e,t){if(this.a=ya,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,e!=p)try{var n=this;e.call(t,function(e){Dt(n,up,e)},function(e){if(!(e instanceof qt))try{if(e instanceof Error)throw e;throw Error("Promise rejected.")}catch(t){}Dt(n,hp,e)})}catch(e){Dt(this,hp,e)}}function y(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}function Et(e,t,n){var r=fp.get();return r.g=e,r.b=t,r.f=n,r}function At(e){if(e instanceof _t)return e;var t=new _t(p);return Dt(t,up,e),t}function A(e){return new _t(function(t,n){n(e)})}function B(e,t,n){Rt(e,t,n,null)||wt(r(t,e))}function It(t){return new _t(function(n,o){var i=t.length,s=[];if(i)for(var e=function(e,t){i--,s[e]=t,0==i&&n(s)},l=function(e){o(e)},d=0,c;d<t.length;d++)c=t[d],B(c,r(e,d),l);else n(s)})}function Nt(t){return new _t(function(n){var o=t.length,i=[];if(o)for(var s=function(e,t,r){o--,i[e]=t?{Zb:!0,value:r}:{Zb:!1,reason:r},0==o&&n(i)},e=0,l;e<t.length;e++)l=t[e],B(l,r(s,e,!0),r(s,e,!1));else n(i)})}function Lt(t,n){if(t.a==ya)if(t.c){var r=t.c;if(r.b){for(var o=0,i=null,e=null,s=r.b;s&&(s.c||(o++,s.a==t&&(i=s),!(i&&1<o)));s=s.next)i||(e=s);i&&(r.a==ya&&1==o?Lt(r,n):(e?(o=e,o.next==r.f&&(r.f=o),o.next=o.next.next):Ft(r),Ut(r,i,hp,n)))}t.c=null}else Dt(t,hp,n)}function Ot(e,t){e.b||e.a!=up&&e.a!=hp||Bt(e),e.f?e.f.next=t:e.b=t,e.f=t}function Mt(t,n,r,o){var i=Et(null,null,null);return i.a=new _t(function(t,s){i.g=n?function(r){try{var i=n.call(o,r);t(i)}catch(e){s(e)}}:t,i.b=r?function(n){try{var i=r.call(o,n);void 0===i&&n instanceof qt?s(n):t(i)}catch(e){s(e)}}:s}),i.a.c=t,Ot(t,i),i.a}function Dt(e,t,n){e.a==ya&&(e===n&&(t=hp,n=new TypeError("Promise cannot resolve to itself")),e.a=1,Rt(n,e.Lc,e.Mc,e)||(e.i=n,e.a=t,e.c=null,Bt(e),t!=hp||n instanceof qt||jt(e,n)))}function Rt(t,n,r,o){if(t instanceof _t)return Ot(t,Et(n||p,r||null,o)),!0;if(_e(t))return t.then(n,r,o),!0;if(z(t))try{var i=t.then;if(m(i))return Pt(t,i,n,r,o),!0}catch(e){return r.call(o,e),!0}return!1}function Pt(t,n,r,o,i){function e(e){l||(l=!0,o.call(i,e))}function s(e){l||(l=!0,r.call(i,e))}var l=!1;try{n.call(t,s,e)}catch(t){e(t)}}function Bt(e){e.h||(e.h=!0,wt(e.Ub,e))}function Ft(e){var t=null;return e.b&&(t=e.b,e.b=t.next,t.next=null),e.b||(e.f=null),t}function Ut(e,t,n,r){if(n==hp&&t.b&&!t.c)for(;e&&e.g;e=e.c)e.g=!1;if(t.a)t.a.c=null,zt(t,n,r);else try{t.c?t.g.call(t.f):zt(t,n,r)}catch(t){yp.call(null,t)}rt(fp,t)}function zt(e,t,n){t==up?e.g.call(e.f,n):e.b&&e.b.call(e.f,n)}function jt(e,t){e.g=!0,wt(function(){e.g&&yp.call(null,t)})}function qt(e){et.call(this,e)}function Vt(){0!=bp&&(xp[this[k]||(this[k]=++ia)]=this),this.pa=this.pa,this.ja=this.ja}function Wt(){}function Ht(e){return Ht[" "](e),e}function Kt(e,t){var n=Np;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}function Gt(){var e=dp.document;return e?e.documentMode:void 0}function Xt(t){return Kt(t,function(){for(var r=0,o=Ca(_p+"").split("."),i=Ca(t+"").split("."),s=n(o.length,i.length),e=0;0==r&&e<s;e++){var l=o[e]||"",d=i[e]||"";do{if(l=/(\d*)(\D*)(.*)/.exec(l)||["","","",""],d=/(\d*)(\D*)(.*)/.exec(d)||["","","",""],0==l[0].length&&0==d[0].length)break;r=w(0==l[1].length?0:parseInt(l[1],10),0==d[1].length?0:parseInt(d[1],10))||w(0==l[2].length,0==d[2].length)||w(l[2],d[2]),l=l[3],d=d[3]}while(0==r)}return 0<=r})}function Qt(e,t){this.type=e,this.b=this.target=t,this.Gb=!0}function C(t,n){if(Qt.call(this,t?t.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,t){var r=this.type=t.type,o=t.changedTouches?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.b=n,!(n=t.relatedTarget))"mouseover"==r?n=t.fromElement:"mouseout"==r&&(n=t.toElement);else if(Cp){a:{try{Ht(n.nodeName);var i=!0;break a}catch(e){}i=!1}i||(n=null)}this.relatedTarget=n,null===o?(this.clientX=void 0===t.clientX?t.pageX:t.clientX,this.clientY=void 0===t.clientY?t.pageY:t.clientY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0===o.clientX?o.pageX:o.clientX,this.clientY=void 0===o.clientY?o.pageY:o.clientY,this.screenX=o.screenX||0,this.screenY=o.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=s(t.pointerType)?t.pointerType:Bp[t.pointerType]||"",this.a=t,t.defaultPrevented&&this.preventDefault()}}function Yt(t,n,r,o,i){this.listener=t,this.proxy=null,this.src=n,this.type=r,this.capture=!!o,this.La=i,this.key=++Up,this.na=this.Ia=!1}function Jt(e){e.na=!0,e.listener=null,e.proxy=null,e.src=null,e.La=null}function $t(e){this.src=e,this.a={},this.b=0}function Zt(e,t){var n=t.type;n in e.a&&pt(e.a[n],t)&&(Jt(t),0==e.a[n].length&&(delete e.a[n],e.b--))}function en(t,n,r,o){for(var i=0,e;i<t.length;++i)if(e=t[i],!e.na&&e.listener==n&&e.capture==!!r&&e.La==o)return i;return-1}function tn(t,n,r,o,i){if(o&&o.once)on(t,n,r,o,i);else if(_(n))for(var e=0;e<n.length;e++)tn(t,n[e],r,o,i);else r=un(r),t&&t[Fp]?E(t,n,r,z(o)?!!o.capture:!!o,i):nn(t,n,r,!1,o,i)}function nn(t,n,r,o,i,s){if(!n)throw Error("Invalid event type");var l=z(i)?!!i.capture:!!i,d=cn(t);if(d||(t[zp]=d=new $t(t)),r=d.add(n,r,o,l,s),!r.proxy){if(o=rn(),r.proxy=o,o.src=t,o.listener=r,t.addEventListener)Pp||(i=l),void 0===i&&(i=!1),t.addEventListener(n.toString(),o,i);else if(t.attachEvent)t.attachEvent(sn(n.toString()),o);else if(t.addListener&&t.removeListener)t.addListener(o);else throw Error("addEventListener and attachEvent are unavailable.");qp++}}function rn(){var e=pn,t=Dp?function(n){return e.call(t.src,t.listener,n)}:function(n){if(n=e.call(t.src,t.listener,n),!n)return n};return t}function on(t,n,r,o,i){if(_(n))for(var e=0;e<n.length;e++)on(t,n[e],r,o,i);else r=un(r),t&&t[Fp]?mn(t,n,r,z(o)?!!o.capture:!!o,i):nn(t,n,r,!0,o,i)}function an(t,n,r,o,i){if(_(n))for(var e=0;e<n.length;e++)an(t,n[e],r,o,i);else(o=z(o)?!!o.capture:!!o,r=un(r),t&&t[Fp])?(t=t.m,n=(n+"").toString(),n in t.a&&(e=t.a[n],r=en(e,r,o,i),-1<r&&(Jt(e[r]),Array.prototype.splice.call(e,r,1),0==e.length&&(delete t.a[n],t.b--)))):t&&(t=cn(t))&&(n=t.a[n.toString()],t=-1,n&&(t=en(n,r,o,i)),(r=-1<t?n[t]:null)&&D(r))}function D(e){if("number"!=typeof e&&e&&!e.na){var t=e.src;if(t&&t[Fp])Zt(t.m,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(sn(n),r):t.addListener&&t.removeListener&&t.removeListener(r),qp--,(n=cn(t))?(Zt(n,e),0==n.b&&(n.src=null,t[zp]=null)):Jt(e)}}}function sn(e){return e in jp?jp[e]:jp[e]="on"+e}function ln(t,n,r,o){var i=!0;if((t=cn(t))&&(n=t.a[n.toString()]))for(n=n.concat(),t=0;t<n.length;t++){var e=n[t];e&&e.capture==r&&!e.na&&(e=dn(e,o),i=i&&!1!==e)}return i}function dn(e,t){var n=e.listener,r=e.La||e.src;return e.Ia&&D(e),n.call(r,t)}function pn(t,n){if(t.na)return!0;if(!Dp){if(!n)a:{n=["window","event"];for(var r=dp,o=0;o<n.length;o++)if(r=r[n[o]],null==r){n=null;break a}n=r}if(o=n,n=new C(o,this),r=!0,!(0>o.keyCode||void 0!=o.returnValue)){a:{var i=!1;if(0==o.keyCode)try{o.keyCode=-1;break a}catch(e){i=!0}(i||void 0==o.returnValue)&&(o.returnValue=!0)}for(o=[],i=n.b;i;i=i.parentNode)o.push(i);for(t=t.type,i=o.length-1;0<=i;i--){n.b=o[i];var e=ln(o[i],t,!0,n);r=r&&e}for(i=0;i<o.length;i++)n.b=o[i],e=ln(o[i],t,!1,n),r=r&&e}return r}return dn(t,new C(n,this))}function cn(e){return e=e[zp],e instanceof $t?e:null}function un(e){return m(e)?e:(e[Vp]||(e[Vp]=function(t){return e.handleEvent(t)}),e[Vp])}function hn(){Vt.call(this),this.m=new $t(this),this.Nb=this,this.Ua=null}function E(t,n,r,o,i){t.m.add(n+"",r,!1,o,i)}function mn(t,n,r,o,i){t.m.add(n+"",r,!0,o,i)}function gn(t,n,r,o){if(n=t.m.a[n+""],!n)return!0;n=n.concat();for(var i=!0,e=0,s;e<n.length;++e)if(s=n[e],s&&!s.na&&s.capture==r){var l=s.listener,d=s.La||s.src;s.Ia&&Zt(t.m,s),i=!1!==l.call(d,o)&&i}return i&&0!=o.Gb}function fn(e,t,n){if(m(e))n&&(e=j(e,n));else if(e&&"function"==typeof e.handleEvent)e=j(e.handleEvent,e);else throw Error("Invalid listener argument");return 2147483647<+t?-1:dp.setTimeout(e,t||0)}function yn(e){var t=null;return new _t(function(n,r){t=fn(function(){n(void 0)},e),-1==t&&r(Error("Failed to schedule timer."))}).s(function(e){throw dp.clearTimeout(t),e})}function bn(e){if(e.S&&"function"==typeof e.S)return e.S();if(s(e))return e.split("");if(h(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}function xn(e){if(e.U&&"function"==typeof e.U)return e.U();if(!e.S||"function"!=typeof e.S){if(h(e)||s(e)){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}for(var r in t=[],n=0,e)t[n++]=r;return t}}function vn(t,n){if(t.forEach&&"function"==typeof t.forEach)t.forEach(n,void 0);else if(h(t)||s(t))za(t,n,void 0);else for(var r=xn(t),o=bn(t),i=o.length,e=0;e<i;e++)n.call(void 0,o[e],r&&r[e],t)}function kn(e){this.b={},this.a=[],this.c=0;var t=arguments.length;if(1<t){if(t%2)throw Error("Uneven number of arguments");for(var n=0;n<t;n+=2)this.set(arguments[n],arguments[n+1])}else if(e)if(e instanceof kn)for(t=e.U(),n=0;n<t.length;n++)this.set(t[n],e.get(t[n]));else for(n in e)this.set(n,e[n])}function Sn(t){if(t.c!=t.a.length){for(var n=0,r=0,o;n<t.a.length;)o=t.a[n],wn(t.b,o)&&(t.a[r++]=o),n++;t.a.length=r}if(t.c!=t.a.length){var i={};for(r=n=0;n<t.a.length;)o=t.a[n],wn(i,o)||(t.a[r++]=o,i[o]=1),n++;t.a.length=r}}function wn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Cn(t,n){if(t){t=t.split("&");for(var r=0;r<t.length;r++){var o=t[r].indexOf("="),i=null;if(0<=o){var e=t[r].substring(0,o);i=t[r].substring(o+1)}else e=t[r];n(e,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}function Tn(e,t){if(this.b=this.m=this.c="",this.i=null,this.h=this.g="",this.f=!1,e instanceof Tn){this.f=void 0===t?e.f:t,_n(this,e.c),this.m=e.m,this.b=e.b,En(this,e.i),this.g=e.g,t=e.a;var n=new Rn;n.c=t.c,t.a&&(n.a=new kn(t.a),n.b=t.b),An(this,n),this.h=e.h}else e&&(n=(e+"").match(Wp))?(this.f=!!t,_n(this,n[1]||"",!0),this.m=On(n[2]||""),this.b=On(n[3]||"",!0),En(this,n[4]),this.g=On(n[5]||"",!0),An(this,n[6]||"",!0),this.h=On(n[7]||"")):(this.f=!!t,this.a=new Rn(null,this.f))}function _n(e,t,n){e.c=n?On(t,!0):t,e.c&&(e.c=e.c.replace(/:$/,""))}function En(e,t){if(t){if(t=+t,isNaN(t)||0>t)throw Error("Bad port number "+t);e.i=t}else e.i=null}function An(e,t,n){t instanceof Rn?(e.a=t,qn(e.a,e.f)):(n||(t=Mn(t,Xp)),e.a=new Rn(t,e.f))}function In(e,t,n){e.a.set(t,n)}function F(e,t){return e.a.get(t)}function Nn(e){return e instanceof Tn?new Tn(e):new Tn(e,void 0)}function Ln(e,t){var n=new Tn(null,void 0);return _n(n,"https"),e&&(n.b=e),t&&(n.g=t),n}function On(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Mn(e,t,n){return s(e)?(e=encodeURI(e).replace(t,Dn),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Dn(e){return e=e.charCodeAt(0),"%"+(15&e>>4).toString(16)+(15&e).toString(16)}function Rn(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function Pn(e){e.a||(e.a=new kn,e.b=0,e.c&&Cn(e.c,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function Bn(t){var n=xn(t);if("undefined"==typeof n)throw Error("Keys are undefined");var r=new Rn(null,void 0);t=bn(t);for(var o=0;o<n.length;o++){var i=n[o],e=t[o];_(e)?zn(r,i,e):r.add(i,e)}return r}function Fn(e,t){Pn(e),t=jn(e,t),wn(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,e=e.a,wn(e.b,t)&&(delete e.b[t],e.c--,e.a.length>2*e.c&&Sn(e)))}function Un(e,t){return Pn(e),t=jn(e,t),wn(e.a.b,t)}function zn(e,t,n){Fn(e,t),0<n.length&&(e.c=null,e.a.set(jn(e,t),ht(n)),e.b+=n.length)}function jn(e,t){return t+="",e.f&&(t=t.toLowerCase()),t}function qn(e,t){t&&!e.f&&(Pn(e),e.c=null,e.a.forEach(function(e,t){var n=t.toLowerCase();t!=n&&(Fn(this,t),zn(this,n,e))},e)),e.f=t}function Vn(){this.a="",this.b=Qp}function Wn(e){return e instanceof Vn&&e.constructor===Vn&&e.b===Qp?e.a:(tt("expected object of type Const, got '"+e+"'"),"type_error:Const")}function Hn(e){var t=new Vn;return t.a=e,t}function Kn(){this.a="",this.b=wd}function Gn(e){return e instanceof Kn&&e.constructor===Kn&&e.b===wd?e.a:(tt("expected object of type TrustedResourceUrl, got '"+e+"' of type "+d(e)),"type_error:TrustedResourceUrl")}function Xn(e,t){var n=Wn(e);if(!xd.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return e=n.replace(pd,function(r,o){if(!Object.prototype.hasOwnProperty.call(t,o))throw Error("Found marker, \""+o+"\", in format string, \""+n+"\", but no valid label mapping found in args: "+JSON.stringify(t));return r=t[o],r instanceof Vn?Wn(r):encodeURIComponent(r+"")}),Qn(e)}function Qn(e){var t=new Kn;return t.a=e,t}function Yn(){this.a="",this.b=Cd}function Jn(e){return e instanceof Yn&&e.constructor===Yn&&e.b===Cd?e.a:(tt("expected object of type SafeUrl, got '"+e+"' of type "+d(e)),"type_error:SafeUrl")}function $n(e){return e instanceof Yn?e:(e=e.ma?e.la():e+"",td.test(e)||(e="about:invalid#zClosurez"),Zn(e))}function Zn(e){var t=new Yn;return t.a=e,t}function er(){this.a="",this.b=Ad}function tr(e){return e instanceof er&&e.constructor===er&&e.b===Ad?e.a:(tt("expected object of type SafeHtml, got '"+e+"' of type "+d(e)),"type_error:SafeHtml")}function nr(e){var t=new er;return t.a=e,t}function rr(e){var t=document;return s(e)?t.getElementById(e):e}function or(e,t){x(t,function(t,n){t&&t.ma&&(t=t.la()),"style"==n?e.style.cssText=t:"class"==n?e.className=t:"for"==n?e.htmlFor=t:Gd.hasOwnProperty(n)?e.setAttribute(Gd[n],t):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?e.setAttribute(n,t):e[n]=t})}function ar(){var t=arguments,n=document,e=t[0]+"",r=t[1];if(!ad&&r&&(r.name||r.type)){if(e=["<",e],r.name&&e.push(" name=\"",gt(r.name),"\""),r.type){e.push(" type=\"",gt(r.type),"\"");var o={};vt(o,r),delete o.type,r=o}e.push(">"),e=e.join("")}return e=n.createElement(e),r&&(s(r)?e.className=r:_(r)?e.className=r.join(" "):or(e,r)),2<t.length&&ir(n,e,t),e}function ir(t,n,r){function o(e){e&&n.appendChild(s(e)?t.createTextNode(e):e)}for(var i=2,e;i<r.length;i++)e=r[i],!h(e)||z(e)&&0<e.nodeType?o(e):za(sr(e)?ht(e):e,o)}function sr(e){if(e&&"number"==typeof e.length){if(z(e))return"function"==typeof e.item||"string"==typeof e.item;if(m(e))return"function"==typeof e.item}return!1}function lr(e){var t=[];return pr(new dr,e,t),t.join("")}function dr(){}function pr(t,n,r){if(null==n)r.push("null");else{if("object"==typeof n){if(_(n)){var o=n;n=o.length,r.push("[");for(var i="",e=0;e<n;e++)r.push(i),pr(t,o[e],r),i=",";return void r.push("]")}if(n instanceof String||n instanceof Number||n instanceof Boolean)n=n.valueOf();else{for(o in r.push("{"),i="",n)Object.prototype.hasOwnProperty.call(n,o)&&(e=n[o],"function"!=typeof e&&(r.push(i),cr(o,r),r.push(":"),pr(t,e,r),i=","));return void r.push("}")}}switch(typeof n){case"string":cr(n,r);break;case"number":r.push(isFinite(n)&&!isNaN(n)?n+"":"null");break;case"boolean":r.push(n+"");break;case"function":r.push("null");break;default:throw Error("Unknown type: "+typeof n);}}}function cr(e,t){t.push("\"",e.replace(Td,function(e){var t=Ld[e];return t||(t="\\u"+(65536|e.charCodeAt(0)).toString(16).substr(1),Ld[e]=t),t}),"\"")}function ur(){var e=re();return kp&&!!Op&&11==Op||/Edge\/\d+/.test(e)}function hr(){return dp.window&&dp.window.location.href||self&&self.location&&self.location.href||""}function mr(e,t){t=t||dp.window;var n="about:blank";e&&(n=Jn($n(e))),t.location.href=n}function gr(e,t){var n=[],r;for(r in e)r in t?typeof e[r]==typeof t[r]?"object"==typeof e[r]&&null!=e[r]&&null!=t[r]?0<gr(e[r],t[r]).length&&n.push(r):e[r]!==t[r]&&n.push(r):n.push(r):n.push(r);for(r in t)r in e||n.push(r);return n}function fr(){var e=re();return e=pe(e)==ee?(e=e.match(/\sChrome\/(\d+)/i))&&2==e.length?parseInt(e[1],10):null:null,e&&30>e?!1:!kp||!Op||9<Op}function yr(e){return e=(e||re()).toLowerCase(),e.match(/android/)||e.match(/webos/)||e.match(/iphone|ipad|ipod/)||e.match(/blackberry/)||e.match(/windows phone/)||e.match(/iemobile/)}function be(e){e=e||dp.window;try{e.close()}catch(e){}}function ce(t,n,r){var o=i(1E9*Math.random()).toString();n=n||500,r=r||600;var s=(window.screen.availHeight-r)/2,e=(window.screen.availWidth-n)/2;for(l in n={width:n,height:r,top:0<s?s:0,left:0<e?e:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},r=re().toLowerCase(),o&&(n.target=o,ft(r,"crios/")&&(n.target="_blank")),pe(re())==ge&&(t=t||"http://localhost",n.scrollbars=!0),r=t||"",(t=n)||(t={}),o=window,n=r instanceof Yn?r:$n("undefined"==typeof r.href?r+"":r.href),r=t.target||r.target,s=[],t)switch(l){case"width":case"height":case"top":case"left":s.push(l+"="+t[l]);break;case"target":case"noopener":case"noreferrer":break;default:s.push(l+"="+(t[l]?1:0));}var l=s.join(",");if((yt("iPhone")&&!yt("iPod")&&!yt("iPad")||yt("iPad")||yt("iPod"))&&o.navigator&&o.navigator.standalone&&r&&"_self"!=r?(l=o.document.createElement("A"),n instanceof Yn||n instanceof Yn||(n=n.ma?n.la():n+"",td.test(n)||(n="about:invalid#zClosurez"),n=Zn(n)),l.href=Jn(n),l.setAttribute("target",r),t.noreferrer&&l.setAttribute("rel","noreferrer"),t=document.createEvent("MouseEvent"),t.initMouseEvent("click",!0,!0,o,1),l.dispatchEvent(t),l={}):t.noreferrer?(l=o.open("",r,l),t=Jn(n),l&&(wp&&ft(t,";")&&(t="'"+t.replace(/'/g,"%27")+"'"),l.opener=null,Hn("b/12014412, meta tag with sanitized URL"),t="<meta name=\"referrer\" content=\"no-referrer\"><meta http-equiv=\"refresh\" content=\"0; url="+gt(t)+"\">",t=nr(t),l.document.write(tr(t)),l.document.close())):(l=o.open(Jn(n),r,l))&&t.noopener&&(l.opener=null),l)try{l.focus()}catch(e){}return l}function de(e){return new _t(function(t){function n(){yn(2E3).then(function(){return!e||e.closed?void t():n()})}return n()})}function fe(){var e=null;return new _t(function(t){"complete"==dp.document.readyState?t():(e=function(){t()},on(window,"load",e))}).s(function(t){throw an(window,"load",e),t})}function he(){return ie(void 0)?fe().then(function(){return new _t(function(e,t){var n=dp.document,r=setTimeout(function(){t(Error("Cordova framework is not ready."))},1E3);n.addEventListener("deviceready",function(){clearTimeout(r),e()},!1)})}):A(Error("Cordova must run in an Android or iOS file scheme."))}function ie(e){return e=e||re(),"file:"===ve()&&e.toLowerCase().match(/iphone|ipad|ipod|android/)}function je(){var e=dp.window;try{return e&&e!=e.top}catch(e){return!1}}function le(){return"object"!=typeof dp.window&&"function"==typeof dp.importScripts}function me(){return sp.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":sp.INTERNAL.hasOwnProperty("node")?"Node":le()?"Worker":"Browser"}function ne(){var e=me();return"ReactNative"===e||"Node"===e}function oe(){for(var e=50,t=[];0<e;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(i(62*Math.random()))),e--;return t.join("")}function pe(e){var t=e.toLowerCase();if(ft(t,"opera/")||ft(t,"opr/")||ft(t,"opios/"))return"Opera";if(ft(t,"iemobile"))return"IEMobile";if(ft(t,"msie")||ft(t,"trident/"))return"IE";if(ft(t,"edge/"))return"Edge";if(ft(t,"firefox/"))return ge;if(ft(t,"silk/"))return"Silk";if(ft(t,"blackberry"))return"Blackberry";if(ft(t,"webos"))return"Webos";if(!(!ft(t,"safari/")||ft(t,"chrome/")||ft(t,"crios/")||ft(t,"android")))return"Safari";if(!ft(t,"chrome/")&&!ft(t,"crios/")||ft(t,"edge/")){if(ft(t,"android"))return"Android";if((e=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==e.length)return e[1]}else return ee;return"Other"}function br(t,n){n=n||[];var r=[],o={},i;for(i in ae)o[ae[i]]=!0;for(i=0;i<n.length;i++)"undefined"!=typeof o[n[i]]&&(delete o[n[i]],r.push(n[i]));return r.sort(),n=r,n.length||(n=["FirebaseCore-web"]),r=me(),"Browser"===r?(o=re(),r=pe(o)):"Worker"==r&&(o=re(),r=pe(o)+"-"+r),r+"/JsCore/"+t+"/"+n.join(",")}function re(){return dp.navigator&&dp.navigator.userAgent||""}function G(e,t){e=e.split("."),t=t||dp;for(var n=0;n<e.length&&"object"==typeof t&&null!=t;n++)t=t[e[n]];return n!=e.length&&(t=void 0),t}function H(){try{var e=dp.localStorage,t=ze();if(e)return e.setItem(t,"1"),e.removeItem(t),!ur()||!!dp.indexedDB}catch(e){return le()&&!!dp.indexedDB}return!1}function se(){return(ue()||"chrome-extension:"===ve()||ie())&&!ne()&&H()&&!le()}function ue(){return"http:"===ve()||"https:"===ve()}function ve(){return dp.location&&dp.location.protocol||null}function ke(e){return e=e||re(),yr(e)||pe(e)==ge?!1:!0}function we(e){return"undefined"==typeof e?null:lr(e)}function xe(e){var t={},n;for(n in e)e.hasOwnProperty(n)&&null!==e[n]&&void 0!==e[n]&&(t[n]=e[n]);return t}function ye(e){if(null!==e)return JSON.parse(e)}function ze(e){return e?e:i(1E9*Math.random()).toString()}function te(e){return e=e||re(),"Safari"==pe(e)||e.toLowerCase().match(/iphone|ipad|ipod/)?!1:!0}function Ae(){var e=dp.___jsl;if(e&&e.H)for(var t in e.H)if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=e.H[t].L.concat(),e.CP)for(var n=0;n<e.CP.length;n++)e.CP[n]=null}function Be(e,t){if(e>t)throw Error("Short delay should be less than long delay!");this.a=e,this.c=t,e=re(),t=me(),this.b=yr(e)||"ReactNative"===t}function Ce(){var e=dp.document;return e&&"undefined"!=typeof e.visibilityState?"visible"==e.visibilityState:!0}function De(){var e=dp.document,t=null;return Ce()||!e?At():new _t(function(n){t=function(){Ce()&&(e.removeEventListener("visibilitychange",t,!1),n())},e.addEventListener("visibilitychange",t,!1)}).s(function(n){throw e.removeEventListener("visibilitychange",t,!1),n})}function Ee(e){try{var t=new Date(parseInt(e,10));if(!isNaN(t.getTime())&&!/[^0-9]/.test(e))return t.toUTCString()}catch(e){}return null}function Fe(){return G("fireauth.oauthhelper",dp)||G("fireauth.iframe",dp)}function Ge(e){qe[e]||(qe[e]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e))}function Ie(e,t,n){He?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n}):e[t]=n}function I(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&Ie(e,n,t[n])}function J(e){var t={};return I(t,e),t}function Le(e){var t={},n;for(n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Me(e,t){if(!t||!t.length)return!0;if(!e)return!1;for(var n=0,r;n<t.length;n++)if(r=e[t[n]],void 0===r||null===r||""===r)return!1;return!0}function Ne(e){var t=e;if("object"==typeof e&&null!=e)for(var n in t="length"in e?[]:{},e)Ie(t,n,Ne(e[n]));return t}function Oe(e){var t={},n=e[Te],r=e[Qe];if(e=e[Re],!e||e!=Ke&&!n)throw Error("Invalid provider user info!");t[Ve]=r||null,t[Se]=n||null,Ie(this,Xe,e),Ie(this,Ue,Ne(t))}function Pe(e,t){this.code=We+e,this.message=t||Ye[e]||""}function xr(e){var t=e&&e.code;return t?new Pe(t.substring(We.length),e.message):null}function $e(e){var t=e[$p];if("undefined"==typeof t)throw new Pe("missing-continue-uri");if("string"!=typeof t||"string"==typeof t&&!t.length)throw new Pe("invalid-continue-uri");this.h=t,this.b=this.a=null,this.g=!1;var n=e[Ze];if(n&&"object"==typeof n){t=n[tc];var r=n[Zp];if(n=n[ec],"string"==typeof t&&t.length){if(this.a=t,"undefined"!=typeof r&&"boolean"!=typeof r)throw new Pe("argument-error",Zp+" property must be a boolean when specified.");if(this.g=!!r,"undefined"!=typeof n&&("string"!=typeof n||"string"==typeof n&&!n.length))throw new Pe("argument-error",ec+" property must be a non empty string when specified.");this.b=n||null}else{if("undefined"!=typeof t)throw new Pe("argument-error",tc+" property must be a non empty string when specified.");if("undefined"!=typeof r||"undefined"!=typeof n)throw new Pe("missing-android-pkg-name")}}else if("undefined"!=typeof n)throw new Pe("argument-error",Ze+" property must be a non null object when specified.");if(this.f=null,(t=e[Jp])&&"object"==typeof t){if(t=t[nc],"string"==typeof t&&t.length)this.f=t;else if("undefined"!=typeof t)throw new Pe("argument-error",nc+" property must be a non empty string when specified.");}else if("undefined"!=typeof t)throw new Pe("argument-error",Jp+" property must be a non null object when specified.");if(e=e[Yp],"undefined"!=typeof e&&"boolean"!=typeof e)throw new Pe("argument-error",Yp+" property must be a boolean when specified.");this.c=!!e}function vr(e){var t={};for(var n in t.continueUrl=e.h,t.canHandleCodeInApp=e.c,(t.androidPackageName=e.a)&&(t.androidMinimumVersion=e.b,t.androidInstallApp=e.g),t.iOSBundleId=e.f,t)null===t[n]&&delete t[n];return t}function kr(e){return v(e,function(e){return e=e.toString(16),1<e.length?e:"0"+e}).join("")}function Sr(e){var t="";return wr(e,function(e){t+=String.fromCharCode(e)}),t}function wr(t,n){function r(n){for(;o<t.length;){var r=t.charAt(o++),i=oc[r];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(r))throw Error("Unknown base64 encoding at char: "+r)}return n}Cr();for(var o=0;;){var i=r(-1),e=r(0),s=r(64),l=r(64);if(64===l&&-1===i)break;n(i<<2|e>>4),64!=s&&(n(240&e<<4|s>>2),64!=l&&n(192&s<<6|l))}}function Cr(){if(!rc){rc={},oc={};for(var e=0;65>e;e++)rc[e]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e),oc[rc[e]]=e,62<=e&&(oc["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(e)]=e)}}function Tr(e){this.c=e.sub,ja(),this.a=e.provider_id||e.firebase&&e.firebase.sign_in_provider||null,this.b=!!e.is_anonymous||"anonymous"==this.a}function _r(e){return(e=Er(e))&&e.sub&&e.iss&&e.aud&&e.exp?new Tr(e):null}function Er(e){if(!e)return null;if(e=e.split("."),3!=e.length)return null;e=e[1];for(var t=(4-e.length%4)%4,n=0;n<t;n++)e+=".";try{return JSON.parse(Sr(e))}catch(e){}return null}function Ar(e){for(var t in sc)if(sc[t].Na==e)return sc[t];return null}function Ir(e){var t={"facebook.com":Or,"google.com":Dr,"github.com":Mr,"twitter.com":Rr},n=e&&e[dc];try{if(n)return t[n]?new t[n](e):new Lr(e);if("undefined"!=typeof e[lc])return new Nr(e)}catch(e){}return null}function Nr(e){var t=e[dc];if(!t&&e[lc]){var n=_r(e[lc]);n&&n.a&&(t=n.a)}if(!t)throw Error("Invalid additional user info!");("anonymous"==t||"custom"==t)&&(t=null),n=!1,"undefined"==typeof e.isNewUser?"identitytoolkit#SignupNewUserResponse"===e.kind&&(n=!0):n=!!e.isNewUser,Ie(this,"providerId",t),Ie(this,"isNewUser",n)}function Lr(e){Nr.call(this,e),e=ye(e.rawUserInfo||"{}"),Ie(this,"profile",Ne(e||{}))}function Or(e){if(Lr.call(this,e),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function Mr(e){if(Lr.call(this,e),"github.com"!=this.providerId)throw Error("Invalid provider ID!");Ie(this,"username",this.profile&&this.profile.login||null)}function Dr(e){if(Lr.call(this,e),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function Rr(e){if(Lr.call(this,e),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");Ie(this,"username",e.screenName||null)}function Pr(e){this.a=Nn(e)}function Br(e){var t=Nn(e),n=F(t,"link"),r=F(Nn(n),"link");return t=F(t,"deep_link_id"),F(Nn(t),"link")||t||r||n||e}function Fr(e,t){return e.then(function(e){if(e[Ac]){var n=_r(e[Ac]);if(!n||t!=n.c)throw new Pe("user-mismatch");return e}throw new Pe("user-mismatch")}).s(function(e){throw e&&e.code&&e.code==We+"user-not-found"?new Pe("user-mismatch"):e})}function Ur(e,t,n){if(t.idToken||t.accessToken)t.idToken&&Ie(this,"idToken",t.idToken),t.accessToken&&Ie(this,"accessToken",t.accessToken);else if(t.oauthToken&&t.oauthTokenSecret)Ie(this,"accessToken",t.oauthToken),Ie(this,"secret",t.oauthTokenSecret);else throw new Pe("internal-error","failed to construct a credential");Ie(this,"providerId",e),Ie(this,"signInMethod",n)}function zr(e){var t={};return e.idToken&&(t.id_token=e.idToken),e.accessToken&&(t.access_token=e.accessToken),e.secret&&(t.oauth_token_secret=e.secret),t.providerId=e.providerId,{postBody:Bn(t).toString(),requestUri:"http://localhost"}}function jr(e,t){this.Ac=t||[],I(this,{providerId:e,isOAuthProvider:!0}),this.vb={},this.$a=(Ar(e)||{}).Ma||null,this.Ya=null}function qr(e){jr.call(this,e,ic),this.a=[]}function M(){qr.call(this,"facebook.com")}function Vr(e){if(!e)throw new Pe("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return z(e)&&(t=e.accessToken),new M().credential(null,t)}function Wr(){qr.call(this,"github.com")}function Hr(e){if(!e)throw new Pe("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return z(e)&&(t=e.accessToken),new Wr().credential(null,t)}function Kr(){qr.call(this,"google.com"),this.ta("profile")}function Gr(e,t){var n=e;return z(e)&&(n=e.idToken,t=e.accessToken),new Kr().credential(n,t)}function Xr(){jr.call(this,"twitter.com",ac)}function Qr(e,t){var n=e;if(z(n)||(n={oauthToken:e,oauthTokenSecret:t}),!n.oauthToken||!n.oauthTokenSecret)throw new Pe("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new Ur("twitter.com",n,"twitter.com")}function Yr(e,t,n){this.a=e,this.b=t,Ie(this,"providerId","password"),Ie(this,"signInMethod",n===Jr.EMAIL_LINK_SIGN_IN_METHOD?Jr.EMAIL_LINK_SIGN_IN_METHOD:Jr.EMAIL_PASSWORD_SIGN_IN_METHOD)}function Jr(){I(this,{providerId:"password",isOAuthProvider:!1})}function N(e,t){if(t=$r(t),!t)throw new Pe("argument-error","Invalid email link!");return new Yr(e,t,Jr.EMAIL_LINK_SIGN_IN_METHOD)}function $r(e){e=Br(e),e=new Pr(e);var t=F(e.a,"oobCode")||null;return"signIn"===(F(e.a,"mode")||null)&&t?t:null}function Zr(e){if(!(e.Sa&&e.Ra||e.Fa&&e.$))throw new Pe("internal-error");this.a=e,Ie(this,"providerId","phone"),Ie(this,"signInMethod","phone")}function eo(e){return e.a.Fa&&e.a.$?{temporaryProof:e.a.Fa,phoneNumber:e.a.$}:{sessionInfo:e.a.Sa,code:e.a.Ra}}function to(e){try{this.a=e||sp.auth()}catch(e){throw new Pe("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}I(this,{providerId:"phone",isOAuthProvider:!1})}function no(e,t){if(!e)throw new Pe("missing-verification-id");if(!t)throw new Pe("missing-verification-code");return new Zr({Sa:e,Ra:t})}function ro(e){if(e.temporaryProof&&e.phoneNumber)return new Zr({Fa:e.temporaryProof,$:e.phoneNumber});var t=e&&e.providerId;if(!t||"password"===t)return null;var n=e&&e.oauthAccessToken,r=e&&e.oauthTokenSecret;e=e&&e.oauthIdToken;try{return"google.com"===t?Gr(e,n):"facebook.com"===t?Vr(n):"github.com"===t?Hr(n):"twitter.com"===t?Qr(n,r):new qr(t).credential(e,n)}catch(t){return null}}function oo(e){if(!e.isOAuthProvider)throw new Pe("invalid-oauth-provider")}function ao(t,n,r,o,i){if(this.b=t,this.c=n||null,this.f=r||null,this.g=o||null,this.a=i||null,this.f||this.a){if(this.f&&this.a)throw new Pe("invalid-auth-event");if(this.f&&!this.g)throw new Pe("invalid-auth-event")}else throw new Pe("invalid-auth-event")}function io(e){return e=e||{},e.type?new ao(e.type,e.eventId,e.urlResponse,e.sessionId,e.error&&xr(e.error)):null}function so(){this.b=null,this.a=[]}function lo(e){var t="unauthorized-domain",n=Nn(e),r;e=n.b,n=n.c,"chrome-extension"==n?r=mt("This chrome extension ID (chrome-extension://%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.",e):"http"==n||"https"==n?r=mt("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.",e):t="operation-not-supported-in-this-environment",Pe.call(this,t,r)}function po(e,t,n){Pe.call(this,e,n),e=t||{},e.wb&&Ie(this,"email",e.wb),e.$&&Ie(this,"phoneNumber",e.$),e.credential&&Ie(this,"credential",e.credential)}function co(e){if(e.code){var t=e.code||"";0==t.indexOf(We)&&(t=t.substring(We.length));var n={credential:ro(e)};if(e.email)n.wb=e.email;else if(e.phoneNumber)n.$=e.phoneNumber;else return new Pe(t,e.message||void 0);return new po(t,n,e.message)}return null}function uo(){}function ho(e){return e.c||(e.c=e.b())}function mo(){}function go(e){if(!e.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var t=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0,r;n<t.length;n++){r=t[n];try{return new ActiveXObject(r),e.f=r}catch(t){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return e.f}function fo(){}function yo(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseText="",this.status=-1,this.statusText="",this.a.onload=j(this.bc,this),this.a.onerror=j(this.Bb,this),this.a.onprogress=j(this.cc,this),this.a.ontimeout=j(this.fc,this)}function bo(e,t){e.readyState=t,e.onreadystatechange&&e.onreadystatechange()}function xo(e,t,n){this.reset(e,t,n,void 0,void 0)}function vo(e){this.f=e,this.b=this.c=this.a=null}function ko(e,t){this.name=e,this.value=t}function So(e){return e.c?e.c:e.a?So(e.a):(tt("Root logger has no level set."),null)}function wo(e){vc||(vc=new vo(""),xc[""]=vc,vc.c=fc);var t;if(!(t=xc[e])){t=new vo(e);var n=e.lastIndexOf("."),r=e.substr(n+1);n=wo(e.substr(0,n)),n.b||(n.b={}),n.b[r]=t,t.a=n,xc[e]=t}return t}function Co(e,t){e&&e.log(yc,t,void 0)}function P(e){this.f=e}function To(e){hn.call(this),this.i=e,this.readyState=kc,this.status=0,this.responseText=this.statusText="",this.onreadystatechange=null,this.g=new Headers,this.b=null,this.h="GET",this.c="",this.a=!1,this.f=wo("goog.net.FetchXmlHttp")}function _o(e){e.onreadystatechange&&e.onreadystatechange.call(e)}function Eo(e){hn.call(this),this.headers=new kn,this.C=e||null,this.c=!1,this.w=this.a=null,this.h=this.N=this.l="",this.f=this.I=this.i=this.G=!1,this.g=0,this.u=null,this.o=Sc,this.v=this.O=!1}function Ao(t,n,r,o,i){if(t.a)throw Error("[goog.net.XhrIo] Object is active with another request="+t.l+"; newUri="+n);r=r?r.toUpperCase():"GET",t.l=n,t.h="",t.N=r,t.G=!1,t.c=!0,t.a=t.C?t.C.a():uc.a(),t.w=t.C?ho(t.C):ho(uc),t.a.onreadystatechange=j(t.Fb,t);try{Co(t.b,Uo(t,"Opening Xhr")),t.I=!0,t.a.open(r,n+"",!0),t.I=!1}catch(e){return Co(t.b,Uo(t,"Error opening Xhr: "+e.message)),void Lo(t,e)}n=o||"";var e=new kn(t.headers);i&&vn(i,function(t,n){e.set(n,t)}),i=lt(e.U()),o=dp.FormData&&n instanceof dp.FormData,!dt(Cc,r)||i||o||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),e.forEach(function(e,t){this.a.setRequestHeader(t,e)},t),t.o&&(t.a.responseType=t.o),"withCredentials"in t.a&&t.a.withCredentials!==t.O&&(t.a.withCredentials=t.O);try{Ro(t),0<t.g&&(t.v=Io(t.a),Co(t.b,Uo(t,"Will abort after "+t.g+"ms if incomplete, xhr2 "+t.v)),t.v?(t.a.timeout=t.g,t.a.ontimeout=j(t.Ga,t)):t.u=fn(t.Ga,t.g,t)),Co(t.b,Uo(t,"Sending request")),t.i=!0,t.a.send(n),t.i=!1}catch(e){Co(t.b,Uo(t,"Send error: "+e.message)),Lo(t,e)}}function Io(e){return kp&&Xt(9)&&"number"==typeof e.timeout&&void 0!==e.ontimeout}function No(e){return"content-type"==e.toLowerCase()}function Lo(e,t){e.c=!1,e.a&&(e.f=!0,e.a.abort(),e.f=!1),e.h=t,Oo(e),Do(e)}function Oo(e){e.G||(e.G=!0,e.dispatchEvent("complete"),e.dispatchEvent("error"))}function Mo(t){if(t.c&&"undefined"!=typeof lp)if(t.w[1]&&4==Po(t)&&2==Bo(t))Co(t.b,Uo(t,"Local request error detected and ignored"));else if(t.i&&4==Po(t))fn(t.Fb,0,t);else if(t.dispatchEvent("readystatechange"),4==Po(t)){Co(t.b,Uo(t,"Request complete")),t.c=!1;try{var n=Bo(t);a:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break a;default:r=!1;}var o;if(!(o=r)){var i;if(i=0===n){var e=(t.l+"").match(Wp)[1]||null;if(!e&&dp.self&&dp.self.location){var s=dp.self.location.protocol;e=s.substr(0,s.length-1)}i=!wc.test(e?e.toLowerCase():"")}o=i}if(o)t.dispatchEvent("complete"),t.dispatchEvent("success");else{try{var l=2<Po(t)?t.a.statusText:""}catch(e){Co(t.b,"Can not get status: "+e.message),l=""}t.h=l+" ["+Bo(t)+"]",Oo(t)}}finally{Do(t)}}}function Do(t,e){if(t.a){Ro(t);var n=t.a,r=t.w[0]?p:null;t.a=null,t.w=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(n){(t=t.b)&&t.log(mc,"Problem encountered resetting onreadystatechange: "+n.message,void 0)}}}function Ro(e){e.a&&e.v&&(e.a.ontimeout=null),e.u&&(dp.clearTimeout(e.u),e.u=null)}function Po(e){return e.a?e.a.readyState:0}function Bo(e){try{return 2<Po(e)?e.a.status:-1}catch(e){return-1}}function Fo(e){try{return e.a?e.a.responseText:""}catch(t){return Co(e.b,"Can not get responseText: "+t.message),""}}function Uo(e,t){return t+" ["+e.N+" "+e.l+" "+Bo(e)+"]"}function zo(e,t){this.g=[],this.v=e,this.u=t||null,this.f=this.a=!1,this.c=void 0,this.l=this.w=this.i=!1,this.h=0,this.b=null,this.m=0}function jo(e,t,n){e.a=!0,e.c=n,e.f=!t,Ko(e)}function qo(e){if(e.a){if(!e.l)throw new Go(e);e.l=!1}}function Vo(e,t){Wo(e,null,t,void 0)}function Wo(e,t,n,r){e.g.push([t,n,r]),e.a&&Ko(e)}function Ho(e){return Ba(e.g,function(e){return m(e[1])})}function Ko(t){if(t.h&&t.a&&Ho(t)){var n=t.h,r=Tc[n];r&&(dp.clearTimeout(r.a),delete Tc[n]),t.h=0}t.b&&(t.b.m--,delete t.b),n=t.c;for(var o=r=!1;t.g.length&&!t.i;){var i=t.g.shift(),e=i[0],s=i[1];if(i=i[2],e=t.f?s:e)try{var l=e.call(i||t.u,n);void 0!==l&&(t.f=t.f&&(l==n||l instanceof Error),t.c=n=l),(_e(n)||"function"==typeof dp.Promise&&n instanceof dp.Promise)&&(o=!0,t.i=!0)}catch(e){n=e,t.f=!0,Ho(t)||(r=!0)}}t.c=n,o&&(l=j(t.o,t,!0),o=j(t.o,t,!1),n instanceof zo?(Wo(n,l,o),n.w=!0):n.then(l,o)),r&&(n=new Qo(n),Tc[n.a]=n,t.h=n.a)}function Go(){et.call(this)}function Xo(){et.call(this)}function Qo(e){this.a=dp.setTimeout(j(this.c,this),0),this.b=e}function Yo(t){var n={},r=n.document||document,o=Gn(t),i=document.createElement("SCRIPT"),s={Hb:i,Ga:void 0},l=new zo($o,s),d=null,c=null==n.timeout?5E3:n.timeout;return 0<c&&(d=window.setTimeout(function(){Zo(i,!0);var e=new ta(Ec,"Timeout reached for loading script "+o);qo(l),jo(l,!1,e)},c),s.Ga=d),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(Zo(i,n.dd||!1,d),l.C())},i.onerror=function(){Zo(i,!0,d);var e=new ta(_c,"Error while loading script "+o);qo(l),jo(l,!1,e)},s=n.attributes||{},vt(s,{type:"text/javascript",charset:"UTF-8"}),or(i,s),i.src=Gn(t),Jo(r).appendChild(i),l}function Jo(e){var t;return(t=(e||document).getElementsByTagName("HEAD"))&&0!=t.length?t[0]:e.documentElement}function $o(){if(this&&this.Hb){var e=this.Hb;e&&"SCRIPT"==e.tagName&&Zo(e,!0,this.Ga)}}function Zo(e,t,n){null!=n&&dp.clearTimeout(n),e.onload=p,e.onerror=p,e.onreadystatechange=p,t&&window.setTimeout(function(){e&&e.parentNode&&e.parentNode.removeChild(e)},0)}function ta(e,t){var n="Jsloader error (code #"+e+")";t&&(n+=": "+t),et.call(this,n),this.code=e}function ra(e){this.f=e}function oa(e,t,n){if(this.b=e,e=t||{},this.i=e.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.m=e.secureTokenTimeout||L,this.f=xt(e.secureTokenHeaders||Ic),this.g=e.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.h=e.firebaseTimeout||Nc,this.a=xt(e.firebaseHeaders||Lc),n&&(this.a["X-Client-Version"]=n,this.f["X-Client-Version"]=n),n="Node"==me(),n=dp.XMLHttpRequest||n&&sp.INTERNAL.node&&sp.INTERNAL.node.XMLHttpRequest,!n&&!le())throw new Pe("internal-error","The XMLHttpRequest compatibility library was not found.");this.c=void 0,this.c=le()?new P(self):ne()?new ra(n):new fo}function sa(e,t){t?e.a["X-Firebase-Locale"]=t:delete e.a["X-Firebase-Locale"]}function la(e,t){t?(e.a["X-Client-Version"]=t,e.f["X-Client-Version"]=t):(delete e.a["X-Client-Version"],delete e.f["X-Client-Version"])}function da(t,n,r,o,i,e,s){fr()||le()?t=j(t.o,t):(Oc||(Oc=new _t(function(e,t){pa(e,t)})),t=j(t.l,t)),t(n,r,o,i,e,s)}function pa(e,t){if(((window.gapi||{}).client||{}).request)e();else{dp[Dc]=function(){((window.gapi||{}).client||{}).request?e():t(Error("CORS_UNSUPPORTED"))};var n=Xn(Mc,{onload:Dc});Vo(Yo(n),function(){t(Error("CORS_UNSUPPORTED"))})}}function ca(e,t){return new _t(function(n,r){"refresh_token"==t.grant_type&&t.refresh_token||"authorization_code"==t.grant_type&&t.code?da(e,e.i+"?key="+encodeURIComponent(e.b),function(e){e?e.error?r(Ha(e)):e.access_token&&e.refresh_token?n(e):r(new Pe("internal-error")):r(new Pe("network-request-failed"))},"POST",Bn(t).toString(),e.f,e.m.get()):r(new Pe("internal-error"))})}function ua(t,n,r,o,i,e){var s=Nn(t.g+n);In(s,"key",t.b),e&&In(s,"cb",ja().toString());var l="GET"==r;if(l)for(var d in o)o.hasOwnProperty(d)&&In(s,d,o[d]);return new _t(function(e,n){da(t,s.toString(),function(t){t?t.error?n(Ha(t,i||{})):e(t):n(new Pe("network-request-failed"))},r,l?void 0:lr(xe(o)),t.a,t.h.get())})}function ha(e){if(!cc.test(e.email))throw new Pe("invalid-email")}function ma(e){"email"in e&&ha(e)}function ga(e,t){return qa(e,ri,{identifier:t,continueUri:ue()?hr():"http://localhost"}).then(function(e){return e.allProviders||[]})}function fa(e,t){return qa(e,ri,{identifier:t,continueUri:ue()?hr():"http://localhost"}).then(function(e){return e.signinMethods||[]})}function xa(e){return qa(e,ai,{}).then(function(e){return e.authorizedDomains||[]})}function va(e){if(!e[Ac])throw new Pe("internal-error")}function ka(e){if(!(e.phoneNumber||e.temporaryProof)){if(!e.sessionInfo)throw new Pe("missing-verification-id");if(!e.code)throw new Pe("missing-verification-code")}else if(!e.phoneNumber||!e.temporaryProof)throw new Pe("internal-error")}function _a(e,t){return qa(e,oi,t)}function Ea(e,t,n){return qa(e,si,{idToken:t,deleteProvider:n})}function Aa(e){if(!e.requestUri||!e.sessionId&&!e.postBody)throw new Pe("internal-error")}function Ia(e){var t=null;if(e.needConfirmation?(e.code="account-exists-with-different-credential",t=co(e)):"FEDERATED_USER_ID_ALREADY_LINKED"==e.errorMessage?(e.code="credential-already-in-use",t=co(e)):"EMAIL_EXISTS"==e.errorMessage?(e.code="email-already-in-use",t=co(e)):e.errorMessage&&(t=O(e.errorMessage)),t)throw t;if(!e[Ac])throw new Pe("internal-error")}function Ma(e,t){return t.returnIdpCredential=!0,qa(e,Vc,t)}function Da(e,t){return t.returnIdpCredential=!0,qa(e,mi,t)}function Fa(e,t){return t.returnIdpCredential=!0,t.autoCreate=!1,qa(e,ki,t)}function Ua(e){if(!e.oobCode)throw new Pe("invalid-action-code")}function qa(t,n,r){if(!Me(r,n.T))return A(new Pe("internal-error"));var o=n.Eb||"POST",i;return At(r).then(n.B).then(function(){return n.R&&(r.returnSecureToken=!0),ua(t,n.endpoint,o,r,n.Tb,n.rb||!1)}).then(function(e){return i=e}).then(n.J).then(function(){if(!n.da)return i;if(!(n.da in i))throw new Pe("internal-error");return i[n.da]})}function O(e){return Ha({error:{errors:[{message:e}],code:400,message:e}})}function Ha(t,n){var r=(t.error&&t.error.errors&&t.error.errors[0]||{}).reason||"",o={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(r=o[r]?new Pe(o[r]):null)return r;for(var i in r=t.error&&t.error.message||"",o={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash"},vt(o,n||{}),n=(n=r.match(/^[^\s]+\s*:\s*(.*)$/))&&1<n.length?n[1]:void 0,o)if(0===r.indexOf(i))return new Pe(o[i],n);return!n&&t&&(n=we(t)),new Pe("internal-error",n)}function Ka(e){for(var t in Kc)if(Kc[t].id===e)return e=Kc[t],{firebaseEndpoint:e.Za,secureTokenEndpoint:e.fb};return null}function Ga(e){this.b=e,this.a=null,this.bb=Ya(this)}function Ya(t){return Za().then(function(){return new _t(function(e,n){G("gapi.iframes.getContext")().open({where:document.body,url:t.b,messageHandlersFilter:G("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},function(r){function o(){clearTimeout(i),e()}t.a=r,t.a.restyle({setHideOnLeave:!1});var i=setTimeout(function(){n(Error("Network Error"))},Gi.get());r.ping(o).then(o,function(){n(Error("Network Error"))})})})})}function Ja(e,t){return e.bb.then(function(){return new _t(function(n){e.a.send(t.type,t,n,G("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})})}function $a(e,t){e.bb.then(function(){e.a.register("authEvent",t,G("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})}function Za(){return Ci?Ci:Ci=new _t(function(e,t){function n(){Ae(),G("gapi.load")("gapi.iframes",{callback:e,ontimeout:function(){Ae(),t(Error("Network Error"))},timeout:Fi.get()})}if(G("gapi.iframes.Iframe"))e();else if(G("gapi.load"))n();else{var r="__iframefcb"+i(1E6*Math.random()).toString();dp[r]=function(){G("gapi.load")?n():t(Error("Network Error"))},r=Xn(yi,{onload:r}),At(Yo(r)).s(function(){t(Error("Network Error"))})}}).s(function(e){throw Ci=null,e})}function fi(e,t,n){this.i=e,this.g=t,this.h=n,this.f=null,this.a=Ln(this.i,"/__/auth/iframe"),In(this.a,"apiKey",this.g),In(this.a,"appName",this.h),this.b=null,this.c=[]}function xi(t,n,r,o,i){this.o=t,this.l=n,this.c=r,this.m=o,this.h=this.g=this.i=null,this.a=i,this.f=null}function _i(e){try{return sp.app(e).auth().xa()}catch(e){return[]}}function Ei(t,n,r,o,i){this.l=t,this.f=n,this.b=r,this.c=o||null,this.h=i||null,this.o=this.u=this.v=null,this.g=[],this.m=this.a=null}function Ai(e){var t=hr();return xa(e).then(function(n){a:{var r=Nn(t),o=r.c;r=r.b;for(var e=0;e<n.length;e++){var i=n[e],s=r,l=o;if(0==i.indexOf("chrome-extension://")?s=Nn(i).b==s&&"chrome-extension"==l:"http"!=l&&"https"!=l?s=!1:Ud.test(i)?s=s==i:(i=i.split(".").join("\\."),s=new RegExp("^(.+\\."+i+"|"+i+")$","i").test(s)),s){n=!0;break a}}n=!1}if(!n)throw new lo(hr())})}function Ii(t){return t.m?t.m:(t.m=fe().then(function(){if(!t.u){var n=t.c,r=t.h,o=_i(t.b),i=new fi(t.l,t.f,t.b);i.f=n,i.b=r,i.c=ht(o||[]),t.u=i.toString()}t.i=new Ga(t.u),Mi(t)}),t.m)}function Ni(e){return e.o||(e.v=e.c?br(e.c,_i(e.b)):null,e.o=new oa(e.f,Ka(e.h),e.v)),e.o}function Li(t,n,r,o,i,e,s,l,d,p){return t=new xi(t,n,r,o,i),t.i=e,t.g=s,t.h=l,t.b=xt(d||null),t.f=p,t.toString()}function Mi(e){if(!e.i)throw Error("IfcHandler must be initialized!");$a(e.i,function(t){var n={};if(t&&t.authEvent){var r=!1;for(t=io(t.authEvent),n=0;n<e.g.length;n++)r=e.g[n](t)||r;return n={},n.status=r?"ACK":"ERROR",At(n)}return n.status="ERROR",At(n)})}function Oi(e){var t={type:"webStorageSupport"};return Ii(e).then(function(){return Ja(e.i,t)}).then(function(e){if(e&&e.length&&"undefined"!=typeof e[0].webStorageSupport)return e[0].webStorageSupport;throw Error()})}function Di(e){if(this.a=e||sp.INTERNAL.reactNative&&sp.INTERNAL.reactNative.AsyncStorage,!this.a)throw new Pe("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function Ri(){if(!zi())throw new Pe("web-storage-unsupported");this.f={},this.a=[],this.b=0,this.g=dp.indexedDB,this.type="indexedDB"}function Ti(e){return new _t(function(t,n){var r=e.g.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){t()},r.onerror=function(e){n(Error(e.target.error))}})}function Pi(e){return new _t(function(t,n){var r=e.g.open("firebaseLocalStorageDb",1);r.onerror=function(e){try{e.preventDefault()}catch(e){}n(Error(e.target.error))},r.onupgradeneeded=function(e){e=e.target.result;try{e.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(e){n(e)}},r.onsuccess=function(r){r=r.target.result,r.objectStoreNames.contains("firebaseLocalStorage")?t(r):Ti(e).then(function(){return Pi(e)}).then(function(e){t(e)}).s(function(e){n(e)})}})}function Bi(e){return e.h||(e.h=Pi(e)),e.h}function zi(){try{return!!dp.indexedDB}catch(e){return!1}}function Ui(e){return e.objectStore("firebaseLocalStorage")}function ji(e,t){return e.transaction(["firebaseLocalStorage"],t?"readwrite":"readonly")}function Wi(e){return new _t(function(t,n){e.onsuccess=function(e){e&&e.target?t(e.target.result):t()},e.onerror=function(e){n(Error(e.target.errorCode))}})}function Ki(e){function t(){return e.c=yn(800).then(j(e.Kc,e)).then(function(t){0<t.length&&za(e.a,function(e){e(t)})}).then(t).s(function(e){"STOP_EVENT"!=e.message&&t()}),e.c}e.c&&e.c.cancel("STOP_EVENT"),t()}function Xi(e){var t=this,n=null;this.a=[],this.type="indexedDB",this.c=e,this.b=At().then(function(){return zi()?(Hi||(Hi=new Ri),n=Hi,n.set("__sak","!").then(function(){return n.get("__sak")}).then(function(e){if("!"!==e)throw Error("indexedDB not supported!");return n.P("__sak")}).then(function(){return n}).s(function(){return t.c})):t.c}).then(function(e){return t.type=e.type,e.Y(function(e){za(t.a,function(t){t(e)})}),e})}function Qi(){this.a={},this.type="inMemory"}function Yi(){if(!$i()){if("Node"==me())throw new Pe("internal-error","The LocalStorage compatibility library was not found.");throw new Pe("web-storage-unsupported")}this.a=Ji()||sp.INTERNAL.node.localStorage,this.type="localStorage"}function Ji(){try{var e=dp.localStorage,t=ze();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(e){return null}}function $i(){var e="Node"==me();if(e=Ji()||e&&sp.INTERNAL.node&&sp.INTERNAL.node.localStorage,!e)return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(e){return!1}}function Zi(){this.type="nullStorage"}function es(){if(!ns()){if("Node"==me())throw new Pe("internal-error","The SessionStorage compatibility library was not found.");throw new Pe("web-storage-unsupported")}this.a=ts()||sp.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function ts(){try{var e=dp.sessionStorage,t=ze();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(e){return null}}function ns(){var e="Node"==me();if(e=ts()||e&&sp.INTERNAL.node&&sp.INTERNAL.node.sessionStorage,!e)return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(e){return!1}}function rs(){var e={};e.Browser=Vi,e.Node=Gc,e.ReactNative=Xc,e.Worker=Qc,this.a=e[me()]}function os(e){var t=new Pe("invalid-persistence-type"),n=new Pe("unsupported-persistence-type");a:{for(r in Yc)if(Yc[r]==e){var r=!0;break a}r=!1}if(!r||"string"!=typeof e)throw t;switch(me()){case"ReactNative":if("session"===e)throw n;break;case"Node":if("none"!==e)throw n;break;default:if(!H()&&"none"!==e)throw n;}}function as(){var e=!te(re())&&je(),t=ke(),n=H();this.o=e,this.h=t,this.m=n,this.a={},Jc||(Jc=new rs),e=Jc;try{this.g=(ur()||!Fe())&&dp.indexedDB?new Xi(le()?new Qi:new e.a.A):new e.a.A}catch(e){this.g=new Qi,this.h=!0}try{this.i=new e.a.Qa}catch(e){this.i=new Qi}this.l=new Qi,this.f=j(this.Lb,this),this.b={}}function is(){return $c||($c=new as),$c}function ss(e,t){return"session"===t?e.i:"none"===t?e.l:e.g}function ls(e,t){return"firebase:"+e.name+(t?":"+t:"")}function ds(t,n,r){var o=ls(n,r),i=ss(t,n.A);return t.get(n,r).then(function(e){var s=null;try{s=ye(dp.localStorage.getItem(o))}catch(e){}return s&&!e?(dp.localStorage.removeItem(o),t.set(n,s,r)):void(s&&e&&"localStorage"!=i.type&&dp.localStorage.removeItem(o))})}function ps(e,t,n){return n=ls(t,n),"local"==t.A&&(e.b[n]=null),ss(e,t.A).P(n)}function cs(e){us(e),e.c=setInterval(function(){for(var t in e.a){var n=dp.localStorage.getItem(t),r=e.b[t];n!=r&&(e.b[t]=n,n=new C({type:"storage",key:t,target:window,oldValue:r,newValue:n,a:!0}),e.Lb(n))}},1E3)}function us(e){e.c&&(clearInterval(e.c),e.c=null)}function hs(e){this.a=e,this.b=is()}function ms(e){return e.b.get(Zc,e.a).then(function(e){return io(e)})}function gs(){this.a=is()}function fs(e,t){this.b=-1,this.b=tu,this.f=dp.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=e,this.h=t,this.m=dp.Int32Array?new Int32Array(64):Array(64),void 0!==eu||(dp.Int32Array?eu=new Int32Array(au):eu=au),this.reset()}function ys(t){for(var n=t.f,r=t.m,o=0,i=0;i<n.length;)r[o++]=n[i]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3],i=4*o;for(n=16;64>n;n++){i=0|r[n-15],o=0|r[n-2];var e=0|(0|r[n-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3),s=0|(0|r[n-7])+((o>>>17|o<<15)^(o>>>19|o<<13)^o>>>10);r[n]=0|e+s}o=0|t.a[0],i=0|t.a[1];var l=0|t.a[2],d=0|t.a[3],p=0|t.a[4],c=0|t.a[5],u=0|t.a[6];for(e=0|t.a[7],n=0;64>n;n++){var h=0|((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&i^o&l^i&l);s=p&c^~p&u,e=0|e+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7)),s=0|s+(0|eu[n]),s=0|e+(0|s+(0|r[n])),e=u,u=c,c=p,p=0|d+s,d=l,l=i,i=o,o=0|s+h}t.a[0]=0|t.a[0]+o,t.a[1]=0|t.a[1]+i,t.a[2]=0|t.a[2]+l,t.a[3]=0|t.a[3]+d,t.a[4]=0|t.a[4]+p,t.a[5]=0|t.a[5]+c,t.a[6]=0|t.a[6]+u,t.a[7]=0|t.a[7]+e}function bs(t,n,r){void 0===r&&(r=n.length);var o=0,i=t.c;if(s(n))for(;o<r;)t.f[i++]=n.charCodeAt(o++),i==t.b&&(ys(t),i=0);else if(h(n))for(;o<r;){var e=n[o++];if(!("number"==typeof e&&0<=e&&255>=e&&e==(0|e)))throw Error("message must be a byte array");t.f[i++]=e,i==t.b&&(ys(t),i=0)}else throw Error("message must be string or array");t.c=i,t.g+=r}function xs(){fs.call(this,8,iu)}function vs(t,n,r,o,i){this.l=t,this.i=n,this.m=r,this.o=o||null,this.u=i||null,this.h=n+":"+r,this.v=new gs,this.g=new hs(this.h),this.f=null,this.b=[],this.a=this.c=null}function ks(e){return new Pe("invalid-cordova-configuration",e)}function Ss(){for(var e=20,t=[];0<e;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(i(62*Math.random()))),e--;return t.join("")}function ws(t){var n=new xs;bs(n,t),t=[];var r=8*n.g;56>n.c?bs(n,ou,56-n.c):bs(n,ou,n.b-(n.c-56));for(var o=63;56<=o;o--)n.f[o]=255&r,r/=256;for(ys(n),o=r=0;o<n.i;o++)for(var i=24;0<=i;i-=8)t[r++]=255&n.a[o]>>i;return kr(t)}function Cs(t,n,r,o){var i=Ss(),e=new ao(n,o,null,i,new Pe("no-auth-event")),s=G("BuildInfo.packageName",dp);if("string"!=typeof s)throw new Pe("invalid-cordova-configuration");var l=G("BuildInfo.displayName",dp),d={};if(re().toLowerCase().match(/iphone|ipad|ipod/))d.ibi=s;else if(re().toLowerCase().match(/android/))d.apn=s;else return A(new Pe("operation-not-supported-in-this-environment"));l&&(d.appDisplayName=l),i=ws(i),d.sessionId=i;var p=Li(t.l,t.i,t.m,n,r,null,o,t.o,d,t.u);return t.ga().then(function(){var n=t.h;return t.v.a.set(Zc,e.D(),n)}).then(function(){var e=G("cordova.plugins.browsertab.isAvailable",dp);if("function"!=typeof e)throw new Pe("invalid-cordova-configuration");var n=null;e(function(e){if(e){if(n=G("cordova.plugins.browsertab.openUrl",dp),"function"!=typeof n)throw new Pe("invalid-cordova-configuration");n(p)}else{if(n=G("cordova.InAppBrowser.open",dp),"function"!=typeof n)throw new Pe("invalid-cordova-configuration");e=re(),e=e.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||e.match(/(iPad|iPhone|iPod).*OS 8_\d/i),t.a=n(p,e?"_blank":"_system","location=yes")}})})}function Ts(e,t){for(var n=0;n<e.b.length;n++)try{e.b[n](t)}catch(e){}}function _s(e){return e.f||(e.f=e.ga().then(function(){return new _t(function(t){function n(r){return t(r),e.Ka(n),!1}e.va(n),As(e)})})),e.f}function Es(e){var t=null;return ms(e.g).then(function(n){return t=n,n=e.g,ps(n.b,Zc,n.a)}).then(function(){return t})}function As(t){function n(n){o=!0,i&&i.cancel(),Es(t).then(function(o){var i=r;if(o&&n&&n.url){var e=null;i=Br(n.url),-1!=i.indexOf("/__/auth/callback")&&(e=Nn(i),e=ye(F(e,"firebaseError")||null),e=(e="object"==typeof e?xr(e):null)?new ao(o.b,o.c,null,null,e):new ao(o.b,o.c,i,o.g)),i=e||r}Ts(t,i)})}var r=new ao("unknown",null,null,null,new Pe("no-auth-event")),o=!1,i=yn(500).then(function(){return Es(t).then(function(){o||Ts(t,r)})}),e=dp.handleOpenURL;dp.handleOpenURL=function(t){if(0==t.toLowerCase().indexOf(G("BuildInfo.packageName",dp).toLowerCase()+"://")&&n({url:t}),"function"==typeof e)try{e(t)}catch(e){console.error(e)}},pc||(pc=new so),pc.subscribe(n)}function Is(e){this.a=e,this.b=is()}function Ns(e){return e.b.set(su,"pending",e.a)}function Ls(e){return ps(e.b,su,e.a)}function Os(e){return e.b.get(su,e.a).then(function(e){return"pending"==e})}function Ms(e,t,n){this.v=e,this.m=t,this.l=n,this.h=[],this.f=!1,this.i=j(this.o,this),this.c=new zs,this.u=new Gs,this.g=new Is(this.m+":"+this.l),this.b={},this.b.unknown=this.c,this.b.signInViaRedirect=this.c,this.b.linkViaRedirect=this.c,this.b.reauthViaRedirect=this.c,this.b.signInViaPopup=this.u,this.b.linkViaPopup=this.u,this.b.reauthViaPopup=this.u,this.a=Ds(this.v,this.m,this.l,wi)}function Ds(t,n,r,o){var i=sp.SDK_VERSION||null;return ie()?new vs(t,n,r,i,o):new Ei(t,n,r,i,o)}function Rs(e){e.f||(e.f=!0,e.a.va(e.i));var t=e.a;return e.a.ga().s(function(n){throw e.a==t&&e.reset(),n})}function Ps(e){e.a.Ib()&&Rs(e).s(function(t){var n=new ao("unknown",null,null,null,new Pe("operation-not-supported-in-this-environment"));Fs(t)&&e.o(n)}),e.a.Db()||js(e.c)}function Bs(t,n,r,o,i,e){return t.a.zb(n,r,o,function(){t.f||(t.f=!0,t.a.va(t.i))},function(){t.reset()},i,e)}function Fs(e){return e&&"auth/cordova-not-ready"==e.code}function Us(e,t,n){var r=t+":"+n;return pu[r]||(pu[r]=new Ms(e,t,n)),pu[r]}function zs(){this.b=null,this.f=[],this.c=[],this.a=null,this.g=!1}function js(e){e.g||(e.g=!0,Hs(e,!1,null,null))}function qs(t,n,r){r=r.wa(n.b,n.c);var o=n.f,i=n.g,e=!!n.b.match(/Redirect$/);r(o,i).then(function(n){Hs(t,e,n,null)}).s(function(n){Hs(t,e,null,n)})}function Vs(e,t){if(e.b=function(){return A(t)},e.c.length)for(var n=0;n<e.c.length;n++)e.c[n](t)}function Ws(e,t){if(e.b=function(){return At(t)},e.f.length)for(var n=0;n<e.f.length;n++)e.f[n](t)}function Hs(e,t,n,r){t?r?Vs(e,r):Ws(e,n):Ws(e,{user:null}),e.f=[],e.c=[]}function Ks(e){var t=new Pe("timeout");e.a&&e.a.cancel(),e.a=yn(du.get()).then(function(){e.b||Hs(e,!0,null,t)})}function Gs(){}function Xs(e,t){var n=e.c,r=e.b;t.wa(r,n)(e.f,e.g).then(function(e){t.ha(r,e,null,n)}).s(function(e){t.ha(r,null,e,n)})}function Qs(){this.pb=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.pb},set:function(e){this.pb=e},enumerable:!1})}function Ys(e,t){this.a=t,Ie(this,"verificationId",e)}function Js(e,t,n,r){return new to(e).Ta(t,n).then(function(e){return new Ys(e,r)})}function $s(e){var t=Er(e);if(!(t&&t.exp&&t.auth_time&&t.iat))throw new Pe("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");I(this,{token:e,expirationTime:Ee(1E3*t.exp),authTime:Ee(1E3*t.auth_time),issuedAtTime:Ee(1E3*t.iat),signInProvider:t.firebase&&t.firebase.sign_in_provider?t.firebase.sign_in_provider:null,claims:t})}function Zs(e,t,n){if(this.h=e,this.i=t,this.g=n,this.c=3E4,this.f=96E4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function _l(e,t){return t?(e.a=e.c,e.g()):(t=e.a,e.a*=2,e.a>e.f&&(e.a=e.f),t)}function Rl(e,t){e.stop(),e.b=yn(_l(e,t)).then(function(){return De()}).then(function(){return e.h()}).then(function(){Rl(e,!0)}).s(function(t){e.i(t)&&Rl(e,!1)})}function ed(e){this.f=e,this.b=this.a=null,this.c=0}function rd(e,t){var n=t[Ac],r=t.refreshToken;t=id(t.expiresIn),e.b=n,e.c=t,e.a=r}function od(e,t){e.b=t.b,e.a=t.a,e.c=t.c}function id(e){return ja()+1E3*parseInt(e,10)}function sd(e,t){return ca(e.f,t).then(function(t){return e.b=t.access_token,e.c=id(t.expires_in),e.a=t.refresh_token,{accessToken:e.b,expirationTime:e.c,refreshToken:e.a}}).s(function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t})}function ld(e,t){this.a=e||null,this.b=t||null,I(this,{lastSignInTime:Ee(t||null),creationTime:Ee(e||null)})}function dd(e){return new ld(e.a,e.b)}function ud(t,n,r,o,i,e){I(this,{uid:t,displayName:o||null,photoURL:i||null,email:r||null,phoneNumber:e||null,providerId:n})}function hd(e,t){for(var n in Qt.call(this,e),t)this[n]=t[n]}function md(e,t,n){this.G=[],this.l=e.apiKey,this.o=e.appName,this.u=e.authDomain||null,e=sp.SDK_VERSION?br(sp.SDK_VERSION):null,this.b=new oa(this.l,Ka(wi),e),this.h=new ed(this.b),_d(this,t[Ac]),rd(this.h,t),Ie(this,"refreshToken",this.h.a),al(this,n||{}),hn.call(this),this.I=!1,this.u&&se()&&(this.a=Us(this.u,this.l,this.o)),this.N=[],this.i=null,this.w=vd(this),this.V=j(this.Ha,this);var r=this;this.ka=null,this.sa=function(e){r.oa(e.g)},this.X=null,this.O=[],this.ra=function(e){fd(r,e.c)},this.W=null}function gd(e,t){e.X&&an(e.X,"languageCodeChanged",e.sa),(e.X=t)&&tn(t,"languageCodeChanged",e.sa)}function fd(e,t){e.O=t,la(e.b,sp.SDK_VERSION?br(sp.SDK_VERSION,e.O):null)}function yd(e,t){e.W&&an(e.W,"frameworkChanged",e.ra),(e.W=t)&&tn(t,"frameworkChanged",e.ra)}function bd(e){try{return sp.app(e.o).auth()}catch(t){throw new Pe("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+e.o+"'!")}}function vd(e){return new Zs(function(){return e.F(!0)},function(e){return e&&"auth/network-request-failed"==e.code},function(){var t=e.h.c-ja()-3E5;return 0<t?t:0})}function kd(e){e.C||e.w.b||(e.w.start(),an(e,"tokenChanged",e.V),tn(e,"tokenChanged",e.V))}function Sd(e){an(e,"tokenChanged",e.V),e.w.stop()}function _d(e,t){e.qa=t,Ie(e,"_lat",t)}function Ed(e,t){ct(e.N,function(e){return e==t})}function Id(e){for(var t=[],n=0;n<e.N.length;n++)t.push(e.N[n](e));return Nt(t).then(function(){return e})}function Nd(e){e.a&&!e.I&&(e.I=!0,e.a.subscribe(e))}function al(e,t){I(e,{uid:t.uid,displayName:t.displayName||null,photoURL:t.photoURL||null,email:t.email||null,emailVerified:t.emailVerified||!1,phoneNumber:t.phoneNumber||null,isAnonymous:t.isAnonymous||!1,metadata:new ld(t.createdAt,t.lastLoginAt),providerData:[]})}function Od(){}function bl(e){return At().then(function(){if(e.C)throw new Pe("app-deleted")})}function cl(e){return v(e.providerData,function(e){return e.providerId})}function dl(e,t){t&&(el(e,t.providerId),e.providerData.push(t))}function el(e,t){ct(e.providerData,function(e){return e.providerId==t})}function fl(e,t,n){("uid"!=t||n)&&e.hasOwnProperty(t)&&Ie(e,t,n)}function gl(e,t){e!=t&&(I(e,{uid:t.uid,displayName:t.displayName,photoURL:t.photoURL,email:t.email,emailVerified:t.emailVerified,phoneNumber:t.phoneNumber,isAnonymous:t.isAnonymous,providerData:[]}),t.metadata?Ie(e,"metadata",dd(t.metadata)):Ie(e,"metadata",new ld),za(t.providerData,function(t){dl(e,t)}),od(e.h,t.h),Ie(e,"refreshToken",e.h.a))}function hl(e){return e.F().then(function(t){var n=e.isAnonymous;return kl(e,t).then(function(){return n||fl(e,"isAnonymous",!1),t})})}function il(e,t){t[Ac]&&e.qa!=t[Ac]&&(rd(e.h,t),e.dispatchEvent(new hd("tokenChanged")),_d(e,t[Ac]),fl(e,"refreshToken",e.h.a))}function kl(e,t){return qa(e.b,Uc,{idToken:t}).then(j(e.uc,e))}function jl(e){return(e=e.providerUserInfo)&&e.length?v(e,function(e){return new ud(e.rawId,e.providerId,e.email,e.displayName,e.photoUrl,e.phoneNumber)}):[]}function ll(e,t){return hl(e).then(function(){if(dt(cl(e),t))return Id(e).then(function(){throw new Pe("provider-already-linked")})})}function nl(e,t,n){var r=ro(t);return t=Ir(t),J({user:e,credential:r,additionalUserInfo:t,operationType:n})}function ml(e,t){return il(e,t),e.reload().then(function(){return e})}function ol(t,n,r,o,i){if(!se())return A(new Pe("operation-not-supported-in-this-environment"));if(t.i&&!i)return A(t.i);var s=Ar(r.providerId),l=ze(t.uid+":::"),d=null;(!ke()||je())&&t.u&&r.isOAuthProvider&&(d=Li(t.u,t.l,t.o,n,r,null,l,sp.SDK_VERSION||null));var u=ce(d,s&&s.Ba,s&&s.Aa);return o=o().then(function(){if(rl(t),!i)return t.F().then(function(){})}).then(function(){return Bs(t.a,u,n,r,l,!!d)}).then(function(){return new _t(function(e,r){t.ha(n,null,new Pe("cancelled-popup-request"),t.g||null),t.f=e,t.v=r,t.g=l,t.c=t.a.Ea(t,n,u,l)})}).then(function(e){return u&&be(u),e?J(e):null}).s(function(e){throw u&&be(u),e}),ql(t,o,i)}function pl(t,n,r,o,i){if(!se())return A(new Pe("operation-not-supported-in-this-environment"));if(t.i&&!i)return A(t.i);var s=null,l=ze(t.uid+":::");return o=o().then(function(){if(rl(t),!i)return t.F().then(function(){})}).then(function(){return t.aa=l,Id(t)}).then(function(e){return t.ba&&(e=t.ba,e=e.b.set(cu,t.D(),e.a)),e}).then(function(){return t.a.Ca(n,r,l)}).s(function(e){if(s=e,t.ba)return yl(t.ba);throw s}).then(function(){if(s)throw s}),ql(t,o,i)}function rl(e){if(!e.a||!e.I){if(e.a&&!e.I)throw new Pe("internal-error");throw new Pe("auth-domain-config-required")}}function ql(e,t,n){var r=R(e,t,n);return e.G.push(r),r.ia(function(){pt(e.G,r)}),r}function R(e,t,n){return e.i&&!n?(t.cancel(),A(e.i)):t.s(function(t){throw t&&("auth/user-disabled"==t.code||"auth/user-token-expired"==t.code)&&(e.i||e.dispatchEvent(new hd("userInvalidated")),e.i=t),t})}function ul(e){if(!e.apiKey)return null;var t={apiKey:e.apiKey,authDomain:e.authDomain,appName:e.appName},n={};if(e.stsTokenManager&&e.stsTokenManager.accessToken&&e.stsTokenManager.expirationTime)n[Ac]=e.stsTokenManager.accessToken,n.refreshToken=e.stsTokenManager.refreshToken||null,n.expiresIn=(e.stsTokenManager.expirationTime-ja())/1E3;else return null;var r=new md(t,n,e);return e.providerData&&za(e.providerData,function(e){e&&dl(r,J(e))}),e.redirectEventId&&(r.aa=e.redirectEventId),r}function vl(t,n,r,o){var i=new md(t,n);return r&&(i.ba=r),o&&fd(i,o),i.reload().then(function(){return i})}function wl(t,n,r,o){n=n||{apiKey:t.l,authDomain:t.u,appName:t.o};var i=t.h,e={};return e[Ac]=i.b,e.refreshToken=i.a,e.expiresIn=(i.c-ja())/1E3,n=new md(n,e),r&&(n.ba=r),o&&fd(n,o),gl(n,t),n}function xl(e){this.a=e,this.b=is()}function yl(e){return ps(e.b,cu,e.a)}function tl(e,t){return e.b.get(cu,e.a).then(function(e){return e&&t&&(e.authDomain=t),ul(e||{})})}function zl(e){this.a=e,this.b=is(),this.c=null,this.f=El(this),this.b.addListener(Bl("local"),this.a,j(this.g,this))}function Al(e,t){var n=[],r;for(r in Yc)Yc[r]!==t&&n.push(ps(e.b,Bl(Yc[r]),e.a));return n.push(ps(e.b,sl,e.a)),It(n)}function El(t){var e=Bl("local"),n=Bl("session"),r=Bl("none");return ds(t.b,e,t.a).then(function(){return t.b.get(n,t.a)}).then(function(o){return o?n:t.b.get(r,t.a).then(function(n){return n?r:t.b.get(e,t.a).then(function(n){return n?e:t.b.get(sl,t.a).then(function(t){return t?Bl(t):e})})})}).then(function(e){return t.c=e,Al(t,e.A)}).s(function(){t.c||(t.c=e)})}function Bl(e){return{name:"authUser",A:e}}function Cl(e){return Jl(e,function(){return e.b.set(sl,e.c.A,e.a)})}function Gl(e,t){return Jl(e,function(){return e.b.set(e.c,t.D(),e.a)})}function Hl(e){return Jl(e,function(){return ps(e.b,e.c,e.a)})}function Il(e,t){return Jl(e,function(){return e.b.get(e.c,e.a).then(function(e){return e&&t&&(e.authDomain=t),ul(e||{})})})}function Jl(e,t){return e.f=e.f.then(t,t),e.f}function Dl(e){if(this.l=!1,Ie(this,"settings",new Qs),Ie(this,"app",e),Xl(this).options&&Xl(this).options.apiKey)e=sp.SDK_VERSION?br(sp.SDK_VERSION):null,this.b=new oa(Xl(this).options&&Xl(this).options.apiKey,Ka(wi),e);else throw new Pe("invalid-api-key");this.N=[],this.o=[],this.I=[],this.Pb=sp.INTERNAL.createSubscribe(j(this.ic,this)),this.O=void 0,this.Qb=sp.INTERNAL.createSubscribe(j(this.jc,this)),Ul(this,null),this.h=new zl(Xl(this).options.apiKey+":"+Xl(this).name),this.w=new xl(Xl(this).options.apiKey+":"+Xl(this).name),this.V=Yl(this,Wl(this)),this.i=Yl(this,Ml(this)),this.X=!1,this.ka=j(this.Jc,this),this.Ha=j(this.Z,this),this.qa=j(this.Yb,this),this.ra=j(this.gc,this),this.sa=j(this.hc,this),Tl(this),this.INTERNAL={},this.INTERNAL["delete"]=j(this.delete,this),this.INTERNAL.logFramework=j(this.qc,this),this.u=0,hn.call(this),Sl(this),this.G=[]}function Md(e){Qt.call(this,"languageCodeChanged"),this.g=e}function Ql(e){Qt.call(this,"frameworkChanged"),this.c=e}function Sl(e){Object.defineProperty(e,"lc",{get:function(){return this.ea()},set:function(e){this.oa(e)},enumerable:!1}),e.W=null}function Pl(e){return e.Ob||A(new Pe("auth-domain-config-required"))}function Tl(e){var t=Xl(e).options.authDomain,n=Xl(e).options.apiKey;t&&se()&&(e.Ob=e.V.then(function(){if(!e.l){if(e.a=Us(t,n,Xl(e).name),e.a.subscribe(e),S(e)&&Nd(S(e)),e.C){Nd(e.C);var r=e.C;r.oa(e.ea()),gd(r,e),r=e.C,fd(r,e.G),yd(r,e),e.C=null}return e.a}}))}function Ol(e,t){var n={apiKey:Xl(e).options.apiKey,authDomain:Xl(e).options.authDomain,appName:Xl(e).name};return e.V.then(function(){return vl(n,t,e.w,e.xa())}).then(function(t){return S(e)&&t.uid==S(e).uid?(gl(S(e),t),e.Z(t)):(Ul(e,t),Nd(t),e.Z(t))}).then(function(){Zl(e)})}function Ul(e,t){S(e)&&(Ed(S(e),e.Ha),an(S(e),"tokenChanged",e.qa),an(S(e),"userDeleted",e.ra),an(S(e),"userInvalidated",e.sa),Sd(S(e))),t&&(t.N.push(e.Ha),tn(t,"tokenChanged",e.qa),tn(t,"userDeleted",e.ra),tn(t,"userInvalidated",e.sa),0<e.u&&kd(t)),Ie(e,"currentUser",t),t&&(t.oa(e.ea()),gd(t,e),fd(t,e.G),yd(t,e))}function Ll(e){var t=tl(e.w,Xl(e).options.authDomain).then(function(t){return(e.C=t)&&(t.ba=e.w),yl(e.w)});return Yl(e,t)}function Wl(e){var t=Xl(e).options.authDomain,n=Ll(e).then(function(){return Il(e.h,t)}).then(function(t){return t?(t.ba=e.w,e.C&&(e.C.aa||null)==(t.aa||null)?t:t.reload().then(function(){return Gl(e.h,t).then(function(){return t})}).s(function(n){return"auth/network-request-failed"==n.code?t:Hl(e.h)})):null}).then(function(t){Ul(e,t||null)});return Yl(e,n)}function Ml(e){return e.V.then(function(){return e.fa()}).s(function(){}).then(function(){if(!e.l)return e.ka()}).s(function(){}).then(function(){if(!e.l){e.X=!0;var t=e.h;t.b.addListener(Bl("local"),t.a,e.ka)}})}function Nl(e,t){var n=null,r=null;return Yl(e,t.then(function(t){return n=ro(t),r=Ir(t),Ol(e,t)}).then(function(){return J({user:S(e),credential:n,additionalUserInfo:r,operationType:"signIn"})}))}function Xl(e){return e.app}function S(e){return e.currentUser}function U(e){return S(e)&&S(e)._lat||null}function Zl(e){if(e.X){for(var t=0;t<e.o.length;t++)e.o[t]&&e.o[t](U(e));if(e.O!==e.getUid()&&e.I.length)for(e.O=e.getUid(),t=0;t<e.I.length;t++)e.I[t]&&e.I[t](U(e))}}function Vl(e,t){e.I.push(t),Yl(e,e.i.then(function(){!e.l&&dt(e.I,t)&&e.O!==e.getUid()&&(e.O=e.getUid(),t(U(e)))}))}function Yl(e,t){return e.N.push(t),t.ia(function(){pt(e.N,t)}),t}function T(){}function $l(){this.a={},this.b=1E12}function Dd(e,t){return(t=Rd(t))?e.a[t]||null:null}function Rd(e){return(e="undefined"==typeof e?1E12:e)?e.toString():null}function Pd(e,t){this.g=!1,this.c=t,this.a=this.b=null,this.h="invisible"!==this.c.size,this.f=rr(e);var n=this;this.i=function(){n.execute()},this.h?this.execute():tn(this.f,"click",this.i)}function Bd(e){if(e.g)throw Error("reCAPTCHA mock was already deleted!")}function Fd(){}function zd(){this.b=dp.grecaptcha?Infinity:0,this.f=null,this.a="__rcb"+i(1E6*Math.random()).toString()}function jd(t,n,r,o,i,e,s){if(Ie(this,"type","recaptcha"),this.c=this.f=null,this.C=!1,this.l=n,this.g=null,s?(uu||(uu=new Fd),s=uu):(gu||(gu=new zd),s=gu),this.o=s,this.a=r||{theme:"light",type:"image"},this.h=[],this.a[bu])throw new Pe("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i="invisible"===this.a[xu],!dp.document)throw new Pe("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!rr(n)||!this.i&&rr(n).hasChildNodes())throw new Pe("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.u=new oa(t,e||null,i||null),this.v=o||function(){return null};var l=this;this.m=[];var d=this.a[fu];this.a[fu]=function(e){if(qd(l,e),"function"==typeof d)d(e);else if("string"==typeof d){var t=G(d,dp);"function"==typeof t&&t(e)}};var c=this.a[yu];this.a[yu]=function(){if(qd(l,null),"function"==typeof c)c();else if("string"==typeof c){var e=G(c,dp);"function"==typeof e&&e()}}}function qd(e,t){for(var n=0;n<e.m.length;n++)try{e.m[n](t)}catch(e){}}function Vd(e,t){ct(e.m,function(e){return e==t})}function Wd(e,t){return e.h.push(t),t.ia(function(){pt(e.h,t)}),t}function Hd(e){if(e.C)throw new Pe("internal-error","RecaptchaVerifier instance has been destroyed.")}function Kd(t,n,r){var o=!1;try{this.b=r||sp.app()}catch(e){throw new Pe("argument-error","No firebase.app.App instance is currently initialized.")}if(this.b.options&&this.b.options.apiKey)r=this.b.options.apiKey;else throw new Pe("invalid-api-key");var i=this,e=null;try{e=this.b.auth().xa()}catch(e){}try{o=this.b.auth().settings.appVerificationDisabledForTesting}catch(e){}e=sp.SDK_VERSION?br(sp.SDK_VERSION,e):null,jd.call(this,r,t,n,function(){try{var e=i.b.auth().ea()}catch(t){e=null}return e},e,Ka(wi),o)}function Xd(t,n,r,o){a:{r=Array.prototype.slice.call(r);for(var i=0,e=!1,s=0;s<n.length;s++)if(n[s].optional)e=!0;else{if(e)throw new Pe("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(e=n.length,r.length<i||e<r.length)o="Expected "+(i==e?1==i?"1 argument":i+" arguments":i+"-"+e+" arguments")+" but got "+r.length+".";else{for(i=0;i<r.length;i++)if(e=n[i].optional&&void 0===r[i],!n[i].M(r[i])&&!e){if(n=n[i],0>i||i>=vu.length)throw new Pe("internal-error","Argument validator received an unsupported number of arguments.");r=vu[i],o=(o?"":r+" argument ")+(n.name?"\""+n.name+"\" ":"")+"must be "+n.K+".";break a}o=null}}if(o)throw new Pe("argument-error",t+" failed: "+o)}function Qd(e,t){return{name:e||"",K:"a valid string",optional:!!t,M:s}}function V(t,n){return{name:t||"",K:"a boolean",optional:!!n,M:e}}function Yd(e,t){return{name:e||"",K:"a valid object",optional:!!t,M:z}}function W(e,t){return{name:e||"",K:"a function",optional:!!t,M:m}}function Jd(e,t){return{name:e||"",K:"null",optional:!!t,M:c}}function $d(){return{name:"",K:"an HTML element",optional:!1,M:function(e){return!!(e&&e instanceof Element)}}}function Zd(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(e){return!!(e&&e instanceof Dl)}}}function ep(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(e){return!!(e&&e instanceof sp.app.App)}}}function tp(e){return{name:e?e+"Credential":"credential",K:e?"a valid "+e+" credential":"a valid credential",optional:!1,M:function(t){if(!t)return!1;var n=!e||t.providerId===e;return t.ya&&n}}}function np(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}}function rp(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(e){return!!(e&&s(e.type)&&m(e.verify))}}}function op(e,t,n,r){return{name:n||"",K:e.K+" or "+t.K,optional:!!r,M:function(n){return e.M(n)||t.M(n)}}}function X(e,t){for(var n in t){var r=t[n].name;e[r]=Z(r,e[n],t[n].j)}}function Y(t,n){for(var r in n){var o=n[r].name;if(o!==r){var i=n[r].qb;Object.defineProperty(t,o,{get:function(){return this[r]},set:function(e){Xd(o,[i],[e],!0),this[r]=e},enumerable:!0})}}}function ap(e,t,n,r){e[t]=Z(t,n,r)}function Z(t,n,r){function o(){var e=Array.prototype.slice.call(arguments);return Xd(i,r,e),n.apply(this,e)}if(!r)return n;var i=ip(t),e;for(e in n)o[e]=n[e];for(e in n.prototype)o.prototype[e]=n.prototype[e];return o}function ip(e){return e=e.split("."),e[e.length-1]}var sp=o("dP58").default,lp=lp||{},dp=this,k="closure_uid_"+(1E9*Math.random()>>>0),ia=0,ja=Date.now||function(){return+new Date},na;$(et,Error),et.prototype.name="CustomError",$(u,et),u.prototype.name="AssertionError",nt.prototype.get=function(){if(0<this.b){this.b--;var e=this.a;this.a=e.next,e.next=null}else e=this.c();return e};var g=new nt(function(){return new it},function(e){e.reset()});ot.prototype.add=function(e,t){var n=g.get();n.set(e,t),this.b?this.b.next=n:this.a=n,this.b=n},it.prototype.set=function(e,t){this.a=e,this.b=t,this.next=null},it.prototype.reset=function(){this.next=this.b=this.a=null};var wa=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if(s(e))return s(t)&&1==t.length?e.indexOf(t,0):-1;for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},za=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(t,n,r){for(var o=t.length,i=s(t)?t.split(""):t,e=0;e<o;e++)e in i&&n.call(r,i[e],e,t)},v=Array.prototype.map?function(e,t){return Array.prototype.map.call(e,t,void 0)}:function(t,n){for(var r=t.length,o=Array(r),i=s(t)?t.split(""):t,e=0;e<r;e++)e in i&&(o[e]=n.call(void 0,i[e],e,t));return o},Ba=Array.prototype.some?function(e,t){return Array.prototype.some.call(e,t,void 0)}:function(t,n){for(var r=t.length,o=s(t)?t.split(""):t,i=0;i<r;i++)if(i in o&&n.call(void 0,o[i],i,t))return!0;return!1},Ca=String.prototype.trim?function(e){return e.trim()}:function(e){return /^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},La=/&/g,Oa=/</g,Pa=/>/g,Qa=/"/g,Ra=/'/g,Sa=/\x00/g,Ta=/[\x00&<>"']/,Na;a:{var Va=dp.navigator;if(Va){var Wa=Va.userAgent;if(Wa){Na=Wa;break a}}Na=""}var Xa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],pp=!1,cp=new ot,ya=0,up=2,hp=3,mp,gp;y.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var fp=new nt(function(){return new y},function(e){e.reset()});_t.prototype.then=function(e,t,n){return Mt(this,m(e)?e:null,m(t)?t:null,n)},t(_t),na=_t.prototype,na.ia=function(e,t){return e=Et(e,e,t),e.c=!0,Ot(this,e),this},na.s=function(e,t){return Mt(this,null,e,t)},na.cancel=function(e){this.a==ya&&wt(function(){var t=new qt(e);Lt(this,t)},this)},na.Lc=function(e){this.a=ya,Dt(this,up,e)},na.Mc=function(e){this.a=ya,Dt(this,hp,e)},na.Ub=function(){for(var e;e=Ft(this);)Ut(this,e,this.a,this.i);this.h=!1};var yp=kt;$(qt,et),qt.prototype.name="cancel";var bp=0,xp={};Vt.prototype.pa=!1,Vt.prototype.ua=function(){if(this.ja)for(;this.ja.length;)this.ja.shift()()},Ht[" "]=p;var vp=yt("Opera"),kp=yt("Trident")||yt("MSIE"),Sp=yt("Edge"),wp=Sp||kp,Cp=yt("Gecko")&&(!ft(Na.toLowerCase(),"webkit")||yt("Edge"))&&!(yt("Trident")||yt("MSIE"))&&!yt("Edge"),Tp=ft(Na.toLowerCase(),"webkit")&&!yt("Edge"),_p;a:{var Ep="",Ap=function(){var e=Na;return Cp?/rv:([^\);]+)(\)|;)/.exec(e):Sp?/Edge\/([\d\.]+)/.exec(e):kp?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):Tp?/WebKit\/(\S+)/.exec(e):vp?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(Ap&&(Ep=Ap?Ap[1]:""),kp){var Ip=Gt();if(null!=Ip&&Ip>parseFloat(Ep)){_p=Ip+"";break a}}_p=Ep}var Np={},Lp=dp.document,Op;Op=Lp&&kp?Gt()||("CSS1Compat"==Lp.compatMode?parseInt(_p,10):5):void 0;var Mp=Object.freeze||function(e){return e},Dp=!kp||9<=+Op,Rp=kp&&!Xt("9"),Pp=function(){if(!dp.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});return dp.addEventListener("test",p,t),dp.removeEventListener("test",p,t),e}();Qt.prototype.preventDefault=function(){this.Gb=!1},$(C,Qt);var Bp=Mp({2:"touch",3:"pen",4:"mouse"});C.prototype.preventDefault=function(){C.lb.preventDefault.call(this);var e=this.a;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,Rp)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(e){}},C.prototype.f=function(){return this.a};var Fp="closure_listenable_"+(0|1E6*Math.random()),Up=0;$t.prototype.add=function(t,n,r,o,i){var e=t.toString();t=this.a[e],t||(t=this.a[e]=[],this.b++);var s=en(t,n,o,i);return-1<s?(n=t[s],r||(n.Ia=!1)):(n=new Yt(n,this.src,e,!!o,i),n.Ia=r,t.push(n)),n};var zp="closure_lm_"+(0|1E6*Math.random()),jp={},qp=0,Vp="__closure_events_fn_"+(1E9*Math.random()>>>0);$(hn,Vt),hn.prototype[Fp]=!0,hn.prototype.addEventListener=function(e,t,n,r){tn(this,e,t,n,r)},hn.prototype.removeEventListener=function(e,t,n,r){an(this,e,t,n,r)},hn.prototype.dispatchEvent=function(t){var n=this.Ua,r;if(n)for(r=[];n;n=n.Ua)r.push(n);n=this.Nb;var o=t.type||t;if(s(t))t=new Qt(t,n);else if(t instanceof Qt)t.target=t.target||n;else{var i=t;t=new Qt(o,n),vt(t,i)}if(i=!0,r)for(var e=r.length-1,l;0<=e;e--)l=t.b=r[e],i=gn(l,o,!0,t)&&i;if(l=t.b=n,i=gn(l,o,!0,t)&&i,i=gn(l,o,!1,t)&&i,r)for(e=0;e<r.length;e++)l=t.b=r[e],i=gn(l,o,!1,t)&&i;return i},hn.prototype.ua=function(){if(hn.lb.ua.call(this),this.m){var t=this.m,n=0,r;for(r in t.a){for(var o=t.a[r],i=0;i<o.length;i++)++n,Jt(o[i]);delete t.a[r],t.b--}}this.Ua=null},na=kn.prototype,na.S=function(){Sn(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.b[this.a[t]]);return e},na.U=function(){return Sn(this),this.a.concat()},na.clear=function(){this.b={},this.c=this.a.length=0},na.get=function(e,t){return wn(this.b,e)?this.b[e]:t},na.set=function(e,t){wn(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},na.forEach=function(t,n){for(var r=this.U(),o=0;o<r.length;o++){var i=r[o],e=this.get(i);t.call(n,e,i,this)}};var Wp=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;Tn.prototype.toString=function(){var e=[],t=this.c;t&&e.push(Mn(t,Hp,!0),":");var n=this.b;return(n||"file"==t)&&(e.push("//"),(t=this.m)&&e.push(Mn(t,Hp,!0),"@"),e.push(encodeURIComponent(n+"").replace(/%25([0-9a-fA-F]{2})/g,"%$1")),n=this.i,null!=n&&e.push(":",n+"")),(n=this.g)&&(this.b&&"/"!=n.charAt(0)&&e.push("/"),e.push(Mn(n,"/"==n.charAt(0)?Gp:Kp,!0))),(n=this.a.toString())&&e.push("?",n),(n=this.h)&&e.push("#",Mn(n,cd)),e.join("")};var Hp=/[#\/\?@]/g,Kp=/[#\?:]/g,Gp=/[#\?]/g,Xp=/[#\?@]/g,cd=/#/g;na=Rn.prototype,na.add=function(e,t){Pn(this),this.c=null,e=jn(this,e);var n=this.a.get(e);return n||this.a.set(e,n=[]),n.push(t),this.b+=1,this},na.clear=function(){this.a=this.c=null,this.b=0},na.forEach=function(e,t){Pn(this),this.a.forEach(function(n,r){za(n,function(n){e.call(t,n,r,this)},this)},this)},na.U=function(){Pn(this);for(var t=this.a.S(),n=this.a.U(),r=[],o=0;o<n.length;o++)for(var i=t[o],e=0;e<i.length;e++)r.push(n[o]);return r},na.S=function(e){Pn(this);var t=[];if(s(e))Un(this,e)&&(t=ut(t,this.a.get(jn(this,e))));else{e=this.a.S();for(var n=0;n<e.length;n++)t=ut(t,e[n])}return t},na.set=function(e,t){return Pn(this),this.c=null,e=jn(this,e),Un(this,e)&&(this.b-=this.a.get(e).length),this.a.set(e,[t]),this.b+=1,this},na.get=function(e,t){return e=e?this.S(e):[],0<e.length?e[0]+"":t},na.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],n=this.a.U(),r=0;r<n.length;r++){var o=n[r],i=encodeURIComponent(o+"");o=this.S(o);for(var e=0,s;e<o.length;e++)s=i,""!==o[e]&&(s+="="+encodeURIComponent(o[e]+"")),t.push(s)}return this.c=t.join("&")};var ad=!kp||9<=+Op;Vn.prototype.ma=!0,Vn.prototype.la=function(){return this.a},Vn.prototype.toString=function(){return"Const{"+this.a+"}"};var Qp={};Hn(""),Kn.prototype.ma=!0,Kn.prototype.la=function(){return this.a},Kn.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var pd=/%{(\w+)}/g,xd=/^(?:https:)?\/\/[0-9a-z.:[\]-]+\/|^\/[^\/\\]|^about:blank#/i,wd={};Yn.prototype.ma=!0,Yn.prototype.la=function(){return this.a},Yn.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var td=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,Cd={};Zn("about:blank"),er.prototype.ma=!0,er.prototype.la=function(){return this.a},er.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var Ad={};nr("<!DOCTYPE html>"),nr(""),nr("<br>");var Gd={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"},Ld={'"':"\\\"","\\":"\\\\","/":"\\/","":"\\b","":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","":"\\u000b"},Td=/\uffff/.test("\uFFFF")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,Ud=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ge="Firefox",ee="Chrome",ae={Sc:"FirebaseCore-web",Uc:"FirebaseUI-web"};Be.prototype.get=function(){var e=dp.navigator;return(e&&"boolean"==typeof e.onLine&&(ue()||"chrome-extension:"===ve()||"undefined"!=typeof e.connection)?e.onLine:1)?this.b?this.c:this.a:Math.min(5E3,this.a)};var qe={},He;try{var Je={};Object.defineProperty(Je,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Je,"abcd",{configurable:!0,enumerable:!0,value:2}),He=2==Je.abcd}catch(e){He=!1}var Ke="EMAIL_SIGNIN",Te="email",Qe="newEmail",Re="requestType",Se="email",Ve="fromEmail",Ue="data",Xe="operation";$(Pe,Error),Pe.prototype.D=function(){return{code:this.code,message:this.message}},Pe.prototype.toJSON=function(){return this.D()};var We="auth/",Ye={"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."},Ze="android",Yp="handleCodeInApp",Jp="iOS",$p="url",Zp="installApp",ec="minimumVersion",tc="packageName",nc="bundleId",rc=null,oc=null;Tr.prototype.f=function(){return this.b};var ac=["oauth_consumer_key","oauth_nonce","oauth_signature","oauth_signature_method","oauth_timestamp","oauth_token","oauth_version"],ic=["client_id","response_type","scope","redirect_uri","state"],sc={Tc:{Ma:"locale",Ba:500,Aa:600,Na:"facebook.com",eb:ic},Vc:{Ma:null,Ba:500,Aa:620,Na:"github.com",eb:ic},Wc:{Ma:"hl",Ba:515,Aa:680,Na:"google.com",eb:ic},bd:{Ma:"lang",Ba:485,Aa:705,Na:"twitter.com",eb:ac}},lc="idToken",dc="providerId";$(Lr,Nr),$(Or,Lr),$(Mr,Lr),$(Dr,Lr),$(Rr,Lr),Ur.prototype.ya=function(e){return Ma(e,zr(this))},Ur.prototype.c=function(e,t){var n=zr(this);return n.idToken=t,Da(e,n)},Ur.prototype.f=function(e,t){var n=zr(this);return Fr(Fa(e,n),t)},Ur.prototype.D=function(){var e={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(e.oauthIdToken=this.idToken),this.accessToken&&(e.oauthAccessToken=this.accessToken),this.secret&&(e.oauthTokenSecret=this.secret),e},jr.prototype.Da=function(e){return this.vb=xt(e),this},$(qr,jr),qr.prototype.ta=function(e){return dt(this.a,e)||this.a.push(e),this},qr.prototype.Ab=function(){return ht(this.a)},qr.prototype.credential=function(e,t){if(!e&&!t)throw new Pe("argument-error","credential failed: must provide the ID token and/or the access token.");return new Ur(this.providerId,{idToken:e||null,accessToken:t||null},this.providerId)},$(M,qr),Ie(M,"PROVIDER_ID","facebook.com"),Ie(M,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),$(Wr,qr),Ie(Wr,"PROVIDER_ID","github.com"),Ie(Wr,"GITHUB_SIGN_IN_METHOD","github.com"),$(Kr,qr),Ie(Kr,"PROVIDER_ID","google.com"),Ie(Kr,"GOOGLE_SIGN_IN_METHOD","google.com"),$(Xr,jr),Ie(Xr,"PROVIDER_ID","twitter.com"),Ie(Xr,"TWITTER_SIGN_IN_METHOD","twitter.com"),Yr.prototype.ya=function(e){return this.signInMethod==Jr.EMAIL_LINK_SIGN_IN_METHOD?qa(e,gi,{email:this.a,oobCode:this.b}):qa(e,vi,{email:this.a,password:this.b})},Yr.prototype.c=function(e,t){return this.signInMethod==Jr.EMAIL_LINK_SIGN_IN_METHOD?qa(e,Fc,{idToken:t,email:this.a,oobCode:this.b}):qa(e,jc,{idToken:t,email:this.a,password:this.b})},Yr.prototype.f=function(e,t){return Fr(this.ya(e),t)},Yr.prototype.D=function(){return{email:this.a,password:this.b,signInMethod:this.signInMethod}},I(Jr,{PROVIDER_ID:"password"}),I(Jr,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),I(Jr,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Zr.prototype.ya=function(e){return e.Ta(eo(this))},Zr.prototype.c=function(e,t){var n=eo(this);return n.idToken=t,qa(e,ei,n)},Zr.prototype.f=function(e,t){var n=eo(this);return n.operation="REAUTH",e=qa(e,Hc,n),Fr(e,t)},Zr.prototype.D=function(){var e={providerId:"phone"};return this.a.Sa&&(e.verificationId=this.a.Sa),this.a.Ra&&(e.verificationCode=this.a.Ra),this.a.Fa&&(e.temporaryProof=this.a.Fa),this.a.$&&(e.phoneNumber=this.a.$),e},to.prototype.Ta=function(e,t){var n=this.a.b;return At(t.verify()).then(function(r){if(!s(r))throw new Pe("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(t.type){case"recaptcha":return _a(n,{phoneNumber:e,recaptchaToken:r}).then(function(e){return"function"==typeof t.reset&&t.reset(),e},function(e){throw"function"==typeof t.reset&&t.reset(),e});default:throw new Pe("argument-error","Only firebase.auth.ApplicationVerifiers with type=\"recaptcha\" are currently supported.");}})},I(to,{PROVIDER_ID:"phone"}),I(to,{PHONE_SIGN_IN_METHOD:"phone"}),ao.prototype.D=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.D()}};var pc=null;so.prototype.subscribe=function(e){var t=this;this.a.push(e),this.b||(this.b=function(e){for(var n=0;n<t.a.length;n++)t.a[n](e)},e=G("universalLinks.subscribe",dp),"function"==typeof e&&e(null,this.b))},so.prototype.unsubscribe=function(e){ct(this.a,function(t){return t==e})},$(lo,Pe),$(po,Pe),po.prototype.D=function(){var e={code:this.code,message:this.message};this.email&&(e.email=this.email),this.phoneNumber&&(e.phoneNumber=this.phoneNumber);var t=this.credential&&this.credential.D();return t&&vt(e,t),e},po.prototype.toJSON=function(){return this.D()};var cc=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;uo.prototype.c=null;var uc;$(mo,uo),mo.prototype.a=function(){var e=go(this);return e?new ActiveXObject(e):new XMLHttpRequest},mo.prototype.b=function(){var e={};return go(this)&&(e[0]=!0,e[1]=!0),e},uc=new mo,$(fo,uo),fo.prototype.a=function(){var e=new XMLHttpRequest;if("withCredentials"in e)return e;if("undefined"!=typeof XDomainRequest)return new yo;throw Error("Unsupported browser")},fo.prototype.b=function(){return{}},na=yo.prototype,na.open=function(e,t,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(e,t)},na.send=function(e){if(!e)this.a.send();else if("string"==typeof e)this.a.send(e);else throw Error("Only string data is supported")},na.abort=function(){this.a.abort()},na.setRequestHeader=function(){},na.getResponseHeader=function(e){return"content-type"==e.toLowerCase()?this.a.contentType:""},na.bc=function(){this.status=200,this.responseText=this.a.responseText,bo(this,4)},na.Bb=function(){this.status=500,this.responseText="",bo(this,4)},na.fc=function(){this.Bb()},na.cc=function(){this.status=200,bo(this,1)},na.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},xo.prototype.a=null;var hc=0;xo.prototype.reset=function(t,n,r,o,i){"number"==typeof i||hc++,o||ja(),delete this.a},ko.prototype.toString=function(){return this.name};var mc=new ko("SEVERE",1E3),gc=new ko("WARNING",900),fc=new ko("CONFIG",700),yc=new ko("FINE",500);vo.prototype.log=function(e,t,n){if(e.value>=So(this).value)for(m(t)&&(t=t()),e=new xo(e,t+"",this.f),n&&(e.a=n),n=this;n;)n=n.a};var xc={},vc=null;$(P,uo),P.prototype.a=function(){return new To(this.f)},P.prototype.b=function(e){return function(){return e}}({}),$(To,hn);var kc=0;na=To.prototype,na.open=function(e,t){if(this.readyState!=kc)throw this.abort(),Error("Error reopening a connection");this.h=e,this.c=t,this.readyState=1,_o(this)},na.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var t={headers:this.g,method:this.h,credentials:void 0,cache:void 0};e&&(t.body=e),this.i.fetch(new Request(this.c,t)).then(this.ec.bind(this),this.Cb.bind(this))},na.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,_o(this)),this.readyState=kc},na.ec=function(e){this.a&&(this.b||(this.b=e.headers,this.readyState=2,_o(this)),this.a&&(this.readyState=3,_o(this),this.a&&e.text().then(this.dc.bind(this,e),this.Cb.bind(this))))},na.dc=function(e,t){this.a&&(this.status=e.status,this.statusText=e.statusText,this.responseText=t,this.readyState=4,_o(this))},na.Cb=function(e){var t=this.f;t&&t.log(gc,"Failed to fetch url "+this.c,e instanceof Error?e:Error(e)),this.a&&(this.readyState=4,_o(this))},na.setRequestHeader=function(e,t){this.g.append(e,t)},na.getResponseHeader=function(e){return this.b?this.b.get(e.toLowerCase())||"":((e=this.f)&&e.log(gc,"Attempting to get response header but no headers have been received for url: "+this.c,void 0),"")},na.getAllResponseHeaders=function(){if(!this.b){var e=this.f;return e&&e.log(gc,"Attempting to get all response headers but no headers have been received for url: "+this.c,void 0),""}e=[];for(var t=this.b.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},$(Eo,hn);var Sc="";Eo.prototype.b=wo("goog.net.XhrIo");var wc=/^https?$/i,Cc=["POST","PUT"];na=Eo.prototype,na.Ga=function(){"undefined"!=typeof lp&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",Co(this.b,Uo(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},na.abort=function(){this.a&&this.c&&(Co(this.b,Uo(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Do(this))},na.ua=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),Do(this,!0)),Eo.lb.ua.call(this)},na.Fb=function(){this.pa||(this.I||this.i||this.f?Mo(this):this.tc())},na.tc=function(){Mo(this)},na.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.o){case Sc:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer;}var e=this.b;return e&&e.log(mc,"Response type "+this.o+" is not supported on this browser",void 0),null}catch(e){return Co(this.b,"Can not get response: "+e.message),null}},zo.prototype.cancel=function(e){if(this.a)this.c instanceof zo&&this.c.cancel();else{if(this.b){var t=this.b;delete this.b,e?t.cancel(e):(t.m--,0>=t.m&&t.cancel())}this.v?this.v.call(this.u,this):this.l=!0,this.a||(e=new Xo(this),qo(this),jo(this,!1,e))}},zo.prototype.o=function(e,t){this.i=!1,jo(this,e,t)},zo.prototype.C=function(){qo(this),jo(this,!0,null)},zo.prototype.then=function(t,n,r){var o=new _t(function(e,t){i=e,s=t}),i,s;return Wo(this,i,function(e){e instanceof Xo?o.cancel():s(e)}),o.then(t,n,r)},t(zo),$(Go,et),Go.prototype.message="Deferred has already fired",Go.prototype.name="AlreadyCalledError",$(Xo,et),Xo.prototype.message="Deferred was canceled",Xo.prototype.name="CanceledError",Qo.prototype.c=function(){throw delete Tc[this.a],this.b};var Tc={},_c=0,Ec=1;$(ta,et),$(ra,uo),ra.prototype.a=function(){return new this.f},ra.prototype.b=function(){return{}};var Ac="idToken",L=new Be(3E4,6E4),Ic={"Content-Type":"application/x-www-form-urlencoded"},Nc=new Be(3E4,6E4),Lc={"Content-Type":"application/json"},Oc;oa.prototype.o=function(t,r,o,i,s,e){if(le()&&("undefined"==typeof dp.fetch||"undefined"==typeof dp.Headers||"undefined"==typeof dp.Request))throw new Pe("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 l=new Eo(this.c);if(e){l.g=n(0,e);var d=setTimeout(function(){l.dispatchEvent("timeout")},e)}E(l,"complete",function(){d&&clearTimeout(d);var e=null;try{e=JSON.parse(Fo(this))||null}catch(t){e=null}r&&r(e)}),mn(l,"ready",function(){d&&clearTimeout(d),Wt(this)}),mn(l,"timeout",function(){d&&clearTimeout(d),Wt(this),r&&r(null)}),Ao(l,t,o,i,s)};var Mc=Hn("https://apis.google.com/js/client.js?onload=%{onload}"),Dc="__fcb"+i(1E6*Math.random()).toString();oa.prototype.l=function(t,n,r,o,i){var s=this;Oc.then(function(){window.gapi.client.setApiKey(s.b);var l=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:r,body:o,headers:i,authType:"none",callback:function(e){window.gapi.auth.setToken(l),n&&n(e)}})}).s(function(e){n&&n({error:{message:e&&e.message||"CORS_UNSUPPORTED"}})})},oa.prototype.Pa=function(){return qa(this,qc,{})},oa.prototype.mb=function(e,t){return qa(this,di,{idToken:e,email:t})},oa.prototype.nb=function(e,t){return qa(this,jc,{idToken:e,password:t})};var Rc={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};na=oa.prototype,na.ob=function(e,t){var n={idToken:e},r=[];return x(Rc,function(o,i){var s=t[i];null===s?r.push(o):i in t&&(n[i]=s)}),r.length&&(n.deleteAttribute=r),qa(this,di,n)},na.hb=function(e,t){return e={requestType:"PASSWORD_RESET",email:e},vt(e,t),qa(this,ci,e)},na.ib=function(e,t){return e={requestType:"EMAIL_SIGNIN",email:e},vt(e,t),qa(this,ti,e)},na.gb=function(e,t){return e={requestType:"VERIFY_EMAIL",idToken:e},vt(e,t),qa(this,bi,e)},na.Ta=function(e){return qa(this,Wc,e)},na.Xa=function(e,t){return qa(this,ui,{oobCode:e,newPassword:t})},na.Ja=function(e){return qa(this,qi,{oobCode:e})},na.Va=function(e){return qa(this,Pc,{oobCode:e})};var Pc={endpoint:"setAccountInfo",B:Ua,da:"email"},qi={endpoint:"resetPassword",B:Ua,J:function(e){var t=e.requestType;if(!t||!e.email&&"EMAIL_SIGNIN"!=t)throw new Pe("internal-error")}},pi={endpoint:"signupNewUser",B:function(e){if(ha(e),!e.password)throw new Pe("weak-password")},J:va,R:!0},ri={endpoint:"createAuthUri"},Bc={endpoint:"deleteAccount",T:["idToken"]},si={endpoint:"setAccountInfo",T:["idToken","deleteProvider"],B:function(e){if(!_(e.deleteProvider))throw new Pe("internal-error")}},gi={endpoint:"emailLinkSignin",T:["email","oobCode"],B:ha,J:va,R:!0},Fc={endpoint:"emailLinkSignin",T:["idToken","email","oobCode"],B:ha,J:va,R:!0},Uc={endpoint:"getAccountInfo"},ti={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(e){if("EMAIL_SIGNIN"!=e.requestType)throw new Pe("internal-error");ha(e)},da:"email"},bi={endpoint:"getOobConfirmationCode",T:["idToken","requestType"],B:function(e){if("VERIFY_EMAIL"!=e.requestType)throw new Pe("internal-error")},da:"email"},ci={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(e){if("PASSWORD_RESET"!=e.requestType)throw new Pe("internal-error");ha(e)},da:"email"},ai={rb:!0,endpoint:"getProjectConfig",Eb:"GET"},zc={rb:!0,endpoint:"getRecaptchaParam",Eb:"GET",J:function(e){if(!e.recaptchaSiteKey)throw new Pe("internal-error")}},ui={endpoint:"resetPassword",B:Ua,da:"email"},oi={endpoint:"sendVerificationCode",T:["phoneNumber","recaptchaToken"],da:"sessionInfo"},di={endpoint:"setAccountInfo",T:["idToken"],B:ma,R:!0},jc={endpoint:"setAccountInfo",T:["idToken"],B:function(e){if(ma(e),!e.password)throw new Pe("weak-password")},J:va,R:!0},qc={endpoint:"signupNewUser",J:va,R:!0},Vc={endpoint:"verifyAssertion",B:Aa,J:Ia,R:!0},ki={endpoint:"verifyAssertion",B:Aa,J:function(e){if(e.errorMessage&&"USER_NOT_FOUND"==e.errorMessage)throw new Pe("user-not-found");if(e.errorMessage)throw O(e.errorMessage);if(!e[Ac])throw new Pe("internal-error")},R:!0},mi={endpoint:"verifyAssertion",B:function(e){if(Aa(e),!e.idToken)throw new Pe("internal-error")},J:Ia,R:!0},li={endpoint:"verifyCustomToken",B:function(e){if(!e.token)throw new Pe("invalid-custom-token")},J:va,R:!0},vi={endpoint:"verifyPassword",B:function(e){if(ha(e),!e.password)throw new Pe("wrong-password")},J:va,R:!0},Wc={endpoint:"verifyPhoneNumber",B:ka,J:va},ei={endpoint:"verifyPhoneNumber",B:function(e){if(!e.idToken)throw new Pe("internal-error");ka(e)},J:function(e){if(e.temporaryProof)throw e.code="credential-already-in-use",co(e);va(e)}},Hc={Tb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",B:ka,J:va},Kc={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"}},wi;wi=Ka("__EID__")?"__EID__":void 0;var yi=Hn("https://apis.google.com/js/api.js?onload=%{onload}"),Fi=new Be(3E4,6E4),Gi=new Be(5E3,15E3),Ci=null;fi.prototype.toString=function(){return this.f?In(this.a,"v",this.f):Fn(this.a.a,"v"),this.b?In(this.a,"eid",this.b):Fn(this.a.a,"eid"),this.c.length?In(this.a,"fw",this.c.join(",")):Fn(this.a.a,"fw"),this.a.toString()},xi.prototype.toString=function(){var t=Ln(this.o,"/__/auth/handler");if(In(t,"apiKey",this.l),In(t,"appName",this.c),In(t,"authType",this.m),this.a.isOAuthProvider){var n=this.a;try{var r=sp.app(this.c).auth().ea()}catch(e){r=null}for(var o in n.Ya=r,In(t,"providerId",this.a.providerId),n=this.a,r=xe(n.vb),r)r[o]=r[o].toString();o=n.Ac,r=xt(r);for(var i=0,e;i<o.length;i++)e=o[i],e in r&&delete r[e];n.$a&&n.Ya&&!r[n.$a]&&(r[n.$a]=n.Ya),bt(r)||In(t,"customParameters",we(r))}if("function"==typeof this.a.Ab&&(n=this.a.Ab(),n.length&&In(t,"scopes",n.join(","))),this.i?In(t,"redirectUrl",this.i):Fn(t.a,"redirectUrl"),this.g?In(t,"eventId",this.g):Fn(t.a,"eventId"),this.h?In(t,"v",this.h):Fn(t.a,"v"),this.b)for(var s in this.b)this.b.hasOwnProperty(s)&&!F(t,s)&&In(t,s,this.b[s]);return this.f?In(t,"eid",this.f):Fn(t.a,"eid"),s=_i(this.c),s.length&&In(t,"fw",s.join(",")),t.toString()},na=Ei.prototype,na.Ea=function(t,n,r){var o=new Pe("popup-closed-by-user"),i=new Pe("web-storage-unsupported"),e=this,s=!1;return this.ga().then(function(){Oi(e).then(function(e){e||(t&&be(t),n(i),s=!0)})}).s(function(){}).then(function(){if(!s)return de(t)}).then(function(){if(!s)return yn(r).then(function(){n(o)})})},na.Ib=function(){var e=re();return!ke(e)&&!te(e)},na.Db=function(){return!1},na.zb=function(t,n,r,o,i,e,s){if(!t)return A(new Pe("popup-blocked"));if(s&&!ke())return this.ga().s(function(e){be(t),i(e)}),o(),At();this.a||(this.a=Ai(Ni(this)));var l=this;return this.a.then(function(){var e=l.ga().s(function(e){throw be(t),i(e),e});return o(),e}).then(function(){if(oo(r),!s){var o=Li(l.l,l.f,l.b,n,r,null,e,l.c,void 0,l.h);mr(o,t)}}).s(function(e){throw"auth/network-request-failed"==e.code&&(l.a=null),e})},na.Ca=function(t,n,r){this.a||(this.a=Ai(Ni(this)));var o=this;return this.a.then(function(){oo(n);var i=Li(o.l,o.f,o.b,t,n,hr(),r,o.c,void 0,o.h);mr(i)}).s(function(e){throw"auth/network-request-failed"==e.code&&(o.a=null),e})},na.ga=function(){var e=this;return Ii(this).then(function(){return e.i.bb}).s(function(){throw e.a=null,new Pe("network-request-failed")})},na.Mb=function(){return!0},na.va=function(e){this.g.push(e)},na.Ka=function(e){ct(this.g,function(t){return t==e})},na=Di.prototype,na.get=function(e){return At(this.a.getItem(e)).then(function(e){return e&&ye(e)})},na.set=function(e,t){return At(this.a.setItem(e,we(t)))},na.P=function(e){return At(this.a.removeItem(e))},na.Y=function(){},na.ca=function(){};var Hi;na=Ri.prototype,na.set=function(t,n){var r=!1,o=this,e;return Bi(this).then(function(n){return e=n,n=Ui(ji(e,!0)),Wi(n.get(t))}).then(function(i){var s=Ui(ji(e,!0));return i?(i.value=n,Wi(s.put(i))):(o.b++,r=!0,i={},i.fbase_key=t,i.value=n,Wi(s.add(i)))}).then(function(){o.f[t]=n}).ia(function(){r&&o.b--})},na.get=function(e){return Bi(this).then(function(t){return Wi(Ui(ji(t,!1)).get(e))}).then(function(e){return e&&e.value})},na.P=function(e){var t=!1,n=this;return Bi(this).then(function(r){return t=!0,n.b++,Wi(Ui(ji(r,!0))["delete"](e))}).then(function(){delete n.f[e]}).ia(function(){t&&n.b--})},na.Kc=function(){var e=this;return Bi(this).then(function(e){var t=Ui(ji(e,!1));return t.getAll?Wi(t.getAll()):new _t(function(n,r){var o=[],i=t.openCursor();i.onsuccess=function(e){(e=e.target.result)?(o.push(e.value),e["continue"]()):n(o)},i.onerror=function(e){r(Error(e.target.errorCode))}})}).then(function(t){var n={},r=[];if(0==e.b){for(r=0;r<t.length;r++)n[t[r].fbase_key]=t[r].value;r=gr(e.f,n),e.f=n}return r})},na.Y=function(e){0==this.a.length&&Ki(this),this.a.push(e)},na.ca=function(e){ct(this.a,function(t){return t==e}),0==this.a.length&&this.c&&this.c.cancel("STOP_EVENT")},na=Xi.prototype,na.get=function(e){return this.b.then(function(t){return t.get(e)})},na.set=function(e,t){return this.b.then(function(n){return n.set(e,t)})},na.P=function(e){return this.b.then(function(t){return t.P(e)})},na.Y=function(e){this.a.push(e)},na.ca=function(e){ct(this.a,function(t){return t==e})},na=Qi.prototype,na.get=function(e){return At(this.a[e])},na.set=function(e,t){return this.a[e]=t,At()},na.P=function(e){return delete this.a[e],At()},na.Y=function(){},na.ca=function(){},na=Yi.prototype,na.get=function(e){var t=this;return At().then(function(){var n=t.a.getItem(e);return ye(n)})},na.set=function(e,t){var n=this;return At().then(function(){var r=we(t);null===r?n.P(e):n.a.setItem(e,r)})},na.P=function(e){var t=this;return At().then(function(){t.a.removeItem(e)})},na.Y=function(e){dp.window&&tn(dp.window,"storage",e)},na.ca=function(e){dp.window&&an(dp.window,"storage",e)},na=Zi.prototype,na.get=function(){return At(null)},na.set=function(){return At()},na.P=function(){return At()},na.Y=function(){},na.ca=function(){},na=es.prototype,na.get=function(e){var t=this;return At().then(function(){var n=t.a.getItem(e);return ye(n)})},na.set=function(e,t){var n=this;return At().then(function(){var r=we(t);null===r?n.P(e):n.a.setItem(e,r)})},na.P=function(e){var t=this;return At().then(function(){t.a.removeItem(e)})},na.Y=function(){},na.ca=function(){};var Vi={A:Yi,Qa:es},Gc={A:Yi,Qa:es},Xc={A:Di,Qa:Zi},Qc={A:Yi,Qa:Zi},Yc={Xc:"local",NONE:"none",Zc:"session"},Jc,$c;na=as.prototype,na.get=function(e,t){return ss(this,e.A).get(ls(e,t))},na.set=function(t,n,r){var o=ls(t,r),i=this,e=ss(this,t.A);return e.set(o,n).then(function(){return e.get(o)}).then(function(e){"local"==t.A&&(i.b[o]=e)})},na.addListener=function(e,t,n){e=ls(e,t),this.m&&(this.b[e]=dp.localStorage.getItem(e)),bt(this.a)&&(ss(this,"local").Y(this.f),this.h||(ur()||!Fe())&&dp.indexedDB||!this.m||cs(this)),this.a[e]||(this.a[e]=[]),this.a[e].push(n)},na.removeListener=function(e,t,n){e=ls(e,t),this.a[e]&&(ct(this.a[e],function(e){return e==n}),0==this.a[e].length&&delete this.a[e]),bt(this.a)&&(ss(this,"local").ca(this.f),us(this))},na.Lb=function(t){if(t&&t.f){var n=t.a.key;if(null==n)for(var r in this.a){var o=this.b[r];"undefined"==typeof o&&(o=null);var i=dp.localStorage.getItem(r);i!==o&&(this.b[r]=i,this.Wa(r))}else if(0==n.indexOf("firebase:")&&this.a[n]){if("undefined"==typeof t.a.a?us(this):ss(this,"local").ca(this.f),this.o)if(r=dp.localStorage.getItem(n),o=t.a.newValue,o!==r)null===o?dp.localStorage.removeItem(n):dp.localStorage.setItem(n,o);else if(this.b[n]===o&&"undefined"==typeof t.a.a)return;var e=this;r=function(){("undefined"!=typeof t.a.a||e.b[n]!==dp.localStorage.getItem(n))&&(e.b[n]=dp.localStorage.getItem(n),e.Wa(n))},kp&&Op&&10==Op&&dp.localStorage.getItem(n)!==t.a.newValue&&t.a.newValue!==t.a.oldValue?setTimeout(r,10):r()}}else za(t,j(this.Wa,this))},na.Wa=function(e){this.a[e]&&za(this.a[e],function(e){e()})};var Zc={name:"authEvent",A:"local"},eu;$(fs,function(){this.b=-1});for(var tu=64,nu=[],ru=0;ru<tu-1;ru++)nu[ru]=0;var ou=ut(128,nu);fs.prototype.reset=function(){this.g=this.c=0,this.a=dp.Int32Array?new Int32Array(this.h):ht(this.h)};var au=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];$(xs,fs);var iu=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];na=vs.prototype,na.ga=function(){return this.za?this.za:this.za=he().then(function(){if("function"!=typeof G("universalLinks.subscribe",dp))throw ks("cordova-universal-links-plugin is not installed");if("undefined"==typeof G("BuildInfo.packageName",dp))throw ks("cordova-plugin-buildinfo is not installed");if("function"!=typeof G("cordova.plugins.browsertab.openUrl",dp))throw ks("cordova-plugin-browsertab is not installed");if("function"!=typeof G("cordova.InAppBrowser.open",dp))throw ks("cordova-plugin-inappbrowser is not installed")},function(){throw new Pe("cordova-not-ready")})},na.Ea=function(e,t){return t(new Pe("operation-not-supported-in-this-environment")),At()},na.zb=function(){return A(new Pe("operation-not-supported-in-this-environment"))},na.Mb=function(){return!1},na.Ib=function(){return!0},na.Db=function(){return!0},na.Ca=function(t,n,r){if(this.c)return A(new Pe("redirect-operation-pending"));var o=this,i=dp.document,e=null,s=null,l=null,d=null;return this.c=At().then(function(){return oo(n),_s(o)}).then(function(){return Cs(o,t,n,r)}).then(function(){return new _t(function(t,n){s=function(){var e=G("cordova.plugins.browsertab.close",dp);return t(),"function"==typeof e&&e(),o.a&&"function"==typeof o.a.close&&(o.a.close(),o.a=null),!1},o.va(s),l=function(){e||(e=yn(2E3).then(function(){n(new Pe("redirect-cancelled-by-user"))}))},d=function(){Ce()&&l()},i.addEventListener("resume",l,!1),re().toLowerCase().match(/android/)||i.addEventListener("visibilitychange",d,!1)}).s(function(e){return Es(o).then(function(){throw e})})}).ia(function(){l&&i.removeEventListener("resume",l,!1),d&&i.removeEventListener("visibilitychange",d,!1),e&&e.cancel(),s&&o.Ka(s),o.c=null})},na.va=function(e){this.b.push(e),_s(this).s(function(t){"auth/invalid-cordova-configuration"===t.code&&(t=new ao("unknown",null,null,null,new Pe("no-auth-event")),e(t))})},na.Ka=function(e){ct(this.b,function(t){return t==e})};var su={name:"pendingRedirect",A:"session"};Ms.prototype.reset=function(){this.f=!1,this.a.Ka(this.i),this.a=Ds(this.v,this.m,this.l)},Ms.prototype.subscribe=function(e){if(dt(this.h,e)||this.h.push(e),!this.f){var t=this;Os(this.g).then(function(e){e?Ls(t.g).then(function(){Rs(t).s(function(e){var n=new ao("unknown",null,null,null,new Pe("operation-not-supported-in-this-environment"));Fs(e)&&t.o(n)})}):Ps(t)}).s(function(){Ps(t)})}},Ms.prototype.unsubscribe=function(e){ct(this.h,function(t){return t==e})},Ms.prototype.o=function(e){if(!e)throw new Pe("invalid-auth-event");for(var t=!1,n=0,r;n<this.h.length;n++)if(r=this.h[n],r.sb(e.b,e.c)){(t=this.b[e.b])&&t.h(e,r),t=!0;break}return js(this.c),t};var lu=new Be(2E3,1E4),du=new Be(3E4,6E4);Ms.prototype.fa=function(){return this.c.fa()},Ms.prototype.Ca=function(t,n,r){var o=this,i;return Ns(this.g).then(function(){return o.a.Ca(t,n,r).s(function(e){if(Fs(e))throw new Pe("operation-not-supported-in-this-environment");return i=e,Ls(o.g).then(function(){throw i})}).then(function(){return o.a.Mb()?new _t(function(){}):Ls(o.g).then(function(){return o.fa()}).then(function(){}).s(function(){})})})},Ms.prototype.Ea=function(e,t,n,r){return this.a.Ea(n,function(n){e.ha(t,null,n,r)},lu.get())};var pu={};zs.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},zs.prototype.h=function(t,n){if(t){this.reset(),this.g=!0;var r=t.b,o=t.c,i=t.a&&"auth/web-storage-unsupported"==t.a.code,e=t.a&&"auth/operation-not-supported-in-this-environment"==t.a.code;"unknown"!=r||i||e?t.a?(Hs(this,!0,null,t.a),At()):n.wa(r,o)?qs(this,t,n):A(new Pe("invalid-auth-event")):(Hs(this,!1,null,null),At())}else A(new Pe("invalid-auth-event"))},zs.prototype.fa=function(){var e=this;return new _t(function(t,n){e.b?e.b().then(t,n):(e.f.push(t),e.c.push(n),Ks(e))})},Gs.prototype.h=function(e,t){if(e){var n=e.b,r=e.c;e.a?(t.ha(e.b,null,e.a,e.c),At()):t.wa(n,r)?Xs(e,t):A(new Pe("invalid-auth-event"))}else A(new Pe("invalid-auth-event"))},Ys.prototype.confirm=function(e){return e=no(this.verificationId,e),this.a(e)},Zs.prototype.start=function(){this.a=this.c,Rl(this,!0)},Zs.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},ed.prototype.D=function(){return{apiKey:this.f.b,refreshToken:this.a,accessToken:this.b,expirationTime:this.c}},ed.prototype.getToken=function(e){return e=!!e,this.b&&!this.a?A(new Pe("user-token-expired")):e||!this.b||ja()>this.c-3E4?this.a?sd(this,{grant_type:"refresh_token",refresh_token:this.a}):At(null):At({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},ld.prototype.D=function(){return{lastLoginAt:this.b,createdAt:this.a}},$(hd,Qt),$(md,hn),md.prototype.oa=function(e){this.ka=e,sa(this.b,e)},md.prototype.ea=function(){return this.ka},md.prototype.xa=function(){return ht(this.O)},md.prototype.Ha=function(){this.w.b&&(this.w.stop(),this.w.start())},Ie(md.prototype,"providerId","firebase"),na=md.prototype,na.reload=function(){var e=this;return ql(this,bl(this).then(function(){return hl(e).then(function(){return Id(e)}).then(Od)}))},na.ac=function(e){return this.F(e).then(function(e){return new $s(e)})},na.F=function(e){var t=this;return ql(this,bl(this).then(function(){return t.h.getToken(e)}).then(function(e){if(!e)throw new Pe("internal-error");return e.accessToken!=t.qa&&(_d(t,e.accessToken),t.dispatchEvent(new hd("tokenChanged"))),fl(t,"refreshToken",e.refreshToken),e.accessToken}))},na.uc=function(e){if(e=e.users,!e||!e.length)throw new Pe("internal-error");e=e[0],al(this,{uid:e.localId,displayName:e.displayName,photoURL:e.photoUrl,email:e.email,emailVerified:!!e.emailVerified,phoneNumber:e.phoneNumber,lastLoginAt:e.lastLoginAt,createdAt:e.createdAt});for(var t=jl(e),n=0;n<t.length;n++)dl(this,t[n]);fl(this,"isAnonymous",!(this.email&&e.passwordHash)&&!(this.providerData&&this.providerData.length))},na.cb=function(e){var t=this,n=null;return ql(this,e.f(this.b,this.uid).then(function(e){return il(t,e),n=nl(t,e,"reauthenticate"),t.i=null,t.reload()}).then(function(){return n}),!0)},na.vc=function(e){return Ge("firebase.User.prototype.reauthenticateWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential instead."),this.cb(e).then(function(){})},na.ab=function(e){var t=this,n=null;return ql(this,ll(this,e.providerId).then(function(){return t.F()}).then(function(n){return e.c(t.b,n)}).then(function(e){return n=nl(t,e,"link"),ml(t,e)}).then(function(){return n}))},na.mc=function(e){return Ge("firebase.User.prototype.linkWithCredential is deprecated. Please use firebase.User.prototype.linkAndRetrieveDataWithCredential instead."),this.ab(e).then(function(e){return e.user})},na.nc=function(e,t){var n=this;return ql(this,ll(this,"phone").then(function(){return Js(bd(n),e,t,j(n.ab,n))}))},na.wc=function(e,t){var n=this;return ql(this,At().then(function(){return Js(bd(n),e,t,j(n.cb,n))}),!0)},na.mb=function(e){var t=this;return ql(this,this.F().then(function(n){return t.b.mb(n,e)}).then(function(e){return il(t,e),t.reload()}))},na.Pc=function(e){var t=this;return ql(this,this.F().then(function(n){return e.c(t.b,n)}).then(function(e){return il(t,e),t.reload()}))},na.nb=function(e){var t=this;return ql(this,this.F().then(function(n){return t.b.nb(n,e)}).then(function(e){return il(t,e),t.reload()}))},na.ob=function(e){if(void 0===e.displayName&&void 0===e.photoURL)return bl(this);var t=this;return ql(this,this.F().then(function(n){return t.b.ob(n,{displayName:e.displayName,photoUrl:e.photoURL})}).then(function(e){return il(t,e),fl(t,"displayName",e.displayName||null),fl(t,"photoURL",e.photoUrl||null),za(t.providerData,function(e){"password"===e.providerId&&(Ie(e,"displayName",t.displayName),Ie(e,"photoURL",t.photoURL))}),Id(t)}).then(Od))},na.Nc=function(e){var t=this;return ql(this,hl(this).then(function(n){return dt(cl(t),e)?Ea(t.b,n,[e]).then(function(e){var n={};return za(e.providerUserInfo||[],function(e){n[e.providerId]=!0}),za(cl(t),function(e){n[e]||el(t,e)}),n[to.PROVIDER_ID]||Ie(t,"phoneNumber",null),Id(t)}):Id(t).then(function(){throw new Pe("no-such-provider")})}))},na.delete=function(){var e=this;return ql(this,this.F().then(function(t){return qa(e.b,Bc,{idToken:t})}).then(function(){e.dispatchEvent(new hd("userDeleted"))})).then(function(){for(var t=0;t<e.G.length;t++)e.G[t].cancel("app-deleted");gd(e,null),yd(e,null),e.G=[],e.C=!0,Sd(e),Ie(e,"refreshToken",null),e.a&&e.a.unsubscribe(e)})},na.sb=function(e,t){return"linkViaPopup"==e&&(this.g||null)==t&&this.f||"reauthViaPopup"==e&&(this.g||null)==t&&this.f||"linkViaRedirect"==e&&(this.aa||null)==t||"reauthViaRedirect"==e&&(this.aa||null)==t},na.ha=function(e,t,n,r){"linkViaPopup"!=e&&"reauthViaPopup"!=e||r!=(this.g||null)||(n&&this.v?this.v(n):t&&!n&&this.f&&this.f(t),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},na.wa=function(e,t){return"linkViaPopup"==e&&t==(this.g||null)?j(this.xb,this):"reauthViaPopup"==e&&t==(this.g||null)?j(this.yb,this):"linkViaRedirect"==e&&(this.aa||null)==t?j(this.xb,this):"reauthViaRedirect"==e&&(this.aa||null)==t?j(this.yb,this):null},na.oc=function(e){var t=this;return ol(this,"linkViaPopup",e,function(){return ll(t,e.providerId).then(function(){return Id(t)})},!1)},na.xc=function(e){return ol(this,"reauthViaPopup",e,function(){return At()},!0)},na.pc=function(e){var t=this;return pl(this,"linkViaRedirect",e,function(){return ll(t,e.providerId)},!1)},na.yc=function(e){return pl(this,"reauthViaRedirect",e,function(){return At()},!0)},na.xb=function(t,n){var r=this;this.c&&(this.c.cancel(),this.c=null);var o=null,i=this.F().then(function(e){return Da(r.b,{requestUri:t,sessionId:n,idToken:e})}).then(function(e){return o=nl(r,e,"link"),ml(r,e)}).then(function(){return o});return ql(this,i)},na.yb=function(t,n){var r=this;this.c&&(this.c.cancel(),this.c=null);var o=null,i=At().then(function(){return Fr(Fa(r.b,{requestUri:t,sessionId:n}),r.uid)}).then(function(e){return o=nl(r,e,"reauthenticate"),il(r,e),r.i=null,r.reload()}).then(function(){return o});return ql(this,i,!0)},na.gb=function(e){var t=this,n=null;return ql(this,this.F().then(function(t){return n=t,"undefined"==typeof e||bt(e)?{}:vr(new $e(e))}).then(function(e){return t.b.gb(n,e)}).then(function(e){if(t.email!=e)return t.reload()}).then(function(){}))},na.toJSON=function(){return this.D()},na.D=function(){var e={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,providerData:[],apiKey:this.l,appName:this.o,authDomain:this.u,stsTokenManager:this.h.D(),redirectEventId:this.aa||null};return this.metadata&&vt(e,this.metadata.D()),za(this.providerData,function(t){e.providerData.push(Le(t))}),e};var cu={name:"redirectUser",A:"session"};zl.prototype.g=function(){var e=this,t=Bl("local");Jl(this,function(){return At().then(function(){return e.c&&"local"!=e.c.A?e.b.get(t,e.a):null}).then(function(n){if(n)return Al(e,"local").then(function(){e.c=t})})})};var sl={name:"persistence",A:"session"};zl.prototype.jb=function(e){var t=null,n=this;return os(e),Jl(this,function(){return e==n.c.A?At():n.b.get(n.c,n.a).then(function(r){return t=r,Al(n,e)}).then(function(){if(n.c=Bl(e),t)return n.b.set(n.c,t,n.a)})})},$(Dl,hn),$(Md,Qt),$(Ql,Qt),na=Dl.prototype,na.jb=function(e){return e=this.h.jb(e),Yl(this,e)},na.oa=function(e){this.W===e||this.l||(this.W=e,sa(this.b,this.W),this.dispatchEvent(new Md(this.ea())))},na.ea=function(){return this.W},na.Qc=function(){var e=dp.navigator;this.oa(e?e.languages&&e.languages[0]||e.language||e.userLanguage||null:null)},na.qc=function(e){this.G.push(e),la(this.b,sp.SDK_VERSION?br(sp.SDK_VERSION,this.G):null),this.dispatchEvent(new Ql(this.G))},na.xa=function(){return ht(this.G)},na.toJSON=function(){return{apiKey:Xl(this).options.apiKey,authDomain:Xl(this).options.authDomain,appName:Xl(this).name,currentUser:S(this)&&S(this).D()}},na.sb=function(e,t){return"unknown"===e||"signInViaRedirect"===e||"signInViaPopup"===e&&this.g==t&&!!this.f},na.ha=function(e,t,n,r){"signInViaPopup"==e&&this.g==r&&(n&&this.v?this.v(n):t&&!n&&this.f&&this.f(t),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},na.wa=function(e,t){return"signInViaRedirect"==e||"signInViaPopup"==e&&this.g==t&&this.f?j(this.Xb,this):null},na.Xb=function(t,n){var r=this;t={requestUri:t,sessionId:n},this.c&&(this.c.cancel(),this.c=null);var o=null,i=null,s=Ma(r.b,t).then(function(e){return o=ro(e),i=Ir(e),e});return t=r.V.then(function(){return s}).then(function(e){return Ol(r,e)}).then(function(){return J({user:S(r),credential:o,additionalUserInfo:i,operationType:"signIn"})}),Yl(this,t)},na.Hc=function(t){if(!se())return A(new Pe("operation-not-supported-in-this-environment"));var n=this,r=Ar(t.providerId),o=ze(),i=null;(!ke()||je())&&Xl(this).options.authDomain&&t.isOAuthProvider&&(i=Li(Xl(this).options.authDomain,Xl(this).options.apiKey,Xl(this).name,"signInViaPopup",t,null,o,sp.SDK_VERSION||null));var s=ce(i,r&&r.Ba,r&&r.Aa);return r=Pl(this).then(function(n){return Bs(n,s,"signInViaPopup",t,o,!!i)}).then(function(){return new _t(function(e,t){n.ha("signInViaPopup",null,new Pe("cancelled-popup-request"),n.g),n.f=e,n.v=t,n.g=o,n.c=n.a.Ea(n,"signInViaPopup",s,o)})}).then(function(e){return s&&be(s),e?J(e):null}).s(function(e){throw s&&be(s),e}),Yl(this,r)},na.Ic=function(e){if(!se())return A(new Pe("operation-not-supported-in-this-environment"));var t=this,n=Pl(this).then(function(){return Cl(t.h)}).then(function(){return t.a.Ca("signInViaRedirect",e)});return Yl(this,n)},na.fa=function(){if(!se())return A(new Pe("operation-not-supported-in-this-environment"));var e=this,t=Pl(this).then(function(){return e.a.fa()}).then(function(e){return e?J(e):null});return Yl(this,t)},na.Oc=function(e){if(!e)return A(new Pe("null-user"));var t=this,n={};n.apiKey=Xl(this).options.apiKey,n.authDomain=Xl(this).options.authDomain,n.appName=Xl(this).name;var r=wl(e,n,t.w,t.xa());return Yl(this,this.i.then(function(){if(Xl(t).options.apiKey!=e.l)return r.reload()}).then(function(){return S(t)&&e.uid==S(t).uid?(gl(S(t),e),t.Z(e)):(Ul(t,r),Nd(r),t.Z(r))}).then(function(){Zl(t)}))},na.kb=function(){var e=this,t=this.i.then(function(){return S(e)?(Ul(e,null),Hl(e.h).then(function(){Zl(e)})):At()});return Yl(this,t)},na.Jc=function(){var e=this;return Il(this.h,Xl(this).options.authDomain).then(function(t){if(!e.l){var n;if(n=S(e)&&t){n=S(e).uid;var r=t.uid;n=void 0===n||null===n||""===n||void 0===r||null===r||""===r?!1:n==r}if(n)return gl(S(e),t),S(e).F();(S(e)||t)&&(Ul(e,t),t&&(Nd(t),t.ba=e.w),e.a&&e.a.subscribe(e),Zl(e))}})},na.Z=function(e){return Gl(this.h,e)},na.Yb=function(){Zl(this),this.Z(S(this))},na.gc=function(){this.kb()},na.hc=function(){this.kb()},na.ic=function(e){var t=this;this.addAuthTokenListener(function(){e.next(S(t))})},na.jc=function(e){var t=this;Vl(this,function(){e.next(S(t))})},na.sc=function(e,t,n){var r=this;return this.X&&sp.Promise.resolve().then(function(){m(e)?e(S(r)):m(e.next)&&e.next(S(r))}),this.Pb(e,t,n)},na.rc=function(e,t,n){var r=this;return this.X&&sp.Promise.resolve().then(function(){r.O=r.getUid(),m(e)?e(S(r)):m(e.next)&&e.next(S(r))}),this.Qb(e,t,n)},na.$b=function(e){var t=this,n=this.i.then(function(){return S(t)?S(t).F(e).then(function(e){return{accessToken:e}}):null});return Yl(this,n)},na.Jb=function(e){var t=this;return this.i.then(function(){return Nl(t,qa(t.b,li,{token:e}))}).then(function(e){var n=e.user;return fl(n,"isAnonymous",!1),t.Z(n),e})},na.Bc=function(e){return Ge("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCustomToken is deprecated. Please use firebase.auth.Auth.prototype.signInWithCustomToken instead."),this.Jb(e)},na.Cc=function(e,t){return Ge("firebase.auth.Auth.prototype.signInAndRetrieveDataWithEmailAndPassword is deprecated. Please use firebase.auth.Auth.prototype.signInWithEmailAndPassword instead."),this.Kb(e,t)},na.Kb=function(e,t){var n=this;return this.i.then(function(){return Nl(n,qa(n.b,vi,{email:e,password:t}))})},na.ub=function(e,t){var n=this;return this.i.then(function(){return Nl(n,qa(n.b,pi,{email:e,password:t}))})},na.Sb=function(e,t){return Ge("firebase.auth.Auth.prototype.createUserAndRetrieveDataWithEmailAndPassword is deprecated. Please use firebase.auth.Auth.prototype.createUserWithEmailAndPassword instead."),this.ub(e,t)},na.Ec=function(e){return Ge("firebase.auth.Auth.prototype.signInWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential instead."),this.Oa(e).then(function(e){return e.user})},na.Oa=function(e){var t=this;return this.i.then(function(){return Nl(t,e.ya(t.b))})},na.Pa=function(){var e=this;return this.i.then(function(){var t=S(e);if(t&&t.isAnonymous){var n=J({providerId:null,isNewUser:!1});return J({user:t,credential:null,additionalUserInfo:n,operationType:"signIn"})}return Nl(e,e.b.Pa()).then(function(t){var n=t.user;return fl(n,"isAnonymous",!0),e.Z(n),t})})},na.Dc=function(){return Ge("firebase.auth.Auth.prototype.signInAnonymouslyAndRetrieveData is deprecated. Please use firebase.auth.Auth.prototype.signInAnonymously instead."),this.Pa()},na.getUid=function(){return S(this)&&S(this).uid||null},na.Rb=function(e){this.addAuthTokenListener(e),this.u++,0<this.u&&S(this)&&kd(S(this))},na.zc=function(e){var t=this;za(this.o,function(n){n==e&&t.u--}),0>this.u&&(this.u=0),0==this.u&&S(this)&&Sd(S(this)),this.removeAuthTokenListener(e)},na.addAuthTokenListener=function(e){var t=this;this.o.push(e),Yl(this,this.i.then(function(){t.l||dt(t.o,e)&&e(U(t))}))},na.removeAuthTokenListener=function(e){ct(this.o,function(t){return t==e})},na.delete=function(){this.l=!0;for(var e=0;e<this.N.length;e++)this.N[e].cancel("app-deleted");return this.N=[],this.h&&(e=this.h,e.b.removeListener(Bl("local"),e.a,this.ka)),this.a&&this.a.unsubscribe(this),sp.Promise.resolve()},na.Vb=function(e){return Ge("firebase.auth.Auth.prototype.fetchProvidersForEmail is deprecated. Please use firebase.auth.Auth.prototype.fetchSignInMethodsForEmail instead."),Yl(this,ga(this.b,e))},na.Wb=function(e){return Yl(this,fa(this.b,e))},na.kc=function(e){return!!$r(e)},na.ib=function(e,t){var n=this;return Yl(this,At().then(function(){var e=new $e(t);if(!e.c)throw new Pe("argument-error",Yp+" must be true when sending sign in link to email");return vr(e)}).then(function(t){return n.b.ib(e,t)}).then(function(){}))},na.Rc=function(e){return this.Ja(e).then(function(e){return e.data.email})},na.Xa=function(e,t){return Yl(this,this.b.Xa(e,t).then(function(){}))},na.Ja=function(e){return Yl(this,this.b.Ja(e).then(function(e){return new Oe(e)}))},na.Va=function(e){return Yl(this,this.b.Va(e).then(function(){}))},na.hb=function(e,t){var n=this;return Yl(this,At().then(function(){return"undefined"==typeof t||bt(t)?{}:vr(new $e(t))}).then(function(t){return n.b.hb(e,t)}).then(function(){}))},na.Gc=function(e,t){return Yl(this,Js(this,e,t,j(this.Oa,this)))},na.Fc=function(e,t){var n=this;return Yl(this,At().then(function(){var r=N(e,t||hr());return n.Oa(r)}))},T.prototype.render=function(){},T.prototype.reset=function(){},T.prototype.getResponse=function(){},T.prototype.execute=function(){};var Fl=null;$l.prototype.render=function(e,t){return this.a[this.b.toString()]=new Pd(e,t),this.b++},$l.prototype.reset=function(e){var t=Dd(this,e);e=Rd(e),t&&e&&(t.delete(),delete this.a[e])},$l.prototype.getResponse=function(e){return(e=Dd(this,e))?e.getResponse():null},$l.prototype.execute=function(e){(e=Dd(this,e))&&e.execute()},Pd.prototype.getResponse=function(){return Bd(this),this.b},Pd.prototype.execute=function(){Bd(this);var e=this;this.a||(this.a=setTimeout(function(){e.b=oe();var t=e.c.callback,n=e.c["expired-callback"];if(t)try{t(e.b)}catch(e){}e.a=setTimeout(function(){if(e.a=null,e.b=null,n)try{n()}catch(e){}e.h&&e.execute()},6E4)},500))},Pd.prototype.delete=function(){Bd(this),this.g=!0,clearTimeout(this.a),this.a=null,an(this.f,"click",this.i)},Fd.prototype.g=function(){return Fl||(Fl=new $l),At(Fl)},Fd.prototype.c=function(){};var uu=null,hu=Hn("https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),mu=new Be(3E4,6E4);zd.prototype.g=function(t){var n=this;return new _t(function(r,o){var i=setTimeout(function(){o(new Pe("network-request-failed"))},mu.get());if(!dp.grecaptcha||t!==n.f&&!n.b){dp[n.a]=function(){if(dp.grecaptcha){n.f=t;var e=dp.grecaptcha.render;dp.grecaptcha.render=function(t,r){return t=e(t,r),n.b++,t},clearTimeout(i),r(dp.grecaptcha)}else clearTimeout(i),o(new Pe("internal-error"));delete dp[n.a]};var e=Xn(hu,{onload:n.a,hl:t||""});At(Yo(e)).s(function(){clearTimeout(i),o(new Pe("internal-error","Unable to load external reCAPTCHA dependencies!"))})}else clearTimeout(i),r(dp.grecaptcha)})},zd.prototype.c=function(){this.b--};var gu=null,fu="callback",yu="expired-callback",bu="sitekey",xu="size";na=jd.prototype,na.za=function(){var e=this;return this.f?this.f:this.f=Wd(this,At().then(function(){if(ue()&&!le())return fe();throw new Pe("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")}).then(function(){return e.o.g(e.v())}).then(function(t){return e.g=t,qa(e.u,zc,{})}).then(function(t){e.a[bu]=t.recaptchaSiteKey}).s(function(t){throw e.f=null,t}))},na.render=function(){Hd(this);var e=this;return Wd(this,this.za().then(function(){if(null===e.c){var t=e.l;if(!e.i){var n=rr(t);t=ar("DIV"),n.appendChild(t)}e.c=e.g.render(t,e.a)}return e.c}))},na.verify=function(){Hd(this);var t=this;return Wd(this,this.render().then(function(n){return new _t(function(r){var o=t.g.getResponse(n);if(o)r(o);else{var i=function n(e){e&&(Vd(t,n),r(e))};t.m.push(i),t.i&&t.g.execute(t.c)}})}))},na.reset=function(){Hd(this),null!==this.c&&this.g.reset(this.c)},na.clear=function(){Hd(this),this.C=!0,this.o.c();for(var e=0;e<this.h.length;e++)this.h[e].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.i){e=rr(this.l);for(var t;t=e.firstChild;)e.removeChild(t)}},$(Kd,jd);var vu=["First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth"];X(Dl.prototype,{Va:{name:"applyActionCode",j:[Qd("code")]},Ja:{name:"checkActionCode",j:[Qd("code")]},Xa:{name:"confirmPasswordReset",j:[Qd("code"),Qd("newPassword")]},ub:{name:"createUserWithEmailAndPassword",j:[Qd("email"),Qd("password")]},Sb:{name:"createUserAndRetrieveDataWithEmailAndPassword",j:[Qd("email"),Qd("password")]},Vb:{name:"fetchProvidersForEmail",j:[Qd("email")]},Wb:{name:"fetchSignInMethodsForEmail",j:[Qd("email")]},fa:{name:"getRedirectResult",j:[]},kc:{name:"isSignInWithEmailLink",j:[Qd("emailLink")]},rc:{name:"onAuthStateChanged",j:[op(Yd(),W(),"nextOrObserver"),W("opt_error",!0),W("opt_completed",!0)]},sc:{name:"onIdTokenChanged",j:[op(Yd(),W(),"nextOrObserver"),W("opt_error",!0),W("opt_completed",!0)]},hb:{name:"sendPasswordResetEmail",j:[Qd("email"),op(Yd("opt_actionCodeSettings",!0),Jd(null,!0),"opt_actionCodeSettings",!0)]},ib:{name:"sendSignInLinkToEmail",j:[Qd("email"),Yd("actionCodeSettings")]},jb:{name:"setPersistence",j:[Qd("persistence")]},Oa:{name:"signInAndRetrieveDataWithCredential",j:[tp()]},Pa:{name:"signInAnonymously",j:[]},Dc:{name:"signInAnonymouslyAndRetrieveData",j:[]},Ec:{name:"signInWithCredential",j:[tp()]},Jb:{name:"signInWithCustomToken",j:[Qd("token")]},Bc:{name:"signInAndRetrieveDataWithCustomToken",j:[Qd("token")]},Kb:{name:"signInWithEmailAndPassword",j:[Qd("email"),Qd("password")]},Fc:{name:"signInWithEmailLink",j:[Qd("email"),Qd("emailLink",!0)]},Cc:{name:"signInAndRetrieveDataWithEmailAndPassword",j:[Qd("email"),Qd("password")]},Gc:{name:"signInWithPhoneNumber",j:[Qd("phoneNumber"),rp()]},Hc:{name:"signInWithPopup",j:[np()]},Ic:{name:"signInWithRedirect",j:[np()]},Oc:{name:"updateCurrentUser",j:[op(function(e){return{name:"user",K:"an instance of Firebase User",optional:!!e,M:function(e){return!!(e&&e instanceof md)}}}(),Jd(),"user")]},kb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[Qd(null,!0)]},Qc:{name:"useDeviceLanguage",j:[]},Rc:{name:"verifyPasswordResetCode",j:[Qd("code")]}}),Y(Dl.prototype,{lc:{name:"languageCode",qb:op(Qd(),Jd(),"languageCode")}}),Dl.Persistence=Yc,Dl.Persistence.LOCAL="local",Dl.Persistence.SESSION="session",Dl.Persistence.NONE="none",X(md.prototype,{delete:{name:"delete",j:[]},ac:{name:"getIdTokenResult",j:[V("opt_forceRefresh",!0)]},F:{name:"getIdToken",j:[V("opt_forceRefresh",!0)]},ab:{name:"linkAndRetrieveDataWithCredential",j:[tp()]},mc:{name:"linkWithCredential",j:[tp()]},nc:{name:"linkWithPhoneNumber",j:[Qd("phoneNumber"),rp()]},oc:{name:"linkWithPopup",j:[np()]},pc:{name:"linkWithRedirect",j:[np()]},cb:{name:"reauthenticateAndRetrieveDataWithCredential",j:[tp()]},vc:{name:"reauthenticateWithCredential",j:[tp()]},wc:{name:"reauthenticateWithPhoneNumber",j:[Qd("phoneNumber"),rp()]},xc:{name:"reauthenticateWithPopup",j:[np()]},yc:{name:"reauthenticateWithRedirect",j:[np()]},reload:{name:"reload",j:[]},gb:{name:"sendEmailVerification",j:[op(Yd("opt_actionCodeSettings",!0),Jd(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[Qd(null,!0)]},Nc:{name:"unlink",j:[Qd("provider")]},mb:{name:"updateEmail",j:[Qd("email")]},nb:{name:"updatePassword",j:[Qd("password")]},Pc:{name:"updatePhoneNumber",j:[tp("phone")]},ob:{name:"updateProfile",j:[Yd("profile")]}}),X($l.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),X(T.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),X(_t.prototype,{ia:{name:"finally"},s:{name:"catch"},then:{name:"then"}}),Y(Qs.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",qb:V("appVerificationDisabledForTesting")}}),X(Ys.prototype,{confirm:{name:"confirm",j:[Qd("verificationCode")]}}),ap(Jr,"credential",function(e,t){return new Yr(e,t)},[Qd("email"),Qd("password")]),X(M.prototype,{ta:{name:"addScope",j:[Qd("scope")]},Da:{name:"setCustomParameters",j:[Yd("customOAuthParameters")]}}),ap(M,"credential",Vr,[op(Qd(),Yd(),"token")]),ap(Jr,"credentialWithLink",N,[Qd("email"),Qd("emailLink")]),X(Wr.prototype,{ta:{name:"addScope",j:[Qd("scope")]},Da:{name:"setCustomParameters",j:[Yd("customOAuthParameters")]}}),ap(Wr,"credential",Hr,[op(Qd(),Yd(),"token")]),X(Kr.prototype,{ta:{name:"addScope",j:[Qd("scope")]},Da:{name:"setCustomParameters",j:[Yd("customOAuthParameters")]}}),ap(Kr,"credential",Gr,[op(Qd(),op(Yd(),Jd()),"idToken"),op(Qd(),Jd(),"accessToken",!0)]),X(Xr.prototype,{Da:{name:"setCustomParameters",j:[Yd("customOAuthParameters")]}}),ap(Xr,"credential",Qr,[op(Qd(),Yd(),"token"),Qd("secret",!0)]),X(qr.prototype,{ta:{name:"addScope",j:[Qd("scope")]},credential:{name:"credential",j:[op(Qd(),Jd(),"idToken",!0),op(Qd(),Jd(),"accessToken",!0)]},Da:{name:"setCustomParameters",j:[Yd("customOAuthParameters")]}}),ap(to,"credential",no,[Qd("verificationId"),Qd("verificationCode")]),X(to.prototype,{Ta:{name:"verifyPhoneNumber",j:[Qd("phoneNumber"),rp()]}}),X(Pe.prototype,{toJSON:{name:"toJSON",j:[Qd(null,!0)]}}),X(po.prototype,{toJSON:{name:"toJSON",j:[Qd(null,!0)]}}),X(lo.prototype,{toJSON:{name:"toJSON",j:[Qd(null,!0)]}}),X(Kd.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),function(){if("undefined"!=typeof sp&&sp.INTERNAL&&sp.INTERNAL.registerService){var e={Auth:Dl,Error:Pe};ap(e,"EmailAuthProvider",Jr,[]),ap(e,"FacebookAuthProvider",M,[]),ap(e,"GithubAuthProvider",Wr,[]),ap(e,"GoogleAuthProvider",Kr,[]),ap(e,"TwitterAuthProvider",Xr,[]),ap(e,"OAuthProvider",qr,[Qd("providerId")]),ap(e,"PhoneAuthProvider",to,[Zd()]),ap(e,"RecaptchaVerifier",Kd,[op(Qd(),$d(),"recaptchaContainer"),Yd("recaptchaParameters",!0),ep()]),sp.INTERNAL.registerService("auth",function(e,t){return e=new Dl(e),t({INTERNAL:{getUid:j(e.getUid,e),getToken:j(e.$b,e),addAuthTokenListener:j(e.Rb,e),removeAuthTokenListener:j(e.zc,e)}}),e},e,function(e,t){if("create"===e)try{t.auth()}catch(e){}}),sp.INTERNAL.extendNamespace({User:md})}else throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.")}()}).call("undefined"==typeof e?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:e)}).call(t,o("h6ac"))},S9RN:function(e,t,n){"use strict";function r(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}var o=n("dvMn"),i=n("ZKdc");o.inherits(r,i),r.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},e.exports=r},SUmx:function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("ggoL"))})(function(e){var t={link:1,visited:1,active:1,hover:1,focus:1,"first-letter":1,"first-line":1,"first-child":1,before:1,after:1,lang:1};e.registerHelper("hint","css",function(n){function r(e){for(var t in e)p&&0!=t.lastIndexOf(p,0)||u.push(t)}var o=n.getCursor(),i=n.getTokenAt(o),s=e.innerMode(n.getMode(),i.state);if("css"==s.mode.name){if("keyword"==i.type&&0=="!important".indexOf(i.string))return{list:["!important"],from:e.Pos(o.line,i.start),to:e.Pos(o.line,i.end)};var l=i.start,d=o.ch,p=i.string.slice(0,d-l);/[^\w$_-]/.test(p)&&(p="",l=d=o.ch);var c=e.resolveMode("text/css"),u=[],h=s.state.state;if("pseudo"==h||"variable-3"==i.type?r(t):"block"==h||"maybeprop"==h?r(c.propertyKeywords):"prop"==h||"parens"==h||"at"==h||"params"==h?(r(c.valueKeywords),r(c.colorKeywords)):("media"==h||"media_parens"==h)&&(r(c.mediaTypes),r(c.mediaFeatures)),u.length)return{list:u,from:e.Pos(o.line,l),to:e.Pos(o.line,d)}}})})},"Sm7/":function(e,t,n){"use strict";function r(){p.call(this,"utf-8 decode"),this.leftOver=null}function o(){p.call(this,"utf-8 encode")}for(var s=n("dvMn"),l=n("untT"),d=n("c5OX"),p=n("ZKdc"),u=Array(256),c=0;256>c;c++)u[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;u[254]=u[254]=1;var i=function(e){var t=e.length,n=0,r,o,s,d,p;for(d=0;d<t;d++)o=e.charCodeAt(d),55296==(64512&o)&&d+1<t&&(s=e.charCodeAt(d+1),56320==(64512&s)&&(o=65536+(o-55296<<10)+(s-56320),d++)),n+=128>o?1:2048>o?2:65536>o?3:4;for(r=l.uint8array?new Uint8Array(n):Array(n),p=0,d=0;p<n;d++)o=e.charCodeAt(d),55296==(64512&o)&&d+1<t&&(s=e.charCodeAt(d+1),56320==(64512&s)&&(o=65536+(o-55296<<10)+(s-56320),d++)),128>o?r[p++]=o:2048>o?(r[p++]=192|o>>>6,r[p++]=128|63&o):65536>o?(r[p++]=224|o>>>12,r[p++]=128|63&o>>>6,r[p++]=128|63&o):(r[p++]=240|o>>>18,r[p++]=128|63&o>>>12,r[p++]=128|63&o>>>6,r[p++]=128|63&o);return r},h=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return 0>n?t:0===n?t:n+u[e[n]]>t?n:t},m=function(e){var t=e.length,n=Array(2*t),r,o,i,l;for(o=0,r=0;r<t;){if(i=e[r++],128>i){n[o++]=i;continue}if(l=u[i],4<l){n[o++]=65533,r+=l-1;continue}for(i&=2===l?31:3===l?15:7;1<l&&r<t;)i=i<<6|63&e[r++],l--;if(1<l){n[o++]=65533;continue}65536>i?n[o++]=i:(i-=65536,n[o++]=55296|1023&i>>10,n[o++]=56320|1023&i)}return n.length!==o&&(n.subarray?n=n.subarray(0,o):n.length=o),s.applyFromCharCode(n)};t.utf8encode=function(e){return l.nodebuffer?d.newBufferFrom(e,"utf-8"):i(e)},t.utf8decode=function(e){return l.nodebuffer?s.transformTo("nodebuffer",e).toString("utf-8"):(e=s.transformTo(l.uint8array?"uint8array":"array",e),m(e))},s.inherits(r,p),r.prototype.processChunk=function(e){var n=s.transformTo(l.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(l.uint8array){var r=n;n=new Uint8Array(r.length+this.leftOver.length),n.set(this.leftOver,0),n.set(r,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var o=h(n),i=n;o!==n.length&&(l.uint8array?(i=n.subarray(0,o),this.leftOver=n.subarray(o,n.length)):(i=n.slice(0,o),this.leftOver=n.slice(o,n.length))),this.push({data:t.utf8decode(i),meta:e.meta})},r.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=r,s.inherits(o,p),o.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=o},TCoK:function(e,t,n){"use strict";function r(e){o.call(this,e);for(var t=0;t<this.data.length;t++)e[t]&=255}var o=n("ML/b"),i=n("dvMn");i.inherits(r,o),r.prototype.byteAt=function(e){return this.data[this.zero+e]},r.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),o=e.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===t&&this.data[s+1]===n&&this.data[s+2]===r&&this.data[s+3]===o)return s-this.zero;return-1},r.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),o=e.charCodeAt(3),i=this.readData(4);return t===i[0]&&n===i[1]&&r===i[2]&&o===i[3]},r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},TUpU:function(e,t){"use strict";t.__esModule=!0;var n=[],r;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(r||(t.LogLevel=r={}));var o=r.INFO,i=function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(!(t<e.logLevel)){var i=new Date().toISOString();switch(t){case r.DEBUG:console.log.apply(console,["["+i+"] "+e.name+":"].concat(n));break;case r.VERBOSE:console.log.apply(console,["["+i+"] "+e.name+":"].concat(n));break;case r.INFO:console.info.apply(console,["["+i+"] "+e.name+":"].concat(n));break;case r.WARN:console.warn.apply(console,["["+i+"] "+e.name+":"].concat(n));break;case r.ERROR:console.error.apply(console,["["+i+"] "+e.name+":"].concat(n));break;default:throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");}}},s=function(){function e(e){this.name=e,this._logLevel=o,this._logHandler=i,n.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in r))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!0,configurable:!0}),e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,r.DEBUG].concat(e))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,r.VERBOSE].concat(e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,r.INFO].concat(e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,r.WARN].concat(e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,r.ERROR].concat(e))},e}();t.setLogLevel=function(e){n.forEach(function(t){t.logLevel=e})},t.Logger=s,t.LogLevel=r},VS7n:function(e,t,n){"use strict";e.exports=window.fetch||(window.fetch=n("QAmr").default||n("QAmr"))},WSyY:function(e,t,n){"use strict";(function(t){function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){_(t,e)}}function o(e){return M.from(e)}function i(e){return M.isBuffer(e)||e instanceof D}function s(){}function l(e,t){I=I||n("Hba+"),e=e||{};var o=t instanceof I;this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,s=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:o&&(s||0===s)?s:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){y(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function d(e){return I=I||n("Hba+"),P.call(d,this)||this instanceof I?void(this._writableState=new l(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),O.call(this)):new d(e)}function p(e,t){var n=new Error("write after end");e.emit("error",n),E.nextTick(t,n)}function c(e,t,n,r){var o=!0,i=!1;return null===n?i=new TypeError("May not write null values to stream"):"string"!=typeof n&&void 0!==n&&!t.objectMode&&(i=new TypeError("Invalid non-string/buffer chunk")),i&&(e.emit("error",i),E.nextTick(r,i),o=!1),o}function u(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=M.from(t,n)),t}function h(e,t,n,r,o,i){if(!n){var s=u(t,r,o);r!==s&&(n=!0,o="buffer",r=s)}var l=t.objectMode?1:r.length;t.length+=l;var d=t.length<t.highWaterMark;if(d||(t.needDrain=!0),t.writing||t.corked){var p=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:i,next:null},p?p.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else m(e,t,!1,l,r,o,i);return d}function m(e,t,n,r,o,i,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function g(e,t,n,r,o){--t.pendingcb,n?(E.nextTick(o,r),E.nextTick(C,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),C(e,t))}function f(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function y(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(f(n),t)g(e,n,r,t,o);else{var i=k(n);i||n.corked||n.bufferProcessing||!n.bufferedRequest||v(e,n),r?A(b,e,n,i,o):b(e,n,i,o)}}function b(e,t,n,r){n||x(e,t),t.pendingcb--,r(),C(e,t)}function x(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function v(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var o=t.bufferedRequestCount,i=Array(o),s=t.corkedRequestsFree;s.entry=n;for(var l=0,d=!0;n;)i[l]=n,n.isBuf||(d=!1),n=n.next,l+=1;i.allBuffers=d,m(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var p=n.chunk,c=n.encoding,u=n.callback,h=t.objectMode?1:p.length;if(m(e,t,!1,h,p,c,u),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),C(e,t)})}function w(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,E.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function C(e,t){var n=k(t);return n&&(w(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function T(e,t,n){t.ending=!0,C(e,t),n&&(t.finished?E.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function _(e,t,n){var r=e.entry;for(e.entry=null;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}var E=n("Yj0v");e.exports=d;var A=!process.browser&&-1<["v0.10","v0.9."].indexOf(process.version.slice(0,5))?setImmediate:E.nextTick,I;d.WritableState=l;var N=n("Q14w");N.inherits=n("4Bm0");var L={deprecate:n("yM1o")},O=n("1ExO"),M=n("38Wu").Buffer,D=t.Uint8Array||function(){},R=n("GRUB");N.inherits(d,O),l.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(l.prototype,"buffer",{get:L.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}();var P;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(P=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(e){return!!P.call(this,e)||this===d&&e&&e._writableState instanceof l}})):P=function(e){return e instanceof this},d.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},d.prototype.write=function(e,t,n){var r=this._writableState,l=!1,d=!r.objectMode&&i(e);return d&&!M.isBuffer(e)&&(e=o(e)),"function"==typeof t&&(n=t,t=null),d?t="buffer":!t&&(t=r.defaultEncoding),"function"!=typeof n&&(n=s),r.ended?p(this,n):(d||c(this,r,e,n))&&(r.pendingcb++,l=h(this,r,d,e,t,n)),l},d.prototype.cork=function(){var e=this._writableState;e.corked++},d.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest&&v(this,e))},d.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),d.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},d.prototype._writev=null,d.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||T(this,r,n)},Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),d.prototype.destroy=R.destroy,d.prototype._undestroy=R.undestroy,d.prototype._destroy=function(e,t){this.end(),t(e)}}).call(t,n("h6ac"))},X4kj:function(e){"use strict";var t=function(){for(var e=[],t=0,n;256>t;t++){n=t;for(var r=0;8>r;r++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}();e.exports=function(e,n,r,o){e^=-1;for(var s=o;s<o+r;s++)e=e>>>8^t[255&(e^n[s])];return-1^e}},X7my:function(e,t,n){"use strict";var r=Math.min;(function(e){e(n("tQq4"))})(function(e){function t(e){var t=e.search(l);return-1==t?0:t}function n(e,t,n){return /\bstring\b/.test(e.getTokenTypeAt(d(t.line,0)))&&!/^[\'\"\`]/.test(n)}function o(e,t){var n=e.getMode();return!1!==n.useInnerComments&&n.innerMode?e.getModeAt(t):n}var s={},l=/[^\s\u00a0]/,d=e.Pos;e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=s);for(var t=this,n=Infinity,r=this.listSelections(),o=null,l=r.length-1;0<=l;l--){var i=r[l].from(),p=r[l].to();i.line>=n||(p.line>=n&&(p=d(n,0)),n=i.line,null==o?t.uncomment(i,p,e)?o="un":(t.lineComment(i,p,e),o="line"):"un"==o?t.uncomment(i,p,e):t.lineComment(i,p,e))}}),e.defineExtension("lineComment",function(e,i,p){p||(p=s);var c=this,u=o(c,e),h=c.getLine(e.line);if(!(null==h||n(c,e,h))){var m=p.lineComment||u.lineComment;if(!m)return void((p.blockCommentStart||u.blockCommentStart)&&(p.fullLines=!0,c.blockComment(e,i,p)));var g=r(0!=i.ch||i.line==e.line?i.line+1:i.line,c.lastLine()+1),f=null==p.padding?" ":p.padding,y=p.commentBlankLines||e.line==i.line;c.operation(function(){if(p.indent){for(var n=null,r=e.line;r<g;++r){var o=c.getLine(r),i=o.slice(0,t(o));(null==n||n.length>i.length)&&(n=i)}for(var r=e.line;r<g;++r){var o=c.getLine(r),s=n.length;!y&&!l.test(o)||(o.slice(0,s)!=n&&(s=t(o)),c.replaceRange(n+m+f,d(r,0),d(r,s)))}}else for(var r=e.line;r<g;++r)(y||l.test(c.getLine(r)))&&c.replaceRange(m+f,d(r,0))})}}),e.defineExtension("blockComment",function(e,t,n){n||(n=s);var p=this,c=o(p,e),u=n.blockCommentStart||c.blockCommentStart,h=n.blockCommentEnd||c.blockCommentEnd;if(!u||!h)return void((n.lineComment||c.lineComment)&&!1!=n.fullLines&&p.lineComment(e,t,n));if(!/\bcomment\b/.test(p.getTokenTypeAt(d(e.line,0)))){var m=r(t.line,p.lastLine());m!=e.line&&0==t.ch&&l.test(p.getLine(m))&&--m;var g=null==n.padding?" ":n.padding;e.line>m||p.operation(function(){if(!1!=n.fullLines){var r=l.test(p.getLine(m));p.replaceRange(g+h,d(m)),p.replaceRange(u+g,d(e.line,0));var o=n.blockCommentLead||c.blockCommentLead;if(null!=o)for(var s=e.line+1;s<=m;++s)(s!=m||r)&&p.replaceRange(o+g,d(s,0))}else p.replaceRange(h,t),p.replaceRange(u,e)})}}),e.defineExtension("uncomment",function(e,t,n){n||(n=s);var p=this,c=o(p,e),u=r(0!=t.ch||t.line==e.line?t.line:t.line-1,p.lastLine()),h=r(e.line,u),m=n.lineComment||c.lineComment,g=[],f=null==n.padding?" ":n.padding,y;lineComment:{if(!m)break lineComment;for(var b=h;b<=u;++b){var i=p.getLine(b),x=i.indexOf(m);if(-1<x&&!/comment/.test(p.getTokenTypeAt(d(b,x+1)))&&(x=-1),-1==x&&l.test(i))break lineComment;if(-1<x&&l.test(i.slice(0,x)))break lineComment;g.push(i)}if(p.operation(function(){for(var e=h;e<=u;++e){var t=g[e-h],n=t.indexOf(m),r=n+m.length;0>n||(t.slice(r,r+f.length)==f&&(r+=f.length),y=!0,p.replaceRange("",d(e,n),d(e,r)))}}),y)return!0}var v=n.blockCommentStart||c.blockCommentStart,k=n.blockCommentEnd||c.blockCommentEnd;if(!v||!k)return!1;var S=n.blockCommentLead||c.blockCommentLead,w=p.getLine(h),C=w.indexOf(v);if(-1==C)return!1;var T=u==h?w:p.getLine(u),_=T.indexOf(k,u==h?C+v.length:0),E=d(h,C+1),A=d(u,_+1);if(-1==_||!/comment/.test(p.getTokenTypeAt(E))||!/comment/.test(p.getTokenTypeAt(A))||-1<p.getRange(E,A,"\n").indexOf(k))return!1;var I=w.lastIndexOf(v,e.ch),N=-1==I?-1:w.slice(0,e.ch).indexOf(k,I+v.length);if(-1!=I&&-1!=N&&N+k.length!=e.ch)return!1;N=T.indexOf(k,t.ch);var L=T.slice(t.ch).lastIndexOf(v,N-t.ch);return(I=-1==N||-1==L?-1:t.ch+L,-1==N||-1==I||I==t.ch)&&(p.operation(function(){p.replaceRange("",d(u,_-(f&&T.slice(_-f.length,_)==f?f.length:0)),d(u,_+k.length));var e=C+v.length;if(f&&w.slice(e,e+f.length)==f&&(e+=f.length),p.replaceRange("",d(h,C),d(h,e)),S)for(var t=h+1;t<=u;++t){var n=p.getLine(t),r=n.indexOf(S);if(!(-1==r||l.test(n.slice(0,r)))){var o=r+S.length;f&&n.slice(o,o+f.length)==f&&(o+=f.length),p.replaceRange("",d(t,r),d(t,o))}}}),!0)})})},Xc2M:function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("29F7"),n("uQIK"))})(function(e){function t(t,n,r){if(0>r&&0==n.ch)return t.clipPos(m(n.line-1));var o=t.getLine(n.line);if(0<r&&n.ch>=o.length)return t.clipPos(m(n.line+1,0));for(var s="start",l=n.ch,d=0>r?0:o.length,p=0,i;l!=d;l+=r,p++){var c=o.charAt(0>r?l-1:l),u="_"!=c&&e.isWordChar(c)?"w":"o";if("w"==u&&c.toUpperCase()==c&&(u="W"),"start"==s)"o"!=u&&(s="in",i=u);else if("in"==s&&i!=u){if("w"==i&&"W"==u&&0>r&&l--,"W"==i&&"w"==u&&0<r){i="w";continue}break}}return m(n.line,l)}function n(e,n){e.extendSelectionsBy(function(r){return e.display.shift||e.doc.extend||r.empty()?t(e.doc,r.head,n):0>n?r.from():r.to()})}function r(t,n){return t.isReadOnly()?e.Pass:void(t.operation(function(){for(var e=t.listSelections().length,r=[],o=-1,s=0,i;s<e;s++)if(i=t.listSelections()[s].head,!(i.line<=o)){var l=m(i.line+(n?0:1),0);t.replaceRange("\n",l,null,"+insertLine"),t.indentLine(l.line,null,!0),r.push({head:l,anchor:l}),o=i.line+1}t.setSelections(r)}),t.execCommand("indentAuto"))}function o(t,n){for(var r=n.ch,o=r,i=t.getLine(n.line);r&&e.isWordChar(i.charAt(r-1));)--r;for(;o<i.length&&e.isWordChar(i.charAt(o));)++o;return{from:m(n.line,r),to:m(n.line,o),word:i.slice(r,o)}}function i(e,t){for(var n=e.listSelections(),r=[],o=0;o<n.length;o++){var i=n[o],s=e.findPosV(i.anchor,t,"line",i.anchor.goalColumn),l=e.findPosV(i.head,t,"line",i.head.goalColumn);s.goalColumn=null==i.anchor.goalColumn?e.cursorCoords(i.anchor,"div").left:i.anchor.goalColumn,l.goalColumn=null==i.head.goalColumn?e.cursorCoords(i.head,"div").left:i.head.goalColumn;r.push(i),r.push({anchor:s,head:l})}e.setSelections(r)}function s(e,t,n){for(var r=0;r<e.length;r++)if(e[r].from()==t&&e[r].to()==n)return!0;return!1}function l(t){for(var n=t.listSelections(),r=[],o=0;o<n.length;o++){var i=n[o],s=i.head,l=t.scanForBracket(s,-1);if(!l)return!1;for(;;){var d=t.scanForBracket(s,1);if(!d)return!1;if(d.ch==g.charAt(g.indexOf(l.ch)+1)){var p=m(l.pos.line,l.pos.ch+1);if(0!=e.cmpPos(p,i.from())||0!=e.cmpPos(d.pos,i.to())){r.push({anchor:p,head:d.pos});break}else if(l=t.scanForBracket(l.pos,-1),!l)return!1}s=m(d.pos.line,d.pos.ch+1)}}return t.setSelections(r),!0}function d(t,n){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),o=[],s=0,l,i;s<r.length;s++)if(i=r[s],!i.empty()){for(var d=i.from().line,p=i.to().line;s<r.length-1&&r[s+1].from().line==p;)p=r[++s].to().line;r[s].to().ch||p--,o.push(d,p)}o.length?l=!0:o.push(t.firstLine(),t.lastLine()),t.operation(function(){for(var e=[],r=0;r<o.length;r+=2){var i=o[r],s=o[r+1],d=m(i,0),p=m(s),c=t.getRange(d,p,!1);n?c.sort():c.sort(function(e,t){var n=e.toUpperCase(),r=t.toUpperCase();return n!=r&&(e=n,t=r),e<t?-1:e==t?0:1}),t.replaceRange(c,d,p),l&&e.push({anchor:d,head:m(s+1,0)})}l&&t.setSelections(e,0)})}function p(t,n){t.operation(function(){for(var r=t.listSelections(),s=[],l=[],d=0,i;d<r.length;d++)i=r[d],i.empty()?(s.push(d),l.push("")):l.push(n(t.getRange(i.from(),i.to())));t.replaceSelections(l,"around","case");for(var d=s.length-1,p,i;0<=d;d--)if(i=r[s[d]],!(p&&0<e.cmpPos(i.head,p))){var c=o(t,i.head);p=c.from,t.replaceRange(n(c.word),c.from,c.to)}})}function c(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var i=o(t,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:t.getRange(n,r),word:i}}function u(e,t){var n=c(e);if(n){var r=n.query,o=e.getSearchCursor(r,t?n.to:n.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(r,t?m(e.firstLine(),0):e.clipPos(m(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):n.word&&e.setSelection(n.from,n.to))}}var h=e.commands,m=e.Pos;h.goSubwordLeft=function(e){n(e,-1)},h.goSubwordRight=function(e){n(e,1)},h.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},h.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},h.splitSelectionByLine=function(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)for(var o=t[r].from(),i=t[r].to(),s=o.line;s<=i.line;++s)i.line>o.line&&s==i.line&&0==i.ch||n.push({anchor:s==o.line?o:m(s,0),head:s==i.line?i:m(s)});e.setSelections(n,0)},h.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},h.selectLine=function(e){for(var t=e.listSelections(),n=[],r=0,o;r<t.length;r++)o=t[r],n.push({anchor:m(o.from().line,0),head:m(o.to().line+1,0)});e.setSelections(n)},h.insertLineAfter=function(e){return r(e,!1)},h.insertLineBefore=function(e){return r(e,!0)},h.selectNextOccurrence=function(t){var n=t.getCursor("from"),r=t.getCursor("to"),i=t.state.sublimeFindFullWord==t.doc.sel;if(0==e.cmpPos(n,r)){var l=o(t,n);if(!l.word)return;t.setSelection(l.from,l.to),i=!0}else{var d=t.getRange(n,r),p=i?new RegExp("\\b"+d+"\\b"):d,c=t.getSearchCursor(p,r),u=c.findNext();if(u||(c=t.getSearchCursor(p,m(t.firstLine(),0)),u=c.findNext()),!u||s(t.listSelections(),c.from(),c.to()))return e.Pass;t.addSelection(c.from(),c.to())}i&&(t.state.sublimeFindFullWord=t.doc.sel)},h.addCursorToPrevLine=function(e){i(e,-1)},h.addCursorToNextLine=function(e){i(e,1)};var g="(){}[]";h.selectScope=function(e){l(e)||e.execCommand("selectAll")},h.selectBetweenBrackets=function(t){if(!l(t))return e.Pass},h.goToBracket=function(t){t.extendSelectionsBy(function(n){var r=t.scanForBracket(n.head,1);if(r&&0!=e.cmpPos(r.pos,n.head))return r.pos;var o=t.scanForBracket(n.head,-1);return o&&m(o.pos.line,o.pos.ch+1)||n.head})},h.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),r=[],o=t.firstLine()-1,s=[],l=0;l<n.length;l++){var i=n[l],d=i.from().line-1,p=i.to().line;s.push({anchor:m(i.anchor.line-1,i.anchor.ch),head:m(i.head.line-1,i.head.ch)}),0!=i.to().ch||i.empty()||--p,d>o?r.push(d,p):r.length&&(r[r.length-1]=p),o=p}t.operation(function(){for(var e=0;e<r.length;e+=2){var n=r[e],o=r[e+1],i=t.getLine(n);t.replaceRange("",m(n,0),m(n+1,0),"+swapLine"),o>t.lastLine()?t.replaceRange("\n"+i,m(t.lastLine()),null,"+swapLine"):t.replaceRange(i+"\n",m(o,0),null,"+swapLine")}t.setSelections(s),t.scrollIntoView()})},h.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),r=[],o=t.lastLine()+1,s=n.length-1;0<=s;s--){var i=n[s],l=i.to().line+1,d=i.from().line;0!=i.to().ch||i.empty()||l--,l<o?r.push(l,d):r.length&&(r[r.length-1]=d),o=d}t.operation(function(){for(var e=r.length-2;0<=e;e-=2){var n=r[e],o=r[e+1],i=t.getLine(n);n==t.lastLine()?t.replaceRange("",m(n-1),m(n),"+swapLine"):t.replaceRange("",m(n,0),m(n+1,0),"+swapLine"),t.replaceRange(i+"\n",m(o,0),null,"+swapLine")}t.scrollIntoView()})},h.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},h.joinLines=function(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){for(var o=t[r],i=o.from(),s=i.line,l=o.to().line;r<t.length-1&&t[r+1].from().line==l;)l=t[++r].to().line;n.push({start:s,end:l,anchor:!o.empty()&&i})}e.operation(function(){for(var t=0,r=[],o=0;o<n.length;o++){for(var i=n[o],s=i.anchor&&m(i.anchor.line-t,i.anchor.ch),l=i.start,d,p;l<=i.end;l++)p=l-t,l==i.end&&(d=m(p,e.getLine(p).length+1)),p<e.lastLine()&&(e.replaceRange(" ",m(p),m(p+1,/^\s*/.exec(e.getLine(p+1))[0].length)),++t);r.push({anchor:s||d,head:d})}e.setSelections(r,0)})},h.duplicateLine=function(e){e.operation(function(){for(var t=e.listSelections().length,n=0,r;n<t;n++)r=e.listSelections()[n],r.empty()?e.replaceRange(e.getLine(r.head.line)+"\n",m(r.head.line,0)):e.replaceRange(e.getRange(r.from(),r.to()),r.from());e.scrollIntoView()})},h.sortLines=function(e){d(e,!0)},h.sortLinesInsensitive=function(e){d(e,!1)},h.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var n=t.shift(),r=n.find();if(r)return t.push(n),e.setSelection(r.from,r.to)}},h.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var n=t[t.length-1].find();if(!n)t.pop();else return e.setSelection(n.from,n.to)}},h.toggleBookmark=function(e){for(var t=e.listSelections(),n=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),r=0;r<t.length;r++){for(var o=t[r].from(),i=t[r].to(),s=t[r].empty()?e.findMarksAt(o):e.findMarks(o,i),l=0;l<s.length;l++)if(s[l].sublimeBookmark){s[l].clear();for(var d=0;d<n.length;d++)n[d]==s[l]&&n.splice(d--,1);break}l==s.length&&n.push(e.markText(o,i,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},h.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();t.length=0},h.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,n=[];if(t)for(var r=0,o;r<t.length;r++)o=t[r].find(),o?n.push({anchor:o.from,head:o.to}):t.splice(r--,0);n.length&&e.setSelections(n,0)},h.smartBackspace=function(t){return t.somethingSelected()?e.Pass:void t.operation(function(){for(var n=t.listSelections(),r=t.getOption("indentUnit"),o=n.length-1;0<=o;o--){var i=n[o].head,s=t.getRange({line:i.line,ch:0},i),l=e.countColumn(s,null,t.getOption("tabSize")),d=t.findPosH(i,-1,"char",!1);if(s&&!/\S/.test(s)&&0==l%r){var p=new m(i.line,e.findColumn(s,l-r,r));p.ch!=i.ch&&(d=p)}t.replaceRange("",d,i,"+delete")}})},h.delLineRight=function(e){e.operation(function(){for(var t=e.listSelections(),n=t.length-1;0<=n;n--)e.replaceRange("",t[n].anchor,m(t[n].to().line),"+delete");e.scrollIntoView()})},h.upcaseAtCursor=function(e){p(e,function(e){return e.toUpperCase()})},h.downcaseAtCursor=function(e){p(e,function(e){return e.toLowerCase()})},h.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},h.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},h.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),o=n;if(0<e.cmpPos(r,o)){var i=o;o=r,r=i}t.state.sublimeKilled=t.getRange(r,o),t.replaceRange("",r,o)}},h.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},h.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},h.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},h.findUnder=function(e){u(e,!0)},h.findUnderPrevious=function(e){u(e,!1)},h.findAllUnder=function(e){var t=c(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],o=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&o++;e.setSelections(r,o)}};var f=e.keyMap;f.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F9:"sortLines","Cmd-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(f.macSublime),f.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Ctrl-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(f.pcSublime);var y=f.default==f.macDefault;f.sublime=y?f.macSublime:f.pcSublime})},XfO6:function(e,t,n){"use strict";var r=n("ZKdc");t.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},t.DEFLATE=n("p7rG")},Yj0v:function(e){"use strict";e.exports=process.version&&0!==process.version.indexOf("v0.")&&(0!==process.version.indexOf("v1.")||0===process.version.indexOf("v1.8."))?process:{nextTick:function(e,t,n,r){if("function"!=typeof e)throw new TypeError("\"callback\" argument must be a function");var o=arguments.length,s,l;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,n)});case 4:return process.nextTick(function(){e.call(null,t,n,r)});default:for(s=Array(o-1),l=0;l<s.length;)s[l++]=arguments[l];return process.nextTick(function(){e.apply(null,s)});}}}},ZKdc:function(e){"use strict";function t(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}t.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(n){t.error(n)}),this},pause:function(){return this.isPaused||this.isFinished?!1:(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},e.exports=t},ZTma:function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){return e===T||e===_}function o(e){var t=e.pos,n=e.prev();if(r(n))for(;!e.sol();)if(e.prev()===n&&e.peek()!==E)return!0;return e.pos=t,!1}function i(e){return s(e)||l(e)}function s(e){var t=e.pos;return o(e)&&e.eat(M)&&d(e)||(e.pos=t,!1)}function l(e){var t=e.pos;return e.eatWhile(c)&&e.eat(M)&&d(e)||(e.pos=t,!1)}function d(e){return e.eatWhile(p)}function p(e){return e===O||e===N||u(e)||h(e)}function u(e){return e&=-33,65<=e&&90>=e}function h(e){return 47<e&&58>e}function m(e){return e===I||e===A}function c(e){return e&&e!==M&&!m(e)&&!r(e)}function g(e,t,n){for(r(e.charCodeAt(t))&&t++;S(e.charCodeAt(t),n.syntax);)t++;return t}function f(e,t,n){if(!n)return 0;var r=new C(e),o=(n+"").split("").map(P);r.pos=t;for(var i;!r.sol();)if(!(y(r,F,B)||y(r,q,j))){if(i=r.pos,b(r,o))return i;r.pos--}return-1}function y(e,t,n){var r=e.pos;if(e.eat(t))for(;!e.sol();){if(e.eat(n))return!0;e.pos--}return e.pos=r,!1}function b(e,t){for(var n=e.pos,r=!1,o=t.length-1;0<=o&&!e.sol()&&!!e.eat(t[o]);o--)r=0===o;return r||(e.pos=n),r}function x(e,t){return-1!==e.indexOf(t)}function v(e){return 64<e&&91>e||96<e&&123>e||47<e&&58>e||V.has(e)}function k(e,t){return e===U||"markup"===t&&(e===B||e===j)}function S(e,t){return e===z||"markup"===t&&(e===F||e===q)}t.__esModule=!0;var w=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},C=function(){function e(t,r){n(this,e),this.string=t,this.start=r||0,this.pos=this.string.length}return e.prototype.sol=function(){return this.pos===this.start},e.prototype.peek=function(e){return this.string.charCodeAt(this.pos-1+(e||0))},e.prototype.prev=function(){if(!this.sol())return this.string.charCodeAt(--this.pos)},e.prototype.eat=function(e){if(this.sol())return!1;var t="function"==typeof e?e(this.peek()):e===this.peek();return t&&this.pos--,t},e.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos<t},e}(),T=39,_=34,E=92,A=9,I=32,N=45,L=47,O=58,M=61,D=60,R=function(e){var t=e.pos;if(!e.eat(62))return!1;var n=!1;for(e.eat(L);!e.sol();){if(e.eatWhile(m),d(e)){if(e.eat(L)){n=e.eat(D);break}else if(e.eat(D)){n=!0;break}else if(e.eat(m))continue;else if(e.eat(M)){if(d(e))continue;break}else if(l(e)){n=!0;break}break}if(!i(e))break}return e.pos=t,n},P=function(e){return e.charCodeAt(0)},B=P("["),F=P("]"),U=P("("),z=P(")"),j=P("{"),q=P("}"),V=new Set(["#",".","*",":","$","-","_","!","@","%","^","+",">","/"].map(P)),W=new Map().set(B,F).set(U,z).set(j,q),H={syntax:"markup",lookAhead:null,prefix:""};t.default=function(e,t,n){t=Math.min(e.length,Math.max(0,null==t?e.length:t)),n="boolean"==typeof n?w({},H,{lookAhead:n}):w({},H,n),(null==n.lookAhead||!0===n.lookAhead)&&(t=g(e,t,n));var r=void 0,o=f(e,t,n.prefix);if(-1===o)return null;var i=new C(e,o);i.pos=t;for(var s=[];!i.sol();){if(r=i.peek(),S(r,n.syntax))s.push(r);else if(k(r,n.syntax)){if(s.pop()!==W.get(r))break;}else if(x(s,F)||x(s,q)){i.pos--;continue}else if(R(i)||!v(r))break;i.pos--}if(!s.length&&i.pos!==t){var l=e.slice(i.pos,t).replace(/^[*+>^]+/,"");return{abbreviation:l,location:t-l.length,start:n.prefix?o-n.prefix.length:t-l.length,end:t}}}},ZUoI:function(e,t,n){"use strict";n("wGjj");var r=function(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}(n("dP58"));e.exports=r},Znrd:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(null==e)return e;for(var n=[],r=function(e,n,r,o){return null==t[r]?"":n+t[r]+o},o="",s=0,l=0,i=void 0,d=void 0;l<e.length;)i=e.charCodeAt(l),i===j?n.push(l):i===q&&(d=n.pop(),!n.length&&(o+=e.slice(s,d)+e.slice(d+1,l).replace(z,r),s=l+1)),l++;return o+e.slice(s)}function i(e){return(e||"").split(/\r\n|\r|\n/g)}function s(e){return e.parent.firstChild===e}function l(e){return e&&!e.parent}function d(e){return e.isTextOnly&&!!e.children.length}function p(e){var t=e.node;if(d(t)){var n=(0,B.default)(t.value),r=c(n);if(r){var o=u(n,r);e.open=e.renderFields(o[0]),e.close=e.renderFields(o[1])}else e.text=e.renderFields(n);return!0}return!1}function c(e){return e.fields.reduce(function(e,t){return!e||t.index<e.index?t:e},null)}function u(e,t){var n=e.fields.indexOf(t),r=new e.constructor(e.string.slice(0,t.location),e.fields.slice(0,n)),o=new e.constructor(e.string.slice(t.location+t.length),e.fields.slice(n+1));return[r,o]}function h(e,t){var n=e.node;if(m(n,t)){e.indent=t.indent(v(n,t)),e.newline="\n";var r=e.newline+e.indent;l(n.parent)&&s(n)||(e.beforeOpen=r,n.isTextOnly&&(e.beforeText=r)),f(n,t)&&(!n.isTextOnly&&(e.beforeText=r+t.indent(1)),e.beforeClose=r)}return e}function m(e,t){return!!t.get("format")&&(e.parent.isTextOnly&&1===e.parent.children.length&&(0,B.default)(e.parent.value).fields.length?!1:!b(e,t)||g(e,t))}function g(e,t){if(!b(e,t))return!1;if(d(e))return!0;if(0===e.childIndex){for(var n=e;n=n.nextSibling;)if(!b(n,t))return!0;}else if(!b(e.previousSibling,t))return!0;if(t.get("inlineBreak")){for(var r=1,o=e,s=e;x(o=o.previousSibling,t);)r++;for(;x(s=s.nextSibling,t);)r++;if(r>=t.get("inlineBreak"))return!0}for(var l=0,i=e.children.length;l<i;l++)if(m(e.children[l],t))return!0;return!1}function f(e,t){var n=(e.name||"").toLowerCase();if(-1!==t.get("formatForce").indexOf(n))return!0;for(var r=0;r<e.children.length;r++)if(m(e.children[r],t))return!0;return!1}function y(e,t){var n=e.node;return n.attributes.map(function(n){if(n.options.implied&&null==n.value)return null;var r=t.attribute(n.name),o=null;if(n.options.boolean||-1!==t.get("booleanAttributes").indexOf(r.toLowerCase())){if(t.get("compactBooleanAttributes")&&null==n.value)return" "+r;null==n.value&&(o=r)}return null==o&&(o=e.renderFields(n.value))," "+r+"="+t.quote(o)}).join("")}function b(e,t){return e&&e.isTextOnly||x(e,t)}function x(e,t){return e&&t.isInline(e)}function v(e,t){for(var n=t.get("formatSkip")||[],r=e.parent.isTextOnly?-2:-1,o=e;o=o.parent;)-1===n.indexOf((o.name||"").toLowerCase())&&r++;return 0>r?0:r}function k(e,t){var n=e.node;if(t.enabled&&t.trigger&&n.name)for(var r=e.node.attributes.reduce(function(e,t){return t.name&&null!=t.value&&(e[t.name.toUpperCase().replace(/-/g,"_")]=t.value),e},{}),s=0,i=t.trigger.length;s<i;s++)if(t.trigger[s].toUpperCase()in r){e.open=o(t.before,r)+e.open,e.close&&(e.close+=o(t.after,r));break}}function S(e){var t=R({},e&&e.format);return t.comment=R({},V,t.comment),t}function w(e,t,n){n=R({},G,n);var r=e.node;if(e.indent=t.indent(T(r,t)),e.newline="\n",l(r.parent)&&s(r)||(e.beforeOpen=e.newline+e.indent),r.name){var i=R({NAME:t.name(r.name),SELF_CLOSE:r.selfClosing?n.selfClose:null},C(e,t,n.attributes));n.omitName&&n.omitName.test(i.NAME)&&i.PRIMARY_ATTRS&&(i.NAME=null),null!=n.open&&(e.open=o(n.open,i)),null!=n.close&&(e.close=o(n.close,i))}return e}function C(e,t,n){n=R({},K,n);var r=[],o=[],i=e.node;return i.attributes.forEach(function(n){if(n.options.implied&&null==n.value)return null;var i=t.attribute(n.name),s=e.renderFields(n.value);if(W.test(i))s&&r.push("#"+s);else if(H.test(i))s&&r.push("."+s.replace(/\s+/g,"."));else{var l=null==n.value&&(n.options.boolean||-1!==t.get("booleanAttributes").indexOf(i.toLowerCase()));o.push({name:i,value:s,isBoolean:l})}}),{PRIMARY_ATTRS:n.primary(r)||null,SECONDARY_ATTRS:n.secondary(o)||null}}function T(e){for(var t=e.parent.isTextOnly?-2:-1,n=e;n=n.parent;)t++;return 0>t?0:t}function _(e,t){var n=e.node;return!n.isTextOnly&&n.value&&(e.beforeText=X.test(n.value)?e.newline+e.indent+t.indent(1):" "),e}function E(e,t){if(null!=e.value&&X.test(e.value)){var n=i(e.value),r=t.indent(1),o=n.reduce(function(e,t){return Math.max(e,t.length)},0);return n.map(function(e,t){return""+(t?r:"")+A(e,o)+" |"}).join("\n")}return e.value}function A(e,t){for(;e.length<t;)e+=" ";return e}function I(e,t){var n=e.node,r=n.parent;return 0===t.get("inlineBreak")&&L(n,t)&&!l(r)&&null==r.value&&1===r.children.length&&(e.beforeOpen=": "),!n.isTextOnly&&n.value&&(e.beforeText=Q.test(n.value)?e.newline+e.indent+t.indent(1):" "),e}function N(e,t){if(null!=e.value&&Q.test(e.value)){var n=t.indent(1);return i(e.value).map(function(e,t){return""+n+(t?" ":"|")+" "+e}).join("\n")}return e.value}function L(e,t){return e&&(e.isTextOnly||t.isInline(e))}function O(e,t){var n=e.node;return!n.isTextOnly&&n.value&&(e.beforeText=J.test(n.value)?e.newline+e.indent+t.indent(1):" "),e}function M(e,t){if(null!=e.value&&J.test(e.value)){var n=t.indent(1);return i(e.value).map(function(e){return n+"| "+e}).join("\n")}return e.value}function D(e){return!!e&&e in $}t.__esModule=!0,t.template=t.supports=void 0;var R=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},P=n("R0uB"),B=r(P),F=n("iOMi"),U=r(F),z=/^(.*?)([A-Z_]+)(.*?)$/,j=91,q=93,V={enabled:!1,trigger:["id","class"],before:"",after:"\n<!-- /[#ID][.CLASS] -->"},W=/^id$/i,H=/^class$/i,K={primary:function(e){return e.join("")},secondary:function(e){return e.map(function(e){return e.isBoolean?e.name:e.name+"="+e.value}).join(", ")}},G={open:null,close:null,omitName:/^div$/i,attributes:K},X=/\n|\r/,Q=/\n|\r/,Y={none:"[ SECONDARY_ATTRS]",round:"[(SECONDARY_ATTRS)]",curly:"[{SECONDARY_ATTRS}]",square:"[[SECONDARY_ATTRS]"},J=/\n|\r/,$={html:function(e,t,n){n=R({},n);var r=S(n);return(0,U.default)(e,n.field,function(e){if(e=h(e,t),!p(e)){var n=e.node;if(n.name){var o=t.name(n.name),i=y(e,t);e.open="<"+o+i+(n.selfClosing?t.selfClose():"")+">",n.selfClosing||(e.close="</"+o+">"),k(e,r.comment)}!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(n.value))}return e})},haml:function(e,t,n){n=n||{};var r={open:"[%NAME][PRIMARY_ATTRS][(SECONDARY_ATTRS)][SELF_CLOSE]",selfClose:"/",attributes:{secondary:function(e){return e.map(function(e){return e.isBoolean?""+e.name+(t.get("compactBooleanAttributes")?"":"=true"):e.name+"="+t.quote(e.value)}).join(" ")}}};return(0,U.default)(e,n.field,function(e){if(e=w(e,t,r),e=_(e,t),!p(e)){var n=e.node;!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(E(n,t)))}return e})},slim:function(e,t,n){n=n||{};var r=n.attributeWrap&&Y[n.attributeWrap]||Y.none,o=r===Y.none?function(e){return e.name+"=true"}:function(e){return e.name},i={open:"[NAME][PRIMARY_ATTRS]"+r+"[SELF_CLOSE]",selfClose:"/",attributes:{secondary:function(e){return e.map(function(e){return e.isBoolean?o(e):e.name+"="+t.quote(e.value)}).join(" ")}}};return(0,U.default)(e,n.field,function(e){if(e=w(e,t,i),e=I(e,t),!p(e)){var n=e.node;!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(N(n,t)))}return e})},pug:function(e,t,n){n=n||{};var r={open:"[NAME][PRIMARY_ATTRS][(SECONDARY_ATTRS)]",attributes:{secondary:function(e){return e.map(function(e){return e.isBoolean?e.name:e.name+"="+t.quote(e.value)}).join(", ")}}};return(0,U.default)(e,n.field,function(e){if(e=w(e,t,r),e=O(e,t),!p(e)){var n=e.node;!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(M(n,t)))}return e})}};t.default=function(e,t,n,r){return"object"==typeof n&&(r=n,n=null),D(n)||(n="html"),$[n](e,t,r)},t.supports=D,t.template=o},aBJ1:function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){return e instanceof d?e:"string"==typeof e?new d(e,t):e&&"object"==typeof e?new d(e.name,e.value,e.options):void 0}function o(e){return(e+"").trim()}function i(e,t,n){return e&&n.indexOf(e)===t}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0,r;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},d=function(){function e(t,r,o){n(this,e),this.name=t,this.value=null==r?null:r,this.options=o||{}}return e.prototype.clone=function(){return new e(this.name,this.value,l({},this.options))},e.prototype.valueOf=function(){return this.name+"=\""+this.value+"\""},e}(),p=function(){function e(t,r){var o=this;n(this,e),this.name=t||null,this.value=null,this.repeat=null,this.selfClosing=!1,this.children=[],this.parent=null,this.next=null,this.previous=null,this._attributes=[],Array.isArray(r)&&r.forEach(function(e){return o.setAttribute(e)})}return e.prototype.create=function(t,n){return new e(t,n)},e.prototype.setAttribute=function(e,t){var n=r(e,t),o=this.getAttribute(e);o?this.replaceAttribute(o,n):this._attributes.push(n)},e.prototype.hasAttribute=function(e){return!!this.getAttribute(e)},e.prototype.getAttribute=function(e){"object"==typeof e&&(e=e.name);for(var t=0,n;t<this._attributes.length;t++)if(n=this._attributes[t],n.name===e)return n},e.prototype.replaceAttribute=function(e,t,n){"string"==typeof e&&(e=this.getAttribute(e));var o=this._attributes.indexOf(e);-1!==o&&this._attributes.splice(o,1,r(t,n))},e.prototype.removeAttribute=function(e){"string"==typeof e&&(e=this.getAttribute(e));var t=this._attributes.indexOf(e);-1!==t&&this._attributes.splice(t,1)},e.prototype.clearAttributes=function(){this._attributes.length=0},e.prototype.addClass=function(e){e=o(e),this.hasAttribute("class")?e&&!this.hasClass(e)&&this.setAttribute("class",this.classList.concat(e).join(" ")):this.setAttribute("class",e)},e.prototype.hasClass=function(e){return-1!==this.classList.indexOf(o(e))},e.prototype.removeClass=function(e){e=o(e),this.hasClass(e)&&this.setAttribute("class",this.classList.filter(function(t){return t!==e}).join(" "))},e.prototype.appendChild=function(e){this.insertAt(e,this.children.length)},e.prototype.insertBefore=function(e,t){this.insertAt(e,this.children.indexOf(t))},e.prototype.insertAt=function(e,t){if(0>t||t>this.children.length)throw new Error("Unable to insert node: position is out of child list range");var n=this.children[t-1],r=this.children[t];e.remove(),e.parent=this,this.children.splice(t,0,e),n&&(e.previous=n,n.next=e),r&&(e.next=r,r.previous=e)},e.prototype.removeChild=function(e){var t=this.children.indexOf(e);-1!==t&&(this.children.splice(t,1),e.previous&&(e.previous.next=e.next),e.next&&(e.next.previous=e.previous),e.parent=e.next=e.previous=null)},e.prototype.remove=function(){this.parent&&this.parent.removeChild(this)},e.prototype.clone=function(t){var n=new e(this.name);return n.value=this.value,n.selfClosing=this.selfClosing,this.repeat&&(n.repeat=l({},this.repeat)),this._attributes.forEach(function(e){return n.setAttribute(e.clone())}),t&&this.children.forEach(function(e){return n.appendChild(e.clone(!0))}),n},e.prototype.walk=function(e,t){t=t||0;for(var n=this.firstChild,r;n;){if(r=n.next,!1===e(n,t)||!1===n.walk(e,t+1))return!1;n=r}},e.prototype.use=function(e){for(var t=[this],n=1;n<arguments.length;n++)t.push(arguments[n]);return e.apply(null,t),this},e.prototype.toString=function(){var e=this,t=this.attributes.map(function(t){t=e.getAttribute(t.name);var n=t.options,r=""+(n&&n.implied?"!":"")+(t.name||"");return n&&n.boolean?r+=".":null!=t.value&&(r+="=\""+t.value+"\""),r}),n=""+(this.name||"");return t.length&&(n+="["+t.join(" ")+"]"),null!=this.value&&(n+="{"+this.value+"}"),this.selfClosing&&(n+="/"),this.repeat&&(n+="*"+(this.repeat.count?this.repeat.count:""),null!=this.repeat.value&&(n+="@"+this.repeat.value)),n},s(e,[{key:"attributes",get:function(){return this._attributes}},{key:"attributesMap",get:function(){return this.attributes.reduce(function(e,t){return e[t.name]=t.options.boolean?t.name:t.value,e},{})}},{key:"isGroup",get:function(){return!this.name&&!this.value&&!this._attributes.length}},{key:"isTextOnly",get:function(){return!this.name&&!!this.value&&!this._attributes.length}},{key:"firstChild",get:function(){return this.children[0]}},{key:"lastChild",get:function(){return this.children[this.children.length-1]}},{key:"childIndex",get:function(){return this.parent?this.parent.children.indexOf(this):-1}},{key:"nextSibling",get:function(){return this.next}},{key:"previousSibling",get:function(){return this.previous}},{key:"classList",get:function(){var e=this.getAttribute("class");return e&&e.value?e.value.split(/\s+/g).filter(i):[]}}]),e}();t.default=p},"ad/k":function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(e=e.toLowerCase(),t=t.toLowerCase(),e===t)return 1;if(!t||e.charCodeAt(0)!==t.charCodeAt(0))return 0;for(var n=e.length,r=t.length,s=1,i=1,l=r,d=void 0,p=void 0,c=void 0,u=void 0;s<n;){for(d=e.charCodeAt(s),c=!1,u=!1;i<r;){if(p=t.charCodeAt(i),d===p){c=!0,l+=(r-i)*(u?2:1);break}u=p===T,i++}if(!c)break;s++}return l&&l*(s/n)/o(r)}function o(e){return e*(e+1)/2}function i(e){return s(e.map(function(e){return new A(e.key,e.value)}))}function s(e){e=e.sort(l);for(var t=[],n=0,r,o;n<e.length;n++)if(r=e[n],!!r.property){for(;t.length;){if(o=t[t.length-1],0===r.property.indexOf(o.property)&&r.property.charCodeAt(o.property.length)===E){o.addDependency(r),t.push(r);break}t.pop()}t.length||t.push(r)}return e}function l(e,t){return e.key===t.key?0:e.key<t.key?-1:1}function d(e){return /^\s*[\w-]+/.test(e)}function p(e){return(e+"").split("|")}function c(e){return i(e.all({type:"string"}))}function u(e,t,n){var r=f(e.name,t,"key",n.fuzzySearchMinScore);return r?r.property?h(e,r,n):m(e,r):"!"===e.name?g(e,"!important"):e}function h(e,t,n){var r=e.name;if(e.name=t.property,e.value&&"object"==typeof e.value){var o=t.keywords();if(!e.value.size){var s=f(b(r,t.key),o);s||(s=t.defaultValue,s&&-1===s.indexOf("${")&&(s="${1:"+s+"}")),s&&e.value.add(s)}else for(var l=0,i;l<e.value.value.length;l++)i=e.value.value[l],"!"===i?i=(l?"":"${1} ")+"!important":x(i)?i=f(i.value,o)||f(i.value,I)||i:v(i)&&(i=S(e.name,i,n)),e.value.value[l]=i}return e}function m(e,t){return g(e,t.value)}function g(e,t){return e.name=null,e.value=t,e}function f(e,t,n,o){if(!e)return null;var s=null,l=0;o=o||0;for(var d=0,i;d<t.length;d++){i=t[d];var p=r(e,y(i,n));if(1===p)return i;p&&p>=l&&(l=p,s=i)}return l>=o?s:null}function y(e,t){var n=e&&"object"==typeof e?e[t]:e,r=(n||"").match(/^[\w-@]+/);return r?r[0]:n}function b(e,t){for(var n=0,r=0;n<e.length;n++){if(r=t.indexOf(e[n],r),-1===r)return e.slice(n);r++}return""}function x(e){return k(e,"keyword")}function v(e){return k(e,"numeric")}function k(e,t){return e&&"object"==typeof e&&e.type===t}function S(e,t,n){return t.unit?t.unit=n.unitAliases[t.unit]||t.unit:0!==t.value&&-1===N.indexOf(e)&&(t.unit=t.value===(0|t.value)?n.intUnit:n.floatUnit),t}t.__esModule=!0;var w=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},C=function(){function e(e,t){for(var n=0,r;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),T=45,_=/^([a-z\-]+)(?:\s*:\s*([^\n\r]+))?$/,E=45,A=function(){function e(t,r){n(this,e),this.key=t,this.value=r,this.property=null;var o=r&&r.match(_);o&&(this.property=o[1],this.value=o[2]),this.dependencies=[]}return e.prototype.addDependency=function(e){this.dependencies.push(e)},e.prototype.keywords=function(){var e=[],t=new Set,n=0,r=void 0,o=void 0;for(this.property&&e.push(this);n<e.length;)if(r=e[n++],r.value){o=p(r.value).filter(d);for(var i=0;i<o.length;i++)t.add(o[i].trim());for(var s=0,l=r.dependencies;s<l.length;s++)-1===e.indexOf(l[s])&&e.push(l[s])}return Array.from(t)},C(e,[{key:"defaultValue",get:function(){return null==this.value?null:p(this.value)[0]}}]),e}(),I=["auto","inherit","unset"],N=["z-index","line-height","opacity","font-weight","zoom","flex","flex-grow","flex-shrink"],L={intUnit:"px",floatUnit:"em",unitAliases:{e:"em",p:"%",x:"ex",r:"rem"},fuzzySearchMinScore:0};t.default=function(e,t,n){n=w({},L,n),n.unitAliases=w({},L.unitAliases,n&&n.unitAliases);var r=c(t);return e.walk(function(e){return u(e,r,n)}),e},t.convertToCSSSnippets=c,t.stringScore=r,t.cssSnippets=i},bU21:function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){e.registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,n){var r=t.getModeAt(n),o=r.blockCommentStart,s=r.blockCommentEnd;if(o&&s){for(var l=n.line,d=t.getLine(l),p=n.ch,c=0,u,h;;){if(h=0>=p?-1:d.lastIndexOf(o,p-1),-1==h){if(1==c)return;c=1,p=d.length;continue}if(1==c&&h<n.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(l,h+1)))&&(0==h||d.slice(h-s.length,h)==s||!/comment/.test(t.getTokenTypeAt(e.Pos(l,h))))){u=h+o.length;break}p=h-1}var m=1,g=t.lastLine(),f,y;outer:for(var b=l;b<=g;++b)for(var i=t.getLine(b),x=b==l?u:0;;){var v=i.indexOf(o,x),k=i.indexOf(s,x);if(0>v&&(v=i.length),0>k&&(k=i.length),x=Math.min(v,k),x==i.length)break;if(x==v)++m;else if(! --m){f=b,y=x;break outer}++x}return null==f||l==f&&y==u?void 0:{from:e.Pos(l,u),to:e.Pos(f,y)}}})})},bdtv:function(e){"use strict";e.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(e){"use strict";e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){return new Buffer(e,t)},allocBuffer:function(e){return Buffer.alloc?Buffer.alloc(e):new Buffer(e)},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},cVWy:function(e,t,n){"use strict";var r=n("3Vd+"),o=n("KxJl"),i=n("iktq"),s=n("3bh8"),l="prototype",d=function e(t,n,d){var p=t&e.F,c=t&e.G,u=t&e.S,h=t&e.P,m=t&e.B,g=t&e.W,f=c?o:o[n]||(o[n]={}),y=f[l],b=c?r:u?r[n]:(r[n]||{})[l],x,v,k;for(x in c&&(d=n),d)v=!p&&b&&void 0!==b[x],v&&x in f||(k=v?b[x]:d[x],f[x]=c&&"function"!=typeof b[x]?d[x]:m&&v?i(k,r):g&&b[x]==k?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n);}return new e(t,n,r)}return e.apply(this,arguments)};return t[l]=e[l],t}(k):h&&"function"==typeof k?i(Function.call,k):k,h&&((f.virtual||(f.virtual={}))[x]=k,t&e.R&&y&&!y[x]&&s(y,x,k)))};d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,e.exports=d},cvyR:function(e,t,n){"use strict";function r(e,t,n,r){e^=-1;for(var o=r;o<r+n;o++)e=e>>>8^s[255&(e^t[o])];return-1^e}function o(e,t,n,r){e^=-1;for(var o=r;o<r+n;o++)e=e>>>8^s[255&(e^t.charCodeAt(o))];return-1^e}var i=n("dvMn"),s=function(){for(var e=[],t=0,n;256>t;t++){n=t;for(var r=0;8>r;r++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}();e.exports=function(e,t){if("undefined"==typeof e||!e.length)return 0;var n="string"!==i.getTypeOf(e);return n?r(0|t,e,e.length,0):o(0|t,e,e.length,0)}},dFUs:function(e,t,n){"use strict";function r(e,t){this.options=e,this.loadOptions=t}var o=n("9Uuy"),i=n("dvMn"),s=n("PO9O"),l=n("cvyR"),d=n("Sm7/"),p=n("XfO6"),c=n("untT"),u=function(e){for(var t in p)if(p.hasOwnProperty(t)&&p[t].magic===e)return p[t];return null};r.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-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(t=u(this.compressionMethod),null===t)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=65535&this.externalFileAttributes>>16),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t=e.index+this.extraFieldsLength,n,r,o;for(this.extraFields||(this.extraFields={});e.index<t;)n=e.readInt(2),r=e.readInt(2),o=e.readData(r),this.extraFields[n]={id:n,length:r,value:o}},handleUTF8:function(){var e=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=d.utf8decode(this.fileName),this.fileCommentStr=d.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var n=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(null!==r)this.fileCommentStr=r;else{var o=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=o(e.value);return 1===t.readInt(1)?l(this.fileName)===t.readInt(4)?d.utf8decode(t.readData(e.length-5)):null:null}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=o(e.value);return 1===t.readInt(1)?l(this.fileComment)===t.readInt(4)?d.utf8decode(t.readData(e.length-5)):null:null}return null}},e.exports=r},dP58:function(e,t,n){"use strict";function r(){function e(e){return e=e||l,s(c,e)||o("no-app",{name:e}),c[e]}function t(){return Object.keys(c).map(function(e){return c[e]})}function n(e,t){Object.keys(u).forEach(function(n){var r=d(e,n);null===r||h[r]&&h[r](t,e)})}function d(e,t){if("serverAuth"===t)return null;e.options;return t}var c={},u={},h={},m={__esModule:!0,initializeApp:function(e,t){if(void 0===t&&(t={}),"object"!=typeof t||null===t){var r=t;t={name:r}}var i=t;void 0===i.name&&(i.name=l);var d=i.name;"string"==typeof d&&d||o("bad-app-name",{name:d+""}),s(c,d)&&o("duplicate-app",{name:d});var u=new p(e,i,m);return c[d]=u,n(u,"create"),u},app:e,apps:null,Promise:Promise,SDK_VERSION:"5.0.4",INTERNAL:{registerService:function(n,r,s,l,d){u[n]&&o("duplicate-service",{name:n}),u[n]=r,l&&(h[n]=l,t().forEach(function(e){l("create",e)}));var c=function(t){return void 0===t&&(t=e()),"function"!=typeof t[n]&&o("invalid-app-argument",{name:n}),t[n]()};return void 0!==s&&i.deepExtend(c,s),m[n]=c,p.prototype[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this._getService.bind(this,n);return r.apply(this,d?e:[])},c},createFirebaseNamespace:r,extendNamespace:function(e){i.deepExtend(m,e)},createSubscribe:i.createSubscribe,ErrorFactory:i.ErrorFactory,removeApp:function(e){var t=c[e];n(t,"delete"),delete c[e]},factories:u,useAsService:d,Promise:Promise,deepExtend:i.deepExtend}};return i.patchProperty(m,"default",m),Object.defineProperty(m,"apps",{get:t}),i.patchProperty(e,"App",p),m}function o(e,t){throw c.create(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var i=n("58xA"),s=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l="[DEFAULT]",d=[],p=function(){function e(e,t,n){this.firebase_=n,this.isDeleted_=!1,this.services_={},this.name_=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled||!1,this.options_=i.deepCopy(e),this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(e){d.push(e),setTimeout(function(){return e(null)},0)},removeAuthTokenListener:function(e){d=d.filter(function(t){return t!==e})}}}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this._automaticDataCollectionEnabled},set:function(e){this.checkDestroyed_(),this._automaticDataCollectionEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),e.prototype.delete=function(){var e=this;return new Promise(function(t){e.checkDestroyed_(),t()}).then(function(){e.firebase_.INTERNAL.removeApp(e.name_);var t=[];return Object.keys(e.services_).forEach(function(n){Object.keys(e.services_[n]).forEach(function(r){t.push(e.services_[n][r])})}),Promise.all(t.map(function(e){return e.INTERNAL.delete()}))}).then(function(){e.isDeleted_=!0,e.services_={}})},e.prototype._getService=function(e,t){if(void 0===t&&(t=l),this.checkDestroyed_(),this.services_[e]||(this.services_[e]={}),!this.services_[e][t]){var n=t===l?void 0:t,r=this.firebase_.INTERNAL.factories[e](this,this.extendApp.bind(this),n);this.services_[e][t]=r}return this.services_[e][t]},e.prototype.extendApp=function(e){var t=this;i.deepExtend(this,e),e.INTERNAL&&e.INTERNAL.addAuthTokenListener&&(d.forEach(function(e){t.INTERNAL.addAuthTokenListener(e)}),d=[])},e.prototype.checkDestroyed_=function(){this.isDeleted_&&o("app-deleted",{name:this.name_})},e}();p.prototype.name&&p.prototype.options||p.prototype.delete||console.log("dc");var c=new i.ErrorFactory("app","Firebase",{"no-app":"No Firebase App '{$name}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$name}","duplicate-app":"Firebase App named '{$name}' already exists","app-deleted":"Firebase App named '{$name}' already deleted","duplicate-service":"Firebase service named '{$name}' already registered","sa-not-supported":"Initializing the Firebase SDK with a service account is only allowed in a Node.js environment. On client devices, you should instead initialize the SDK with an api key and auth domain","invalid-app-argument":"firebase.{$name}() takes either no argument or a Firebase App instance."}),u=r();t.firebase=u,t.default=u},daDe:function(e,t,n){"use strict";function r(e){o.call(this,e)}var o=n("nR4t"),i=n("dvMn");i.inherits(r,o),r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},dskh:function(e,t,n){"use strict";var r=Math.pow,o=Math.floor,s=String.fromCharCode,l=Math.min;(function(e){function i(){return p.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function d(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return p.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=p.prototype):(null===e&&(e=new p(t)),e.length=t),e}function p(e,t,n){if(!p.TYPED_ARRAY_SUPPORT&&!(this instanceof p))return new p(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return m(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError("\"value\" argument must not be a number");return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?y(e,t,n,r):"string"==typeof t?g(e,t,n):b(e,t)}function u(e){if("number"!=typeof e)throw new TypeError("\"size\" argument must be a number");else if(0>e)throw new RangeError("\"size\" argument must not be negative")}function h(e,t,n,r){return u(t),0>=t?d(e,t):void 0===n?d(e,t):"string"==typeof r?d(e,t).fill(n,r):d(e,t).fill(n)}function m(e,t){if(u(t),e=d(e,0>t?0:0|x(t)),!p.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function g(e,t,n){if(("string"!=typeof n||""===n)&&(n="utf8"),!p.isEncoding(n))throw new TypeError("\"encoding\" must be a valid string encoding");var r=0|v(t,n);e=d(e,r);var o=e.write(t,n);return o!==r&&(e=e.slice(0,o)),e}function f(e,t){var n=0>t.length?0:0|x(t.length);e=d(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function y(e,t,n,r){if(t.byteLength,0>n||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),p.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=p.prototype):e=f(e,t),e}function b(e,t){if(p.isBuffer(t)){var n=0|x(t.length);return(e=d(e,n),0===e.length)?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||Z(t.length)?d(e,0):f(e,t);if("Buffer"===t.type&&ne(t.data))return f(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function x(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function v(e,t){if(p.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(r)return X(e).length;t=(""+t).toLowerCase(),r=!0;}}function k(e,t,n){var r=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return D(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return L(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0;}}function S(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647<n?n=2147483647:-2147483648>n&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),0>n&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(0>n)if(o)n=0;else return-1;if("string"==typeof t&&(t=p.from(t,r)),p.isBuffer(t))return 0===t.length?-1:C(e,t,n,r,o);if("number"==typeof t)return t&=255,p.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):C(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function C(e,t,n,r,o){function s(e,t){return 1==l?e[t]:e.readUInt16BE(t*l)}var l=1,d=e.length,p=t.length;if(void 0!==r&&(r=(r+"").toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(2>e.length||2>t.length)return-1;l=2,d/=2,p/=2,n/=2}var c;if(o){var i=-1;for(c=n;c<d;c++)if(s(e,c)!==s(t,-1==i?0:c-i))-1!=i&&(c-=c-i),i=-1;else if(-1==i&&(i=c),c-i+1===p)return i*l}else for(n+p>d&&(n=d-p),c=n;0<=c;c--){for(var u=!0,h=0;h<p;h++)if(s(e,c+h)!==s(t,h)){u=!1;break}if(u)return c}return-1}function T(e,t,n,r){n=+n||0;var o=e.length-n;r?(r=+r,r>o&&(r=o)):r=o;var s=t.length;if(0!=s%2)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var l=0,i;l<r;++l){if(i=parseInt(t.substr(2*l,2),16),isNaN(i))return l;e[n+l]=i}return l}function _(e,t,n,r){return $(X(t,e.length-n),e,n,r)}function E(e,t,n,r){return $(Q(t),e,n,r)}function A(e,t,n,r){return E(e,t,n,r)}function I(e,t,n,r){return $(J(t),e,n,r)}function N(e,t,n,r){return $(Y(t,e.length-n),e,n,r)}function L(e,t,n){return 0===t&&n===e.length?ee.fromByteArray(e):ee.fromByteArray(e.slice(t,n))}function O(e,t,n){n=l(e.length,n);for(var r=[],o=t;o<n;){var i=e[o],s=null,d=239<i?4:223<i?3:191<i?2:1;if(o+d<=n){var p,c,u,h;1==d?128>i&&(s=i):2==d?(p=e[o+1],128==(192&p)&&(h=(31&i)<<6|63&p,127<h&&(s=h))):3==d?(p=e[o+1],c=e[o+2],128==(192&p)&&128==(192&c)&&(h=(15&i)<<12|(63&p)<<6|63&c,2047<h&&(55296>h||57343<h)&&(s=h))):4==d?(p=e[o+1],c=e[o+2],u=e[o+3],128==(192&p)&&128==(192&c)&&128==(192&u)&&(h=(15&i)<<18|(63&p)<<12|(63&c)<<6|63&u,65535<h&&1114112>h&&(s=h))):void 0}null===s?(s=65533,d=1):65535<s&&(s-=65536,r.push(55296|1023&s>>>10),s=56320|1023&s),r.push(s),o+=d}return M(r)}function M(e){var t=e.length;if(t<=re)return s.apply(String,e);for(var n="",r=0;r<t;)n+=s.apply(String,e.slice(r,r+=re));return n}function D(e,t,n){var r="";n=l(e.length,n);for(var o=t;o<n;++o)r+=s(127&e[o]);return r}function R(e,t,n){var r="";n=l(e.length,n);for(var o=t;o<n;++o)r+=s(e[o]);return r}function P(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var o="",s=t;s<n;++s)o+=G(e[s]);return o}function B(e,t,n){for(var r=e.slice(t,n),o="",l=0;l<r.length;l+=2)o+=s(r[l]+256*r[l+1]);return o}function F(e,t,n){if(0!=e%1||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,n,r,o,i){if(!p.isBuffer(e))throw new TypeError("\"buffer\" argument must be a Buffer instance");if(t>o||t<i)throw new RangeError("\"value\" argument is out of bounds");if(n+r>e.length)throw new RangeError("Index out of range")}function z(e,t,n,r){0>t&&(t=65535+t+1);for(var o=0,i=l(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function j(e,t,n,r){0>t&&(t=4294967295+t+1);for(var o=0,i=l(e.length-n,4);o<i;++o)e[n+o]=255&t>>>8*(r?o:3-o)}function q(e,t,n,r){if(n+r>e.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function V(e,t,n,r,o){return o||q(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),te.write(e,t,n,r,23,4),n+4}function W(e,t,n,r,o){return o||q(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),te.write(e,t,n,r,52,8),n+8}function H(e){if(e=K(e).replace(oe,""),2>e.length)return"";for(;0!=e.length%4;)e+="=";return e}function K(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function G(e){return 16>e?"0"+e.toString(16):e.toString(16)}function X(e,t){t=t||Infinity;for(var n=e.length,r=null,o=[],s=0,i;s<n;++s){if(i=e.charCodeAt(s),55295<i&&57344>i){if(!r){if(56319<i){-1<(t-=3)&&o.push(239,191,189);continue}else if(s+1===n){-1<(t-=3)&&o.push(239,191,189);continue}r=i;continue}if(56320>i){-1<(t-=3)&&o.push(239,191,189),r=i;continue}i=(r-55296<<10|i-56320)+65536}else r&&-1<(t-=3)&&o.push(239,191,189);if(r=null,128>i){if(0>(t-=1))break;o.push(i)}else if(2048>i){if(0>(t-=2))break;o.push(192|i>>6,128|63&i)}else if(65536>i){if(0>(t-=3))break;o.push(224|i>>12,128|63&i>>6,128|63&i)}else if(1114112>i){if(0>(t-=4))break;o.push(240|i>>18,128|63&i>>12,128|63&i>>6,128|63&i)}else throw new Error("Invalid code point")}return o}function Q(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Y(e,t){for(var n=[],r=0,o,i,s;r<e.length&&!(0>(t-=2));++r)o=e.charCodeAt(r),i=o>>8,s=o%256,n.push(s),n.push(i);return n}function J(e){return ee.toByteArray(H(e))}function $(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Z(e){return e!==e}var ee=n("yh9p"),te=n("JgNJ"),ne=n("REa7");t.Buffer=p,t.SlowBuffer=function(e){return+e!=e&&(e=0),p.alloc(+e)},t.INSPECT_MAX_BYTES=50,p.TYPED_ARRAY_SUPPORT=void 0===e.TYPED_ARRAY_SUPPORT?function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}():e.TYPED_ARRAY_SUPPORT,t.kMaxLength=i(),p.poolSize=8192,p._augment=function(e){return e.__proto__=p.prototype,e},p.from=function(e,t,n){return c(null,e,t,n)},p.TYPED_ARRAY_SUPPORT&&(p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0})),p.alloc=function(e,t,n){return h(null,e,t,n)},p.allocUnsafe=function(e){return m(null,e)},p.allocUnsafeSlow=function(e){return m(null,e)},p.isBuffer=function(e){return!!(null!=e&&e._isBuffer)},p.compare=function(e,t){if(!p.isBuffer(e)||!p.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=l(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},p.isEncoding=function(e){switch((e+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1;}},p.concat=function(e,t){if(!ne(e))throw new TypeError("\"list\" argument must be an Array of Buffers");if(0===e.length)return p.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=p.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var i=e[n];if(!p.isBuffer(i))throw new TypeError("\"list\" argument must be an Array of Buffers");i.copy(r,o),o+=i.length}return r},p.byteLength=v,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var e=this.length;if(0!=e%2)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)S(this,t,t+1);return this},p.prototype.swap32=function(){var e=this.length;if(0!=e%4)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)S(this,t,t+3),S(this,t+1,t+2);return this},p.prototype.swap64=function(){var e=this.length;if(0!=e%8)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)S(this,t,t+7),S(this,t+1,t+6),S(this,t+2,t+5),S(this,t+3,t+4);return this},p.prototype.toString=function(){var e=0|this.length;return 0==e?"":0===arguments.length?O(this,0,e):k.apply(this,arguments)},p.prototype.equals=function(e){if(!p.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===p.compare(this,e)},p.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return 0<this.length&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},p.prototype.compare=function(e,t,n,r,o){if(!p.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),0>t||n>e.length||0>r||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var s=o-r,d=n-t,c=l(s,d),u=this.slice(r,o),h=e.slice(t,n),m=0;m<c;++m)if(u[m]!==h[m]){s=u[m],d=h[m];break}return s<d?-1:d<s?1:0},p.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},p.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},p.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},p.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-t;if((void 0===n||n>o)&&(n=o),0<e.length&&(0>n||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return T(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return A(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0;}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var re=4096;p.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),t<e&&(t=e);var r;if(p.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=p.prototype;else{var o=t-e;r=new p(o,void 0);for(var s=0;s<o;++s)r[s]=this[s+e]}return r},p.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=this[e],o=1,s=0;++s<t&&(o*=256);)r+=this[e+s]*o;return r},p.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=this[e+--t],o=1;0<t&&(o*=256);)r+=this[e+--t]*o;return r},p.prototype.readUInt8=function(e,t){return t||F(e,1,this.length),this[e]},p.prototype.readUInt16LE=function(e,t){return t||F(e,2,this.length),this[e]|this[e+1]<<8},p.prototype.readUInt16BE=function(e,t){return t||F(e,2,this.length),this[e]<<8|this[e+1]},p.prototype.readUInt32LE=function(e,t){return t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},p.prototype.readUInt32BE=function(e,t){return t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},p.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var o=this[e],s=1,l=0;++l<t&&(s*=256);)o+=this[e+l]*s;return s*=128,o>=s&&(o-=r(2,8*t)),o},p.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var o=t,i=1,s=this[e+--o];0<o&&(i*=256);)s+=this[e+--o]*i;return i*=128,s>=i&&(s-=r(2,8*t)),s},p.prototype.readInt8=function(e,t){return t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},p.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},p.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},p.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),te.read(this,e,!0,23,4)},p.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),te.read(this,e,!1,23,4)},p.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),te.read(this,e,!0,52,8)},p.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),te.read(this,e,!1,52,8)},p.prototype.writeUIntLE=function(e,t,n,o){if(e=+e,t|=0,n|=0,!o){var s=r(2,8*n)-1;U(this,e,t,n,s,0)}var l=1,d=0;for(this[t]=255&e;++d<n&&(l*=256);)this[t+d]=255&e/l;return t+n},p.prototype.writeUIntBE=function(e,t,n,o){if(e=+e,t|=0,n|=0,!o){var s=r(2,8*n)-1;U(this,e,t,n,s,0)}var l=n-1,i=1;for(this[t+l]=255&e;0<=--l&&(i*=256);)this[t+l]=255&e/i;return t+n},p.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,1,255,0),p.TYPED_ARRAY_SUPPORT||(e=o(e)),this[t]=255&e,t+1},p.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},p.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},p.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):j(this,e,t,!0),t+4},p.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},p.prototype.writeIntLE=function(e,t,n,o){if(e=+e,t|=0,!o){var s=r(2,8*n-1);U(this,e,t,n,s-1,-s)}var l=0,i=1,d=0;for(this[t]=255&e;++l<n&&(i*=256);)0>e&&0==d&&0!==this[t+l-1]&&(d=1),this[t+l]=255&(e/i>>0)-d;return t+n},p.prototype.writeIntBE=function(e,t,n,o){if(e=+e,t|=0,!o){var s=r(2,8*n-1);U(this,e,t,n,s-1,-s)}var l=n-1,i=1,d=0;for(this[t+l]=255&e;0<=--l&&(i*=256);)0>e&&0==d&&0!==this[t+l+1]&&(d=1),this[t+l]=255&(e/i>>0)-d;return t+n},p.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,1,127,-128),p.TYPED_ARRAY_SUPPORT||(e=o(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},p.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},p.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},p.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,4,2147483647,-2147483648),p.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):j(this,e,t,!0),t+4},p.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},p.prototype.writeFloatLE=function(e,t,n){return V(this,e,t,!0,n)},p.prototype.writeFloatBE=function(e,t,n){return V(this,e,t,!1,n)},p.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},p.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},p.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),0<r&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o=r-n,s;if(this===e&&n<t&&t<r)for(s=o-1;0<=s;--s)e[s+t]=this[s+n];else if(1e3>o||!p.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)e[s+t]=this[s+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},p.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);256>o&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!p.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(0>t||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{var i=p.isBuffer(e)?e:X(new p(e,r).toString()),l=i.length;for(s=0;s<n-t;++s)this[s+t]=i[s%l]}return this};var oe=/[^+\/0-9A-Za-z-_]/g}).call(t,n("h6ac"))},dvMn:function(e,t,n){"use strict";function r(e){var t=null;return t=c.uint8array?new Uint8Array(e.length):Array(e.length),i(e,t)}function o(e){return e}function i(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}function s(e){var n=65536,r=t.getTypeOf(e),o=!0;if("uint8array"===r?o=f.applyCanBeUsed.uint8array:"nodebuffer"===r&&(o=f.applyCanBeUsed.nodebuffer),o)for(;1<n;)try{return f.stringifyByChunk(e,r,n)}catch(t){n=Math.floor(n/2)}return f.stringifyByChar(e)}function l(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}var d=String.fromCharCode,p=Math.min,c=n("untT"),u=n("Ps3q"),h=n("c5OX"),m=n("sN8g"),g=n("8JlO");t.newBlob=function(e,n){t.checkSupport("blob");try{return new Blob([e],{type:n})}catch(t){try{var r=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,o=new r;return o.append(e),o.getBlob(n)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(e,t,n){var r=[],o=0,i=e.length;if(i<=n)return d.apply(null,e);for(;o<i;)"array"===t||"nodebuffer"===t?r.push(d.apply(null,e.slice(o,p(o+n,i)))):r.push(d.apply(null,e.subarray(o,p(o+n,i)))),o+=n;return r.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=d(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return c.uint8array&&1===d.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return c.nodebuffer&&1===d.apply(null,h.allocBuffer(1)).length}catch(t){return!1}}()}};t.applyFromCharCode=s;var y={};y.string={string:o,array:function(e){return i(e,Array(e.length))},arraybuffer:function(e){return y.string.uint8array(e).buffer},uint8array:function(e){return i(e,new Uint8Array(e.length))},nodebuffer:function(e){return i(e,h.allocBuffer(e.length))}},y.array={string:s,array:o,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return h.newBufferFrom(e)}},y.arraybuffer={string:function(e){return s(new Uint8Array(e))},array:function(e){return l(new Uint8Array(e),Array(e.byteLength))},arraybuffer:o,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return h.newBufferFrom(new Uint8Array(e))}},y.uint8array={string:s,array:function(e){return l(e,Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:o,nodebuffer:function(e){return h.newBufferFrom(e)}},y.nodebuffer={string:s,array:function(e){return l(e,Array(e.length))},arraybuffer:function(e){return y.nodebuffer.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:o},t.transformTo=function(e,n){if(n||(n=""),!e)return n;t.checkSupport(e);var r=t.getTypeOf(n),o=y[r][e](n);return o},t.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":c.nodebuffer&&h.isBuffer(e)?"nodebuffer":c.uint8array&&e instanceof Uint8Array?"uint8array":c.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},t.checkSupport=function(e){var t=c[e.toLowerCase()];if(!t)throw new Error(e+" is not supported by this platform")},t.MAX_VALUE_16BITS=65535,t.MAX_VALUE_32BITS=-1,t.pretty=function(e){var t="",n,r;for(r=0;r<(e||"").length;r++)n=e.charCodeAt(r),t+="\\x"+(16>n?"0":"")+n.toString(16).toUpperCase();return t},t.delay=function(e,t,n){m(function(){e.apply(n||null,t||[])})},t.inherits=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n},t.extend=function(){var e={},t,n;for(t=0;t<arguments.length;t++)for(n in arguments[t])arguments[t].hasOwnProperty(n)&&"undefined"==typeof e[n]&&(e[n]=arguments[t][n]);return e},t.prepareContent=function(e,n,o,i,s){var l=g.Promise.resolve(n).then(function(e){var t=c.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)));return t&&"undefined"!=typeof FileReader?new g.Promise(function(t,n){var r=new FileReader;r.onload=function(n){t(n.target.result)},r.onerror=function(t){n(t.target.error)},r.readAsArrayBuffer(e)}):e});return l.then(function(n){var l=t.getTypeOf(n);return l?("arraybuffer"===l?n=t.transformTo("uint8array",n):"string"===l&&(s?n=u.decode(n):o&&!0!==i&&(n=r(n))),n):g.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},e4aZ:function(e,t,n){"use strict";function r(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var o=n("Sm7/"),i=n("dvMn"),s=n("ZKdc"),l=n("2P9T"),d=n("lUr3"),p=n("PO9O"),c=n("geN+"),u=n("GTg1"),h=n("c5OX"),m=n("AsaI"),g=function(e,t,n){var r=i.getTypeOf(t),l=i.extend(n||{},d),o;l.date=l.date||new Date,null!==l.compression&&(l.compression=l.compression.toUpperCase()),"string"==typeof l.unixPermissions&&(l.unixPermissions=parseInt(l.unixPermissions,8)),l.unixPermissions&&16384&l.unixPermissions&&(l.dir=!0),l.dosPermissions&&16&l.dosPermissions&&(l.dir=!0),l.dir&&(e=y(e)),l.createFolders&&(o=f(e))&&b.call(this,o,!0);var u="string"===r&&!1===l.binary&&!1===l.base64;n&&"undefined"!=typeof n.binary||(l.binary=!u);var g=t instanceof p&&0===t.uncompressedSize;(g||l.dir||!t||0===t.length)&&(l.base64=!1,l.binary=!0,t="",l.compression="STORE",r="string");var x=null;x=t instanceof p||t instanceof s?t:h.isNode&&h.isStream(t)?new m(e,t):i.prepareContent(e,t,l.binary,l.optimizedBinaryString,l.base64);var v=new c(e,x,l);this.files[e]=v},f=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},y=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},b=function(e,t){return t="undefined"==typeof t?d.createFolders:t,e=y(e),this.files[e]||g.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};e.exports={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],n=t.slice(this.root.length,t.length),n&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(r)}),t},file:function(e,t,n){if(1===arguments.length){if(r(e)){var o=e;return this.filter(function(e,t){return!t.dir&&o.test(e)})}var i=this.files[this.root+e];return i&&!i.dir?i:null}return e=this.root+e,g.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(r(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=b.call(this,t),o=this.clone();return o.root=n.name,o},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t={},n;try{if(t=i.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode}),t.type=t.type.toLowerCase(),t.compression=t.compression.toUpperCase(),"binarystring"===t.type&&(t.type="string"),!t.type)throw new Error("No output type specified.");i.checkSupport(t.type),("darwin"===t.platform||"freebsd"===t.platform||"linux"===t.platform||"sunos"===t.platform)&&(t.platform="UNIX"),"win32"===t.platform&&(t.platform="DOS");var r=t.comment||this.comment||"";n=u.generateWorker(this,t,r)}catch(t){n=new s("error"),n.error(t)}return new l(n,t.type||"string",t.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}}},e5FP:function(e,t,n){"use strict";function r(e){return!e.parent}function o(e,t){return Math.floor(Math.random()*(t-e)+e)}function i(e,t){for(var n=e.length,r=h(n,t),i=new Set;i.size<r;)i.add(e[o(0,n)]);return Array.from(i)}function s(e){return e[o(0,e.length-1)]}function l(e,t){return e.length&&(e=[d(e[0])].concat(e.slice(1))),e.join(" ")+(t||s("?!..."))}function d(e){return e[0].toUpperCase()+e.slice(1)}function p(e){if(2>e.length)return e;e=e.slice();var t=e.length,n=/,$/,r=0;r=3<t&&6>=t?o(0,1):6<t&&12>=t?o(0,2):o(1,4);for(var s=0,i;s<r;s++)i=o(0,t-2),n.test(e[i])||(e[i]+=",");return e}function c(e,t,n){var r=[],s=0,d=void 0;for(n&&e.common&&(d=e.common.slice(0,t),s+=d.length,r.push(l(p(d),".")));s<t;)d=i(e.words,h(o(2,30),t-s)),s+=d.length,r.push(l(p(d)));return r.join(" ")}function u(e){for(;e.parent;){if(e.repeat&&e.repeat.value&&1<e.repeat.value)return!0;e=e.parent}return!1}var h=Math.min;t.__esModule=!0;var m=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},g=n("7EAy"),f=function(e){return e&&e.__esModule?e:{default:e}}(g),y={latin:{common:["lorem","ipsum","dolor","sit","amet","consectetur","adipisicing","elit"],words:["exercitationem","perferendis","perspiciatis","laborum","eveniet","sunt","iure","nam","nobis","eum","cum","officiis","excepturi","odio","consectetur","quasi","aut","quisquam","vel","eligendi","itaque","non","odit","tempore","quaerat","dignissimos","facilis","neque","nihil","expedita","vitae","vero","ipsum","nisi","animi","cumque","pariatur","velit","modi","natus","iusto","eaque","sequi","illo","sed","ex","et","voluptatibus","tempora","veritatis","ratione","assumenda","incidunt","nostrum","placeat","aliquid","fuga","provident","praesentium","rem","necessitatibus","suscipit","adipisci","quidem","possimus","voluptas","debitis","sint","accusantium","unde","sapiente","voluptate","qui","aspernatur","laudantium","soluta","amet","quo","aliquam","saepe","culpa","libero","ipsa","dicta","reiciendis","nesciunt","doloribus","autem","impedit","minima","maiores","repudiandae","ipsam","obcaecati","ullam","enim","totam","delectus","ducimus","quis","voluptates","dolores","molestiae","harum","dolorem","quia","voluptatem","molestias","magni","distinctio","omnis","illum","dolorum","voluptatum","ea","quas","quam","corporis","quae","blanditiis","atque","deserunt","laboriosam","earum","consequuntur","hic","cupiditate","quibusdam","accusamus","ut","rerum","error","minus","eius","ab","ad","nemo","fugit","officia","at","in","id","quos","reprehenderit","numquam","iste","fugiat","sit","inventore","beatae","repellendus","magnam","recusandae","quod","explicabo","doloremque","aperiam","consequatur","asperiores","commodi","optio","dolor","labore","temporibus","repellat","veniam","architecto","est","esse","mollitia","nulla","a","similique","eos","alias","dolore","tenetur","deleniti","porro","facere","maxime","corrupti"]},ru:{common:["\u0434\u0430\u043B\u0435\u043A\u043E-\u0434\u0430\u043B\u0435\u043A\u043E","\u0437\u0430","\u0441\u043B\u043E\u0432\u0435\u0441\u043D\u044B\u043C\u0438","\u0433\u043E\u0440\u0430\u043C\u0438","\u0432 \u0441\u0442\u0440\u0430\u043D\u0435","\u0433\u043B\u0430\u0441\u043D\u044B\u0445","\u0438 \u0441\u043E\u0433\u043B\u0430\u0441\u043D\u044B\u0445","\u0436\u0438\u0432\u0443\u0442","\u0440\u044B\u0431\u043D\u044B\u0435","\u0442\u0435\u043A\u0441\u0442\u044B"],words:["\u0432\u0434\u0430\u043B\u0438","\u043E\u0442 \u0432\u0441\u0435\u0445","\u043E\u043D\u0438","\u0431\u0443\u043A\u0432\u0435\u043D\u043D\u044B\u0445","\u0434\u043E\u043C\u0430\u0445","\u043D\u0430 \u0431\u0435\u0440\u0435\u0433\u0443","\u0441\u0435\u043C\u0430\u043D\u0442\u0438\u043A\u0430","\u0431\u043E\u043B\u044C\u0448\u043E\u0433\u043E","\u044F\u0437\u044B\u043A\u043E\u0432\u043E\u0433\u043E","\u043E\u043A\u0435\u0430\u043D\u0430","\u043C\u0430\u043B\u0435\u043D\u044C\u043A\u0438\u0439","\u0440\u0443\u0447\u0435\u0435\u043A","\u0434\u0430\u043B\u044C","\u0436\u0443\u0440\u0447\u0438\u0442","\u043F\u043E \u0432\u0441\u0435\u0439","\u043E\u0431\u0435\u0441\u043F\u0435\u0447\u0438\u0432\u0430\u0435\u0442","\u0435\u0435","\u0432\u0441\u0435\u043C\u0438","\u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u044B\u043C\u0438","\u043F\u0440\u0430\u0432\u0438\u043B\u0430\u043C\u0438","\u044D\u0442\u0430","\u043F\u0430\u0440\u0430\u0434\u0438\u0433\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F","\u0441\u0442\u0440\u0430\u043D\u0430","\u043A\u043E\u0442\u043E\u0440\u043E\u0439","\u0436\u0430\u0440\u0435\u043D\u043D\u044B\u0435","\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F","\u0437\u0430\u043B\u0435\u0442\u0430\u044E\u0442","\u043F\u0440\u044F\u043C\u043E","\u0440\u043E\u0442","\u0434\u0430\u0436\u0435","\u0432\u0441\u0435\u043C\u043E\u0433\u0443\u0449\u0430\u044F","\u043F\u0443\u043D\u043A\u0442\u0443\u0430\u0446\u0438\u044F","\u043D\u0435","\u0438\u043C\u0435\u0435\u0442","\u0432\u043B\u0430\u0441\u0442\u0438","\u043D\u0430\u0434","\u0440\u044B\u0431\u043D\u044B\u043C\u0438","\u0442\u0435\u043A\u0441\u0442\u0430\u043C\u0438","\u0432\u0435\u0434\u0443\u0449\u0438\u043C\u0438","\u0431\u0435\u0437\u043E\u0440\u0444\u043E\u0433\u0440\u0430\u0444\u0438\u0447\u043D\u044B\u0439","\u043E\u0431\u0440\u0430\u0437","\u0436\u0438\u0437\u043D\u0438","\u043E\u0434\u043D\u0430\u0436\u0434\u044B","\u043E\u0434\u043D\u0430","\u043C\u0430\u043B\u0435\u043D\u044C\u043A\u0430\u044F","\u0441\u0442\u0440\u043E\u0447\u043A\u0430","\u0440\u044B\u0431\u043D\u043E\u0433\u043E","\u0442\u0435\u043A\u0441\u0442\u0430","\u0438\u043C\u0435\u043D\u0438","lorem","ipsum","\u0440\u0435\u0448\u0438\u043B\u0430","\u0432\u044B\u0439\u0442\u0438","\u0431\u043E\u043B\u044C\u0448\u043E\u0439","\u043C\u0438\u0440","\u0433\u0440\u0430\u043C\u043C\u0430\u0442\u0438\u043A\u0438","\u0432\u0435\u043B\u0438\u043A\u0438\u0439","\u043E\u043A\u0441\u043C\u043E\u043A\u0441","\u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0430\u043B","\u043E","\u0437\u043B\u044B\u0445","\u0437\u0430\u043F\u044F\u0442\u044B\u0445","\u0434\u0438\u043A\u0438\u0445","\u0437\u043D\u0430\u043A\u0430\u0445","\u0432\u043E\u043F\u0440\u043E\u0441\u0430","\u043A\u043E\u0432\u0430\u0440\u043D\u044B\u0445","\u0442\u043E\u0447\u043A\u0430\u0445","\u0437\u0430\u043F\u044F\u0442\u043E\u0439","\u043D\u043E","\u0442\u0435\u043A\u0441\u0442","\u0434\u0430\u043B","\u0441\u0431\u0438\u0442\u044C","\u0441\u0435\u0431\u044F","\u0442\u043E\u043B\u043A\u0443","\u043E\u043D","\u0441\u043E\u0431\u0440\u0430\u043B","\u0441\u0435\u043C\u044C","\u0441\u0432\u043E\u0438\u0445","\u0437\u0430\u0433\u043B\u0430\u0432\u043D\u044B\u0445","\u0431\u0443\u043A\u0432","\u043F\u043E\u0434\u043F\u043E\u044F\u0441\u0430\u043B","\u0438\u043D\u0438\u0446\u0438\u0430\u043B","\u0437\u0430","\u043F\u043E\u044F\u0441","\u043F\u0443\u0441\u0442\u0438\u043B\u0441\u044F","\u0434\u043E\u0440\u043E\u0433\u0443","\u0432\u0437\u043E\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044C","\u043F\u0435\u0440\u0432\u0443\u044E","\u0432\u0435\u0440\u0448\u0438\u043D\u0443","\u043A\u0443\u0440\u0441\u0438\u0432\u043D\u044B\u0445","\u0433\u043E\u0440","\u0431\u0440\u043E\u0441\u0438\u043B","\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439","\u0432\u0437\u0433\u043B\u044F\u0434","\u043D\u0430\u0437\u0430\u0434","\u0441\u0438\u043B\u0443\u044D\u0442","\u0441\u0432\u043E\u0435\u0433\u043E","\u0440\u043E\u0434\u043D\u043E\u0433\u043E","\u0433\u043E\u0440\u043E\u0434\u0430","\u0431\u0443\u043A\u0432\u043E\u0433\u0440\u0430\u0434","\u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A","\u0434\u0435\u0440\u0435\u0432\u043D\u0438","\u0430\u043B\u0444\u0430\u0432\u0438\u0442","\u043F\u043E\u0434\u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A","\u0441\u0432\u043E\u0435\u0433\u043E","\u043F\u0435\u0440\u0435\u0443\u043B\u043A\u0430","\u0433\u0440\u0443\u0441\u0442\u043D\u044B\u0439","\u0440\u0435\u0442\u043E\u0440\u0438\u0447\u0435\u0441\u043A\u0438\u0439","\u0432\u043E\u043F\u0440\u043E\u0441","\u0441\u043A\u0430\u0442\u0438\u043B\u0441\u044F","\u0435\u0433\u043E","\u0449\u0435\u043A\u0435","\u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u043B","\u0441\u0432\u043E\u0439","\u043F\u0443\u0442\u044C","\u0434\u043E\u0440\u043E\u0433\u0435","\u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043B","\u0440\u0443\u043A\u043E\u043F\u0438\u0441\u044C","\u043E\u043D\u0430","\u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0434\u0438\u043B\u0430","\u043C\u043E\u0435\u0439","\u0432\u0441\u0435","\u043F\u0435\u0440\u0435\u043F\u0438\u0441\u044B\u0432\u0430\u0435\u0442\u0441\u044F","\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E","\u0440\u0430\u0437","\u0435\u0434\u0438\u043D\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0435","\u0447\u0442\u043E","\u043C\u0435\u043D\u044F","\u043E\u0441\u0442\u0430\u043B\u043E\u0441\u044C","\u044D\u0442\u043E","\u043F\u0440\u0438\u0441\u0442\u0430\u0432\u043A\u0430","\u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0439\u0441\u044F","\u0442\u044B","\u043B\u0443\u0447\u0448\u0435","\u0441\u0432\u043E\u044E","\u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u0443\u044E","\u0441\u0442\u0440\u0430\u043D\u0443","\u043F\u043E\u0441\u043B\u0443\u0448\u0430\u0432\u0448\u0438\u0441\u044C","\u0440\u0443\u043A\u043E\u043F\u0438\u0441\u0438","\u043D\u0430\u0448","\u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u043B","\u0441\u0432\u043E\u0439","\u043F\u0443\u0442\u044C","\u0432\u0441\u043A\u043E\u0440\u0435","\u0435\u043C\u0443","\u043F\u043E\u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043B\u0441\u044F","\u043A\u043E\u0432\u0430\u0440\u043D\u044B\u0439","\u0441\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043B\u044C","\u0440\u0435\u043A\u043B\u0430\u043C\u043D\u044B\u0445","\u0442\u0435\u043A\u0441\u0442\u043E\u0432","\u043D\u0430\u043F\u043E\u0438\u0432\u0448\u0438\u0439","\u044F\u0437\u044B\u043A\u043E\u043C","\u0440\u0435\u0447\u044C\u044E","\u0437\u0430\u043C\u0430\u043D\u0438\u0432\u0448\u0438\u0439","\u0441\u0432\u043E\u0435","\u0430\u0433\u0435\u043D\u0442\u0441\u0442\u0432\u043E","\u043A\u043E\u0442\u043E\u0440\u043E\u0435","\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043B\u043E","\u0441\u043D\u043E\u0432\u0430","\u0441\u043D\u043E\u0432\u0430","\u0441\u0432\u043E\u0438\u0445","\u043F\u0440\u043E\u0435\u043A\u0442\u0430\u0445","\u0435\u0441\u043B\u0438","\u043F\u0435\u0440\u0435\u043F\u0438\u0441\u0430\u043B\u0438","\u0442\u043E","\u0436\u0438\u0432\u0435\u0442","\u0442\u0430\u043C","\u0434\u043E","\u0441\u0438\u0445","\u043F\u043E\u0440"]},sp:{common:["mujer","uno","dolor","m\xE1s","de","poder","mismo","si"],words:["ejercicio","preferencia","perspicacia","laboral","pa\xF1o","suntuoso","molde","namibia","planeador","mirar","dem\xE1s","oficinista","excepci\xF3n","odio","consecuencia","casi","auto","chicharra","velo","elixir","ataque","no","odio","temporal","cu\xF3rum","dign\xEDsimo","facilismo","letra","nihilista","expedici\xF3n","alma","alveolar","aparte","le\xF3n","animal","como","paria","belleza","modo","natividad","justo","ataque","s\xE9quito","pillo","sed","ex","y","voluminoso","temporalidad","verdades","racional","asunci\xF3n","incidente","marejada","placenta","amanecer","fuga","previsor","presentaci\xF3n","lejos","necesariamente","sospechoso","adiposidad","quind\xEDo","p\xF3cima","voluble","d\xE9bito","sinti\xF3","accesorio","falda","sapiencia","volutas","queso","permacultura","laudo","soluciones","entero","pan","litro","tonelada","culpa","libertario","mosca","dictado","reincidente","nascimiento","dolor","escolar","impedimento","m\xEDnima","mayores","repugnante","dulce","obcecado","monta\xF1a","enigma","total","delet\xE9reo","d\xE9cima","c\xE1bala","fotograf\xEDa","dolores","molesto","olvido","paciencia","resiliencia","voluntad","molestias","magn\xEDfico","distinci\xF3n","ovni","marejada","cerro","torre","y","abogada","manantial","corporal","agua","crep\xFAsculo","ataque","desierto","laboriosamente","angustia","afortunado","alma","encefalograma","materialidad","cosas","o","renuncia","error","menos","conejo","abad\xEDa","analfabeto","remo","fugacidad","oficio","en","alm\xE1cigo","vos","pan","represi\xF3n","n\xFAmeros","triste","refugiado","trote","inventor","corchea","repelente","magma","recusado","patr\xF3n","expl\xEDcito","paloma","s\xEDndrome","inmune","autoinmune","comodidad","ley","vietnamita","demonio","tasmania","repeler","ap\xE9ndice","arquitecto","columna","yugo","computador","mula","a","prop\xF3sito","fantas\xEDa","alias","rayo","tenedor","deleznable","ventana","cara","anemia","corrupto"]}},b={wordCount:30,skipCommon:!1,lang:"latin"};t.default=function(e,t){t=m({},b,t);var n=y[t.lang]||y.latin,o=!t.skipCommon&&!u(e);return e.repeat||r(e.parent)?(e.value=c(n,t.wordCount,o),e.name=e.parent.name?(0,f.default)(e.parent.name):null):(e.parent.value=c(n,t.wordCount,o),e.remove()),e}},eA7g:function(e,t,n){"use strict";function r(){return ct.logLevel===st.LogLevel.DEBUG?ut.DEBUG:ct.logLevel===st.LogLevel.SILENT?ut.SILENT:ut.ERROR}function o(e){e===ut.DEBUG?ct.logLevel=st.LogLevel.DEBUG:e===ut.ERROR?ct.logLevel=st.LogLevel.ERROR:e===ut.SILENT?ct.logLevel=st.LogLevel.SILENT:ct.error("Firestore ("+pt+"): Invalid value passed to `setLogLevel`")}function i(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(ct.logLevel<=st.LogLevel.DEBUG){var o=n.map(l);ct.debug.apply(ct,["Firestore ("+pt+") ["+e+"]: "+t].concat(o))}}function s(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(ct.logLevel<=st.LogLevel.ERROR){var r=t.map(l);ct.error.apply(ct,["Firestore ("+pt+"): "+e].concat(r))}}function l(e){if("string"==typeof e)return e;var t=ht.getPlatform();try{return t.formatJSON(e)}catch(t){return e}}function d(e){var t="FIRESTORE ("+pt+") INTERNAL ASSERTION FAILED: "+e;throw s(t),new Error(t)}function c(e,t){e||d(t)}function p(){return ht.getPlatform().emptyByteString}function u(e,t){function n(){var e="This constructor is private.";throw t&&(e+=" ",e+=t),new gt(mt.INVALID_ARGUMENT,e)}for(var r in n.prototype=e.prototype,e)e.hasOwnProperty(r)&&(n[r]=e[r]);return n}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function m(e,t){return void 0===e?t:e}function g(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=+n;isNaN(r)||t(r,e[n])}}function f(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function y(e){for(var t in c(null!=e&&"object"==typeof e,"isEmpty() expects object parameter."),e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function b(e){c(e&&"object"==typeof e,"shallowCopy() expects object parameter.");var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function x(e,t,n){if(t.length!==n)throw new gt(mt.INVALID_ARGUMENT,"Function "+e+"() requires "+U(n,"argument")+", but was called with "+U(t.length,"argument")+".")}function v(e,t,n){if(t.length<n)throw new gt(mt.INVALID_ARGUMENT,"Function "+e+"() requires at least "+U(n,"argument")+", but was called with "+U(t.length,"argument")+".")}function k(e,t,n,r){if(t.length<n||t.length>r)throw new gt(mt.INVALID_ARGUMENT,"Function "+e+"() requires between "+n+" and "+(r+" arguments, but was called with ")+U(t.length,"argument")+".")}function S(e,t,n,r){if(!(t instanceof Array)||t.length<r)throw new gt(mt.INVALID_ARGUMENT,"Function "+e+"() requires its "+n+" argument to be an array with at least "+(U(r,"element")+"."))}function w(e,t,n,r){L(e,t,F(n)+" argument",r)}function C(e,t,n,r){void 0!==r&&w(e,t,n,r)}function T(e,t,n,r){L(e,t,n+" option",r)}function _(e,t,n,r){void 0!==r&&T(e,t,n,r)}function E(e,t,n,r,o){if(!(r instanceof Array))throw new gt(mt.INVALID_ARGUMENT,"Function "+e+"() requires its "+t+" "+("option to be an array, but it was: "+M(r)));for(var s=0;s<r.length;++s)if(!o(r[s]))throw new gt(mt.INVALID_ARGUMENT,"Function "+e+"() requires all "+t+" "+("elements to be "+n+", but the value at index "+s+" ")+("was: "+M(r[s])))}function A(e,t,n,r,o){void 0!==r&&E(e,t,n,r,o)}function I(e,t,n,r,o){for(var i=[],s=0,l=o,d;s<l.length;s++){if(d=l[s],d===r)return;i.push(M(d))}var p=M(r);throw new gt(mt.INVALID_ARGUMENT,"Invalid value "+p+" provided to function "+e+"() for option \""+n+"\". Acceptable values: "+i.join(", "))}function N(e,t,n,r,o){void 0!==r&&I(e,t,n,r,o)}function L(e,t,n,r){if(typeof r!==t||"object"===t&&!O(r)){var o=M(r);throw new gt(mt.INVALID_ARGUMENT,"Function "+e+"() requires its "+n+" "+("to be of type "+t+", but it was: "+o))}}function O(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}function M(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return 20<e.length&&(e=e.substring(0,20)+"..."),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";var t=D(e);return t?"a custom "+t+" object":"an object"}return"function"==typeof e?"a function":d("Unknown wrong type: "+typeof e)}function D(e){if(e.constructor){var t=/function\s+([^\s(]+)\s*\(/,n=t.exec(e.constructor.toString());if(n&&1<n.length)return n[1]}return null}function R(e,t,n){if(void 0===n)throw new gt(mt.INVALID_ARGUMENT,"Function "+e+"() requires a valid "+F(t)+" argument, but it was undefined.")}function P(e,t,n){f(t,function(t){if(0>n.indexOf(t))throw new gt(mt.INVALID_ARGUMENT,"Unknown option '"+t+"' passed to function "+e+"(). Available options: "+n.join(", "))})}function B(e,t,n,r){var o=M(r);return new gt(mt.INVALID_ARGUMENT,"Function "+e+"() requires its "+F(n)+" "+("argument to be a "+t+", but it was: "+o))}function F(e){return 1===e?"first":2===e?"second":3===e?"third":e+"th"}function U(e,t){return e+" "+t+(1===e?"":"s")}function z(e,t){return e<t?-1:e>t?1:0}function j(e,t){return null!==e&&void 0!==e?!!(t&&e.isEqual(t)):e===t}function q(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].isEqual(t[n]))return!1;return!0}function V(e){var t=e.length-1;return 0===e.length?"":"\0"===e.charAt(t)?e.substring(0,t):e.substring(0,t)+rt(e.charCodeAt(t)-1)}function W(e){return e+"\0"}function H(){if("undefined"==typeof Uint8Array)throw new gt(mt.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function K(){if(!ht.getPlatform().base64Available)throw new gt(mt.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}function G(e,t){return e<t?-1:e>t?1:e===t?0:isNaN(e)?isNaN(t)?0:-1:1}function X(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function Q(e){return null===e||void 0===e}function Y(e){return nn(e)&&e<=tn&&e>=en}function J(e,t,n){if(n.isEqual(zt.INSTANCE)){if(t!==on.EQUAL)throw new gt(mt.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on null.");return new sn(e)}if(n.isEqual(Wt.NAN)){if(t!==on.EQUAL)throw new gt(mt.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on NaN.");return new ln(e)}return new an(e,t,n)}function $(e){return e===mt.OK?d("Treated status OK as error"):e===mt.CANCELLED||e===mt.UNKNOWN||e===mt.DEADLINE_EXCEEDED||e===mt.RESOURCE_EXHAUSTED||e===mt.INTERNAL||e===mt.UNAVAILABLE||e===mt.UNAUTHENTICATED?!1:e===mt.INVALID_ARGUMENT||e===mt.NOT_FOUND||e===mt.ALREADY_EXISTS||e===mt.PERMISSION_DENIED||e===mt.FAILED_PRECONDITION||e===mt.ABORTED||e===mt.OUT_OF_RANGE||e===mt.UNIMPLEMENTED||e===mt.DATA_LOSS||d("Unknown status code: "+e)}function Z(e){var t=An[e];return void 0===t?void 0:ee(t)}function ee(e){return void 0===e?(s("GRPC error has no .code"),mt.UNKNOWN):e===An.OK?mt.OK:e===An.CANCELLED?mt.CANCELLED:e===An.UNKNOWN?mt.UNKNOWN:e===An.DEADLINE_EXCEEDED?mt.DEADLINE_EXCEEDED:e===An.RESOURCE_EXHAUSTED?mt.RESOURCE_EXHAUSTED:e===An.INTERNAL?mt.INTERNAL:e===An.UNAVAILABLE?mt.UNAVAILABLE:e===An.UNAUTHENTICATED?mt.UNAUTHENTICATED:e===An.INVALID_ARGUMENT?mt.INVALID_ARGUMENT:e===An.NOT_FOUND?mt.NOT_FOUND:e===An.ALREADY_EXISTS?mt.ALREADY_EXISTS:e===An.PERMISSION_DENIED?mt.PERMISSION_DENIED:e===An.FAILED_PRECONDITION?mt.FAILED_PRECONDITION:e===An.ABORTED?mt.ABORTED:e===An.OUT_OF_RANGE?mt.OUT_OF_RANGE:e===An.UNIMPLEMENTED?mt.UNIMPLEMENTED:e===An.DATA_LOSS?mt.DATA_LOSS:d("Unknown status code: "+e)}function te(e){return void 0===e?An.OK:e===mt.OK?An.OK:e===mt.CANCELLED?An.CANCELLED:e===mt.UNKNOWN?An.UNKNOWN:e===mt.DEADLINE_EXCEEDED?An.DEADLINE_EXCEEDED:e===mt.RESOURCE_EXHAUSTED?An.RESOURCE_EXHAUSTED:e===mt.INTERNAL?An.INTERNAL:e===mt.UNAVAILABLE?An.UNAVAILABLE:e===mt.UNAUTHENTICATED?An.UNAUTHENTICATED:e===mt.INVALID_ARGUMENT?An.INVALID_ARGUMENT:e===mt.NOT_FOUND?An.NOT_FOUND:e===mt.ALREADY_EXISTS?An.ALREADY_EXISTS:e===mt.PERMISSION_DENIED?An.PERMISSION_DENIED:e===mt.FAILED_PRECONDITION?An.FAILED_PRECONDITION:e===mt.ABORTED?An.ABORTED:e===mt.OUT_OF_RANGE?An.OUT_OF_RANGE:e===mt.UNIMPLEMENTED?An.UNIMPLEMENTED:e===mt.DATA_LOSS?An.DATA_LOSS:d("Unknown status code: "+e)}function ne(e){return 200===e?mt.OK:400===e?mt.INVALID_ARGUMENT:401===e?mt.UNAUTHENTICATED:403===e?mt.PERMISSION_DENIED:404===e?mt.NOT_FOUND:409===e?mt.ABORTED:416===e?mt.OUT_OF_RANGE:429===e?mt.RESOURCE_EXHAUSTED:499===e?mt.CANCELLED:500===e?mt.UNKNOWN:501===e?mt.UNIMPLEMENTED:503===e?mt.UNAVAILABLE:504===e?mt.DEADLINE_EXCEEDED:200<=e&&300>e?mt.OK:400<=e&&500>e?mt.FAILED_PRECONDITION:500<=e&&600>e?mt.INTERNAL:mt.UNKNOWN}function re(){return Nn}function oe(){return Ln}function ae(){return On}function ie(){return Mn}function se(e,t){0<t.length&&(e.resumeToken=t)}function le(e){return e instanceof $t?e.internalValue.slice():[]}function de(e,t){c(!Q(e),t+" is missing")}function pe(e){return"number"==typeof e?e:"string"==typeof e?+e:d("can't parse "+e)}function ce(e,t,n){return t===n||!t&&n in e}function ue(e){var t=e.search(pr);if(0<=t)throw new gt(mt.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not contain '~', '*', '/', '[', or ']'");try{return new(dr.bind.apply(dr,[void 0].concat(e.split("."))))}catch(t){throw new gt(mt.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'")}}function he(e,t){var n=function(e){return e===ur.Added?1:e===ur.Modified?2:e===ur.Metadata?2:e===ur.Removed?0:d("Unknown ChangeType: "+e)};return n(e)-n(t)}function me(e){for(var t="",n=0;n<e.length;n++)0<t.length&&(t=fe(t)),t=ge(e.get(n),t);return fe(t)}function ge(e,t){for(var n=t,r=e.length,o=0,i;o<r;o++)i=e.charAt(o),n+="\0"===i?Fr+zr:i===Fr?Fr+jr:i;return n}function fe(e){return e+Fr+Ur}function ye(e){var t=e.length;if(c(2<=t,"Invalid path "+e),2===t)return c(e.charAt(0)===Fr&&e.charAt(1)===Ur,"Non-empty path "+e+" had length 2"),_t.EMPTY_PATH;for(var n=[],r="",o=0,i;o<t;){i=e.indexOf(Fr,o),(0>i||i>t-2)&&d("Invalid encoded resource path: \""+e+"\"");var s=e.charAt(i+1);switch(s){case Ur:var l=e.substring(o,i),p=void 0;0===r.length?p=l:(r+=l,p=r,r=""),n.push(p);break;case zr:r+=e.substring(o,i),r+="\0";break;case jr:r+=e.substring(o,i+1);break;default:d("Invalid encoded resource path: \""+e+"\"");}o=i+2}return new _t(n)}function be(e,t,n,r){c(n<r&&0<=n&&2>=r,"Unexpected schema upgrade from v${fromVersion} to v{toVersion}."),1>n&&1<=r&&(xe(e),ve(e),Se(e),ke(e));var o=kr.resolve();return 2>n&&2<=r&&(o=Ce(t).next(function(e){return we(t,e)})),o}function xe(e){e.createObjectStore(Wr.store)}function ve(e){e.createObjectStore(Hr.store,{keyPath:Hr.keyPath}),e.createObjectStore(Kr.store,{keyPath:Kr.keyPath}),e.createObjectStore(Gr.store)}function ke(e){e.createObjectStore(Qr.store)}function Se(e){var t=e.createObjectStore(Jr.store,{keyPath:Jr.keyPath});t.createIndex(Jr.documentTargetsIndex,Jr.documentTargetsKeyPath,{unique:!0});var n=e.createObjectStore(Yr.store,{keyPath:Yr.keyPath});n.createIndex(Yr.queryTargetsIndexName,Yr.queryTargetsKeyPath,{unique:!0}),e.createObjectStore($r.store)}function we(e,t){var n=e.store($r.store),r=e.store(Yr.store);return r.count().next(function(e){return t.targetCount=e,n.put($r.key,t)})}function Ce(e){var t=e.store($r.store);return t.get($r.key).next(function(e){return null==e?(e=new $r(0,0,mn.MIN.toTimestamp(),0),t.put($r.key,e).next(function(){return e})):kr.resolve(e)})}function Te(e){return new kr(function(t,n){e.onsuccess=function(e){var n=e.target.result;t(n)},e.onerror=function(e){n(e.target.error)}})}function _e(e){return e instanceof Uint8Array?(c("YES"===process.env.USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence ."),e.toString()):e}function Ee(e){return Ne(e,Kr.store)}function Ae(e){return Ne(e,Gr.store)}function Ie(e){return Ne(e,Hr.store)}function Ne(e,t){return e instanceof oo?e.store(t):d("Invalid transaction object provided!")}function Le(e){return De(e,Yr.store)}function Oe(e){return De(e,$r.store)}function Me(e){return De(e,Jr.store)}function De(e,t){return e instanceof oo?e.store(t):d("Invalid transaction object provided!")}function Re(e){return e instanceof oo?e.store(Qr.store):d("Invalid transaction object provided!")}function Pe(e){return e.path.toArray()}function Be(e){return void 0!==e.documents}function Fe(e){if(!e)return new qo;switch(e.type){case"gapi":return new Ho(e.client,e.sessionIndex||"0");case"provider":return e.client;default:throw new gt(mt.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type");}}function Ue(e){return ze(e,["next","error","complete"])}function ze(e,t){if("object"!=typeof e||null===e)return!1;for(var n=e,r=0,o=t,i;r<o.length;r++)if(i=o[r],i in n&&"function"==typeof n[i])return!0;return!1}function je(e){switch(e){case ta.Set:case ta.MergeSet:case ta.Update:return!0;case ta.Argument:return!1;default:throw d("Unexpected case for UserDataSource: "+e);}}function qe(e){return"object"==typeof e&&null!==e&&!(e instanceof Array)&&!(e instanceof Date)&&!(e instanceof vt)&&!(e instanceof xt)&&!(e instanceof yt)&&!(e instanceof ra)&&!(e instanceof Ko)}function Ve(e,t,n){if(!qe(n)||!O(n)){var r=M(n);if("an object"===r)throw t.createError(e+" a custom object");else throw t.createError(e+" "+r)}}function We(e,t){if(t instanceof dr)return t._internalPath;if("string"==typeof t)return He(e,t);throw new gt(mt.INVALID_ARGUMENT,"Function "+e+"() called with invalid data. "+"Field path arguments must be of type string or FieldPath.")}function He(t,e){try{return ue(e)._internalPath}catch(r){var n=Ke(r);throw new gt(mt.INVALID_ARGUMENT,"Function "+t+"() called with invalid data. "+n)}}function Ke(e){return e instanceof Error?e.message:e.toString()}function Ge(){throw new gt(mt.INVALID_ARGUMENT,"QuerySnapshot.docChanges has been changed from a property into a method, so usages like \"querySnapshot.docChanges\" should become \"querySnapshot.docChanges()\"")}function Xe(e,t){if(void 0===t)return{merge:!1};if(P(e,t,["merge","mergeFields"]),_(e,"boolean","merge",t.merge),A(e,"mergeFields","a string or a FieldPath",t.mergeFields,function(e){return"string"==typeof e||e instanceof dr}),void 0!==t.mergeFields&&void 0!==t.merge)throw new gt(mt.INVALID_ARGUMENT,"Invalid options passed to function "+e+"(): You cannot specify both \"merge\" and \"mergeFields\".");return t}function Qe(e,t){return void 0===t?{}:(P(e,t,["serverTimestamps"]),N(e,"options","serverTimestamps",t.serverTimestamps,["estimate","previous","none"]),t)}function Ye(e,t,n){if(!(t instanceof ca))throw B(e,"DocumentReference",1,t);else if(t.firestore!==n)throw new gt(mt.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");else return t}function Je(e,t,n){if(n.oldDocs.isEmpty()){var r=0,o;return n.docChanges.map(function(t){var i=new ma(e,t.doc.key,t.doc,n.fromCache);return c(t.type===ur.Added,"Invalid event type for first snapshot"),c(!o||0>n.query.docComparator(o,t.doc),"Got added events in wrong order"),o=t.doc,{type:"added",doc:i,oldIndex:-1,newIndex:r++}})}var i=n.oldDocs;return n.docChanges.filter(function(e){return t||e.type!==ur.Metadata}).map(function(t){var r=new ma(e,t.doc.key,t.doc,n.fromCache),o=-1,s=-1;return t.type!==ur.Added&&(o=i.indexOf(t.doc.key),c(0<=o,"Index for document not found"),i=i.delete(t.doc.key)),t.type!==ur.Removed&&(i=i.add(t.doc),s=i.indexOf(t.doc.key)),{type:$e(t.type),doc:r,oldIndex:o,newIndex:s}})}function $e(e){return e===ur.Added?"added":e===ur.Modified||e===ur.Metadata?"modified":e===ur.Removed?"removed":d("Unknown change type: "+e)}function Ze(e){e.INTERNAL.registerService("firestore",function(e){return new la(e)},b(Aa))}function et(e){Ze(e)}var tt=Number.POSITIVE_INFINITY,nt=Math.floor,rt=String.fromCharCode,ot=Math.min,at=Math.max;Object.defineProperty(t,"__esModule",{value:!0});var it=function(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}(n("dP58")),st=n("TUpU"),lt=n("vCxL"),dt=n("IIoC"),pt=it.SDK_VERSION,ct=new st.Logger("@firebase/firestore"),ut;(function(e){e[e.DEBUG=0]="DEBUG",e[e.ERROR=1]="ERROR",e[e.SILENT=2]="SILENT"})(ut||(ut={}));var ht=function(){function e(){}return e.setPlatform=function(t){e.platform&&d("Platform already defined"),e.platform=t},e.getPlatform=function(){return e.platform||d("Platform not set"),e.platform},e}(),mt={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"},gt=function(e){function t(t,n){var r=e.call(this,n)||this;return r.code=t,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return lt.__extends(t,e),t}(Error),ft=function(){function e(){}return e.newId=function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="",n=0;20>n;n++)t+=e.charAt(nt(Math.random()*e.length));return c(20===t.length,"Invalid auto ID: "+t),t},e}(),yt=function(){function e(e){K(),this._binaryString=e}return e.fromBase64String=function(t){x("Blob.fromBase64String",arguments,1),w("Blob.fromBase64String","string",1,t),K();try{var n=ht.getPlatform().atob(t);return new e(n)}catch(t){throw new gt(mt.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+t)}},e.fromUint8Array=function(t){if(x("Blob.fromUint8Array",arguments,1),H(),!(t instanceof Uint8Array))throw B("Blob.fromUint8Array","Uint8Array",1,t);var n=Array.prototype.map.call(t,function(e){return rt(e)}).join("");return new e(n)},e.prototype.toBase64=function(){return x("Blob.toBase64",arguments,0),K(),ht.getPlatform().btoa(this._binaryString)},e.prototype.toUint8Array=function(){x("Blob.toUint8Array",arguments,0),H();for(var e=new Uint8Array(this._binaryString.length),t=0;t<this._binaryString.length;t++)e[t]=this._binaryString.charCodeAt(t);return e},e.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},e.prototype.isEqual=function(e){return this._binaryString===e._binaryString},e.prototype._compareTo=function(e){return z(this._binaryString,e._binaryString)},e}(),bt=u(yt,"Use Blob.fromUint8Array() or Blob.fromBase64String() instead."),xt=function(){function e(e,t){if(x("GeoPoint",arguments,2),w("GeoPoint","number",1,e),w("GeoPoint","number",2,t),!isFinite(e)||-90>e||90<e)throw new gt(mt.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||-180>t||180<t)throw new gt(mt.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}return Object.defineProperty(e.prototype,"latitude",{get:function(){return this._lat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"longitude",{get:function(){return this._long},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(e){return this._lat===e._lat&&this._long===e._long},e.prototype._compareTo=function(e){return z(this._lat,e._lat)||z(this._long,e._long)},e}(),vt=function(){function e(e,t){if(this.seconds=e,this.nanoseconds=t,0>t)throw new gt(mt.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(1e9<=t)throw new gt(mt.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(-62135596800>e)throw new gt(mt.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(253402300800<=e)throw new gt(mt.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}return e.now=function(){return e.fromMillis(Date.now())},e.fromDate=function(t){return e.fromMillis(t.getTime())},e.fromMillis=function(t){var n=nt(t/1e3);return new e(n,1e6*(t-1e3*n))},e.prototype.toDate=function(){return new Date(this.toMillis())},e.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},e.prototype._compareTo=function(e){return this.seconds===e.seconds?z(this.nanoseconds,e.nanoseconds):z(this.seconds,e.seconds)},e.prototype.isEqual=function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds},e.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},e}(),kt=function(){return function(e,t,n,r){this.databaseId=e,this.persistenceKey=t,this.host=n,this.ssl=r}}(),St="(default)",wt=function(){function e(e,t){this.projectId=e,this.database=t?t:St}return Object.defineProperty(e.prototype,"isDefaultDatabase",{get:function(){return this.database===St},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database},e.prototype.compareTo=function(e){return z(this.projectId,e.projectId)||z(this.database,e.database)},e}(),Ct="__name__",Tt=function(){function e(e,t,n){this.init(e,t,n)}return e.prototype.init=function(e,t,n){void 0===t?t=0:t>e.length&&d("offset "+t+" out of range "+e.length),void 0===n?n=e.length-t:n>e.length-t&&d("length "+n+" out of range "+(e.length-t)),this.segments=e,this.offset=t,this.len=n},e.prototype.construct=function(e,t,n){var r=Object.create(Object.getPrototypeOf(this));return r.init(e,t,n),r},Object.defineProperty(e.prototype,"length",{get:function(){return this.len},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){return 0===e.comparator(this,t)},e.prototype.child=function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach(function(e){n.push(e)}):"string"==typeof t?n.push(t):d("Unknown parameter type for Path.child(): "+t),this.construct(n)},e.prototype.limit=function(){return this.offset+this.length},e.prototype.popFirst=function(e){return e=void 0===e?1:e,c(this.length>=e,"Can't call popFirst() with less segments"),this.construct(this.segments,this.offset+e,this.length-e)},e.prototype.popLast=function(){return c(!this.isEmpty(),"Can't call popLast() on empty path"),this.construct(this.segments,this.offset,this.length-1)},e.prototype.firstSegment=function(){return c(!this.isEmpty(),"Can't call firstSegment() on empty path"),this.segments[this.offset]},e.prototype.lastSegment=function(){return c(!this.isEmpty(),"Can't call lastSegment() on empty path"),this.segments[this.limit()-1]},e.prototype.get=function(e){return c(e<this.length,"Index out of range"),this.segments[this.offset+e]},e.prototype.isEmpty=function(){return 0===this.length},e.prototype.isPrefixOf=function(e){if(e.length<this.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0},e.prototype.forEach=function(e){for(var t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])},e.prototype.toArray=function(){return this.segments.slice(this.offset,this.limit())},e.comparator=function(e,t){for(var n=ot(e.length,t.length),r=0;r<n;r++){var o=e.get(r),i=t.get(r);if(o<i)return-1;if(o>i)return 1}return e.length<t.length?-1:e.length>t.length?1:0},e}(),_t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lt.__extends(t,e),t.prototype.canonicalString=function(){return this.toArray().join("/")},t.prototype.toString=function(){return this.canonicalString()},t.fromString=function(e){if(0<=e.indexOf("//"))throw new gt(mt.INVALID_ARGUMENT,"Invalid path ("+e+"). Paths must not contain // in them.");var n=e.split("/").filter(function(e){return 0<e.length});return new t(n)},t.EMPTY_PATH=new t([]),t}(Tt),Et=/^[_a-zA-Z][_a-zA-Z0-9]*$/,At=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lt.__extends(t,e),t.isValidIdentifier=function(e){return Et.test(e)},t.prototype.canonicalString=function(){return this.toArray().map(function(e){return e=e.replace("\\","\\\\").replace("`","\\`"),t.isValidIdentifier(e)||(e="`"+e+"`"),e}).join(".")},t.prototype.toString=function(){return this.canonicalString()},t.prototype.isKeyField=function(){return 1===this.length&&this.get(0)===Ct},t.keyField=function(){return new t([Ct])},t.fromServerFormat=function(e){for(var n=[],r="",o=0,i=function(){if(0===r.length)throw new gt(mt.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},s=!1,l;o<e.length;)if(l=e[o],"\\"===l){if(o+1===e.length)throw new gt(mt.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var d=e[o+1];if("\\"!==d&&"."!==d&&"`"!==d)throw new gt(mt.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=d,o+=2}else"`"===l?(s=!s,o++):"."!==l||s?(r+=l,o++):(i(),o++);if(i(),s)throw new gt(mt.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new t(n)},t.EMPTY_PATH=new t([]),t}(Tt),It=function(){function e(t){this.path=t,c(e.isDocumentKey(t),"Invalid DocumentKey with an odd number of segments: "+t.toArray().join("/"))}return e.prototype.isEqual=function(e){return null!==e&&0===_t.comparator(this.path,e.path)},e.prototype.toString=function(){return this.path.toString()},e.comparator=function(e,t){return _t.comparator(e.path,t.path)},e.isDocumentKey=function(e){return 0==e.length%2},e.fromSegments=function(t){return new e(new _t(t.slice()))},e.fromPathString=function(t){return new e(_t.fromString(t))},e.EMPTY=new e(new _t([])),e}(),Nt=function(){function e(e,t,n,r){this.key=e,this.version=t,this.data=n,this.hasLocalMutations=r.hasLocalMutations}return e.prototype.field=function(e){return this.data.field(e)},e.prototype.fieldValue=function(e){var t=this.field(e);return t?t.value():void 0},e.prototype.value=function(){return this.data.value()},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.data.isEqual(t.data)&&this.hasLocalMutations===t.hasLocalMutations},e.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.data.toString()+", "+("{hasLocalMutations: "+this.hasLocalMutations+"})")},e.compareByKey=function(e,t){return It.comparator(e.key,t.key)},e.compareByField=function(e,t,n){var r=t.field(e),o=n.field(e);return void 0!==r&&void 0!==o?r.compareTo(o):d("Trying to compare documents on fields that don't exist")},e}(),Lt=function(){function e(e,t){this.key=e,this.version=t}return e.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},e.prototype.isEqual=function(e){return e&&e.version.isEqual(this.version)&&e.key.isEqual(this.key)},e.compareByKey=function(e,t){return It.comparator(e.key,t.key)},e}(),Ot=function(){function e(e,t){this.comparator=e,this.root=t?t:Dt.EMPTY}return e.prototype.insert=function(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,Dt.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,Dt.BLACK,null,null))},e.prototype.get=function(e){for(var t=this.root,n;!t.isEmpty();){if(n=this.comparator(e,t.key),0===n)return t.value;0>n?t=t.left:0<n&&(t=t.right)}return null},e.prototype.indexOf=function(e){for(var t=0,n=this.root,r;!n.isEmpty();){if(r=this.comparator(e,n.key),0===r)return t+n.left.size;0>r?n=n.left:(t+=n.left.size+1,n=n.right)}return-1},e.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(e.prototype,"size",{get:function(){return this.root.size},enumerable:!0,configurable:!0}),e.prototype.minKey=function(){return this.root.minKey()},e.prototype.maxKey=function(){return this.root.maxKey()},e.prototype.inorderTraversal=function(e){return this.root.inorderTraversal(e)},e.prototype.forEach=function(e){this.inorderTraversal(function(t,n){return e(t,n),!1})},e.prototype.reverseTraversal=function(e){return this.root.reverseTraversal(e)},e.prototype.getIterator=function(){return new Mt(this.root,null,this.comparator,!1)},e.prototype.getIteratorFrom=function(e){return new Mt(this.root,e,this.comparator,!1)},e.prototype.getReverseIterator=function(){return new Mt(this.root,null,this.comparator,!0)},e.prototype.getReverseIteratorFrom=function(e){return new Mt(this.root,e,this.comparator,!0)},e}(),Mt=function(){function e(e,t,n,r){this.isReverse=r,this.nodeStack=[];for(var o=1;!e.isEmpty();)if(o=t?n(e.key,t):1,r&&(o*=-1),0>o)e=this.isReverse?e.left:e.right;else if(0===o){this.nodeStack.push(e);break}else this.nodeStack.push(e),e=this.isReverse?e.right:e.left}return e.prototype.getNext=function(){c(0<this.nodeStack.length,"getNext() called on iterator when hasNext() is false.");var e=this.nodeStack.pop(),t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t},e.prototype.hasNext=function(){return 0<this.nodeStack.length},e.prototype.peek=function(){if(0===this.nodeStack.length)return null;var e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}},e}(),Dt=function(){function e(t,n,r,o,i){this.key=t,this.value=n,this.color=null==r?e.RED:r,this.left=null==o?e.EMPTY:o,this.right=null==i?e.EMPTY:i,this.size=this.left.size+1+this.right.size}return e.prototype.copy=function(t,n,r,o,i){return new e(null==t?this.key:t,null==n?this.value:n,null==r?this.color:r,null==o?this.left:o,null==i?this.right:i)},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)},e.prototype.min=function(){return this.left.isEmpty()?this:this.left.min()},e.prototype.minKey=function(){return this.min().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(e,t,r){var o=this,n=r(e,o.key);return o=0>n?o.copy(null,null,null,o.left.insert(e,t,r),null):0===n?o.copy(null,t,null,null,null):o.copy(null,null,null,null,o.right.insert(e,t,r)),o.fixUp()},e.prototype.removeMin=function(){if(this.left.isEmpty())return e.EMPTY;var t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),t=t.copy(null,null,null,t.left.removeMin(),null),t.fixUp()},e.prototype.remove=function(t,r){var o=this,n;if(0>r(t,o.key))o.left.isEmpty()||o.left.isRed()||o.left.left.isRed()||(o=o.moveRedLeft()),o=o.copy(null,null,null,o.left.remove(t,r),null);else{if(o.left.isRed()&&(o=o.rotateRight()),o.right.isEmpty()||o.right.isRed()||o.right.left.isRed()||(o=o.moveRedRight()),0===r(t,o.key)){if(o.right.isEmpty())return e.EMPTY;n=o.right.min(),o=o.copy(n.key,n.value,null,null,o.right.removeMin())}o=o.copy(null,null,null,null,o.right.remove(t,r))}return o.fixUp()},e.prototype.isRed=function(){return this.color},e.prototype.fixUp=function(){var e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e},e.prototype.moveRedLeft=function(){var e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e},e.prototype.moveRedRight=function(){var e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e},e.prototype.rotateLeft=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.checkMaxDepth=function(){var e=this.check();return!!(Math.pow(2,e)<=this.size+1)},e.prototype.check=function(){if(this.isRed()&&this.left.isRed())throw d("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed())throw d("Right child of ("+this.key+","+this.value+") is red");var e=this.left.check();if(e!==this.right.check())throw d("Black depths differ");else return e+(this.isRed()?0:1)},e.EMPTY=null,e.RED=!0,e.BLACK=!1,e}(),Rt=function(){function e(){this.size=0}return e.prototype.copy=function(){return this},e.prototype.insert=function(e,t){return new Dt(e,t)},e.prototype.remove=function(){return this},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(){return!1},e.prototype.reverseTraversal=function(){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.isRed=function(){return!1},e.prototype.checkMaxDepth=function(){return!0},e.prototype.check=function(){return 0},e}();Dt.EMPTY=new Rt;var Pt;(function(e){e[e.NullValue=0]="NullValue",e[e.BooleanValue=1]="BooleanValue",e[e.NumberValue=2]="NumberValue",e[e.TimestampValue=3]="TimestampValue",e[e.StringValue=4]="StringValue",e[e.BlobValue=5]="BlobValue",e[e.RefValue=6]="RefValue",e[e.GeoPointValue=7]="GeoPointValue",e[e.ArrayValue=8]="ArrayValue",e[e.ObjectValue=9]="ObjectValue"})(Pt||(Pt={}));var Bt;(function(e){e[e.Default=0]="Default",e[e.Estimate=1]="Estimate",e[e.Previous=2]="Previous"})(Bt||(Bt={}));var Ft=function(){function e(e,t){this.serverTimestampBehavior=e,this.timestampsInSnapshots=t}return e.fromSnapshotOptions=function(t,n){switch(t.serverTimestamps){case"estimate":return new e(Bt.Estimate,n);case"previous":return new e(Bt.Previous,n);case"none":case void 0:return new e(Bt.Default,n);default:return d("fromSnapshotOptions() called with invalid options.");}},e}(),Ut=function(){function e(){}return e.prototype.toString=function(){var e=this.value();return null===e?"null":e.toString()},e.prototype.defaultCompareTo=function(e){c(this.typeOrder!==e.typeOrder,"Default compareTo should not be used for values of same type.");var t=z(this.typeOrder,e.typeOrder);return t},e}(),zt=function(e){function t(){var t=e.call(this)||this;return t.typeOrder=Pt.NullValue,t.internalValue=null,t}return lt.__extends(t,e),t.prototype.value=function(){return null},t.prototype.isEqual=function(e){return e instanceof t},t.prototype.compareTo=function(e){return e instanceof t?0:this.defaultCompareTo(e)},t.INSTANCE=new t,t}(Ut),jt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.BooleanValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue===e.internalValue},t.prototype.compareTo=function(e){return e instanceof t?z(this,e):this.defaultCompareTo(e)},t.of=function(e){return e?t.TRUE:t.FALSE},t.TRUE=new t(!0),t.FALSE=new t(!1),t}(Ut),qt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.NumberValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.compareTo=function(e){return e instanceof t?G(this.internalValue,e.internalValue):this.defaultCompareTo(e)},t}(Ut),Vt=function(e){function t(t){return e.call(this,t)||this}return lt.__extends(t,e),t.prototype.isEqual=function(e){return!!(e instanceof t)&&X(this.internalValue,e.internalValue)},t}(qt),Wt=function(e){function t(t){var n=e.call(this,t)||this;return n.internalValue=t,n}return lt.__extends(t,e),t.prototype.isEqual=function(e){return!!(e instanceof t)&&X(this.internalValue,e.internalValue)},t.NAN=new t(NaN),t.POSITIVE_INFINITY=new t(Infinity),t.NEGATIVE_INFINITY=new t(-Infinity),t}(qt),Ht=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.StringValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue===e.internalValue},t.prototype.compareTo=function(e){return e instanceof t?z(this.internalValue,e.internalValue):this.defaultCompareTo(e)},t}(Ut),Kt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.TimestampValue,n}return lt.__extends(t,e),t.prototype.value=function(e){return e&&e.timestampsInSnapshots?this.internalValue:this.internalValue.toDate()},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):e instanceof Gt?-1:this.defaultCompareTo(e)},t}(Ut),Gt=function(e){function t(t,n){var r=e.call(this)||this;return r.localWriteTime=t,r.previousValue=n,r.typeOrder=Pt.TimestampValue,r}return lt.__extends(t,e),t.prototype.value=function(e){return e&&e.serverTimestampBehavior===Bt.Estimate?new Kt(this.localWriteTime).value(e):e&&e.serverTimestampBehavior===Bt.Previous?this.previousValue?this.previousValue.value(e):null:null},t.prototype.isEqual=function(e){return e instanceof t&&this.localWriteTime.isEqual(e.localWriteTime)},t.prototype.compareTo=function(e){return e instanceof t?this.localWriteTime._compareTo(e.localWriteTime):e instanceof Kt?1:this.defaultCompareTo(e)},t.prototype.toString=function(){return"<ServerTimestamp localTime="+this.localWriteTime.toString()+">"},t}(Ut),Xt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.BlobValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):this.defaultCompareTo(e)},t}(Ut),Qt=function(e){function t(t,n){var r=e.call(this)||this;return r.databaseId=t,r.key=n,r.typeOrder=Pt.RefValue,r}return lt.__extends(t,e),t.prototype.value=function(){return this.key},t.prototype.isEqual=function(e){return!!(e instanceof t)&&this.key.isEqual(e.key)&&this.databaseId.isEqual(e.databaseId)},t.prototype.compareTo=function(e){if(e instanceof t){var n=this.databaseId.compareTo(e.databaseId);return 0===n?It.comparator(this.key,e.key):n}return this.defaultCompareTo(e)},t}(Ut),Yt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.GeoPointValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):this.defaultCompareTo(e)},t}(Ut),Jt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.ObjectValue,n}return lt.__extends(t,e),t.prototype.value=function(e){var t={};return this.internalValue.inorderTraversal(function(n,r){t[n]=r.value(e)}),t},t.prototype.forEach=function(e){this.internalValue.inorderTraversal(e)},t.prototype.isEqual=function(e){if(e instanceof t){for(var n=this.internalValue.getIterator(),r=e.internalValue.getIterator();n.hasNext()&&r.hasNext();){var o=n.getNext(),i=r.getNext();if(o.key!==i.key||!o.value.isEqual(i.value))return!1}return!n.hasNext()&&!r.hasNext()}return!1},t.prototype.compareTo=function(e){if(e instanceof t){for(var n=this.internalValue.getIterator(),r=e.internalValue.getIterator();n.hasNext()&&r.hasNext();){var o=n.getNext(),i=r.getNext(),s=z(o.key,i.key)||o.value.compareTo(i.value);if(s)return s}return z(n.hasNext(),r.hasNext())}return this.defaultCompareTo(e)},t.prototype.set=function(e,n){if(c(!e.isEmpty(),"Cannot set field for empty path on ObjectValue"),1===e.length)return this.setChild(e.firstSegment(),n);var r=this.child(e.firstSegment());r instanceof t||(r=t.EMPTY);var o=r.set(e.popFirst(),n);return this.setChild(e.firstSegment(),o)},t.prototype.delete=function(e){if(c(!e.isEmpty(),"Cannot delete field for empty path on ObjectValue"),1===e.length)return new t(this.internalValue.remove(e.firstSegment()));var n=this.child(e.firstSegment());if(n instanceof t){var r=n.delete(e.popFirst());return new t(this.internalValue.insert(e.firstSegment(),r))}return this},t.prototype.contains=function(e){return void 0!==this.field(e)},t.prototype.field=function(e){c(!e.isEmpty(),"Can't get field of empty path");var n=this;return e.forEach(function(e){n=n instanceof t?n.internalValue.get(e)||void 0:void 0}),n},t.prototype.toString=function(){return JSON.stringify(this.value())},t.prototype.child=function(e){return this.internalValue.get(e)||void 0},t.prototype.setChild=function(e,n){return new t(this.internalValue.insert(e,n))},t.EMPTY=new t(new Ot(z)),t}(Ut),$t=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.ArrayValue,n}return lt.__extends(t,e),t.prototype.value=function(e){return this.internalValue.map(function(t){return t.value(e)})},t.prototype.forEach=function(e){this.internalValue.forEach(e)},t.prototype.isEqual=function(e){if(e instanceof t){if(this.internalValue.length!==e.internalValue.length)return!1;for(var n=0;n<this.internalValue.length;n++)if(!this.internalValue[n].isEqual(e.internalValue[n]))return!1;return!0}return!1},t.prototype.compareTo=function(e){if(e instanceof t){for(var n=ot(this.internalValue.length,e.internalValue.length),r=0,o;r<n;r++)if(o=this.internalValue[r].compareTo(e.internalValue[r]),o)return o;return z(this.internalValue.length,e.internalValue.length)}return this.defaultCompareTo(e)},t.prototype.toString=function(){return JSON.stringify(this.value())},t}(Ut),Zt=Number,en=Zt.MIN_SAFE_INTEGER||-9007199254740991,tn=Zt.MAX_SAFE_INTEGER||9007199254740991,nn=Zt.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&nt(e)===e},rn=function(){function e(e,t,n,r,o,i){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=null),void 0===o&&(o=null),void 0===i&&(i=null),this.path=e,this.explicitOrderBy=t,this.filters=n,this.limit=r,this.startAt=o,this.endAt=i,this.memoizedCanonicalId=null,this.memoizedOrderBy=null,this.startAt&&this.assertValidBound(this.startAt),this.endAt&&this.assertValidBound(this.endAt)}return e.atPath=function(t){return new e(t)},Object.defineProperty(e.prototype,"orderBy",{get:function(){if(null===this.memoizedOrderBy){var e=this.getInequalityFilterField(),t=this.getFirstOrderByField();if(null!==e&&null===t)this.memoizedOrderBy=e.isKeyField()?[un]:[new cn(e),un];else{c(null===e||null!==t&&e.isEqual(t),"First orderBy should match inequality field."),this.memoizedOrderBy=[];for(var n=!1,r=0,o=this.explicitOrderBy,i;r<o.length;r++)i=o[r],this.memoizedOrderBy.push(i),i.field.isKeyField()&&(n=!0);if(!n){var s=0<this.explicitOrderBy.length?this.explicitOrderBy[this.explicitOrderBy.length-1].dir:dn.ASCENDING;this.memoizedOrderBy.push(s===dn.ASCENDING?un:hn)}}}return this.memoizedOrderBy},enumerable:!0,configurable:!0}),e.prototype.addFilter=function(t){c(null==this.getInequalityFilterField()||!(t instanceof an)||!t.isInequality()||t.field.isEqual(this.getInequalityFilterField()),"Query must only have one inequality field."),c(!It.isDocumentKey(this.path),"No filtering allowed for document query");var n=this.filters.concat([t]);return new e(this.path,this.explicitOrderBy.slice(),n,this.limit,this.startAt,this.endAt)},e.prototype.addOrderBy=function(t){c(!It.isDocumentKey(this.path),"No ordering allowed for document query"),c(!this.startAt&&!this.endAt,"Bounds must be set after orderBy");var n=this.explicitOrderBy.concat([t]);return new e(this.path,n,this.filters.slice(),this.limit,this.startAt,this.endAt)},e.prototype.withLimit=function(t){return new e(this.path,this.explicitOrderBy.slice(),this.filters.slice(),t,this.startAt,this.endAt)},e.prototype.withStartAt=function(t){return new e(this.path,this.explicitOrderBy.slice(),this.filters.slice(),this.limit,t,this.endAt)},e.prototype.withEndAt=function(t){return new e(this.path,this.explicitOrderBy.slice(),this.filters.slice(),this.limit,this.startAt,t)},e.prototype.canonicalId=function(){if(null===this.memoizedCanonicalId){var e=this.path.canonicalString();e+="|f:";for(var t=0,n=this.filters,r;t<n.length;t++)r=n[t],e+=r.canonicalId(),e+=",";e+="|ob:";for(var o=0,i=this.orderBy,s;o<i.length;o++)s=i[o],e+=s.canonicalId(),e+=",";Q(this.limit)||(e+="|l:",e+=this.limit),this.startAt&&(e+="|lb:",e+=this.startAt.canonicalId()),this.endAt&&(e+="|ub:",e+=this.endAt.canonicalId()),this.memoizedCanonicalId=e}return this.memoizedCanonicalId},e.prototype.toString=function(){var e="Query("+this.path.canonicalString();return 0<this.filters.length&&(e+=", filters: ["+this.filters.join(", ")+"]"),Q(this.limit)||(e+=", limit: "+this.limit),0<this.explicitOrderBy.length&&(e+=", orderBy: ["+this.explicitOrderBy.join(", ")+"]"),this.startAt&&(e+=", startAt: "+this.startAt.canonicalId()),this.endAt&&(e+=", endAt: "+this.endAt.canonicalId()),e+")"},e.prototype.isEqual=function(e){if(this.limit!==e.limit)return!1;if(this.orderBy.length!==e.orderBy.length)return!1;for(var t=0;t<this.orderBy.length;t++)if(!this.orderBy[t].isEqual(e.orderBy[t]))return!1;if(this.filters.length!==e.filters.length)return!1;for(var t=0;t<this.filters.length;t++)if(!this.filters[t].isEqual(e.filters[t]))return!1;return!!this.path.isEqual(e.path)&&(null===this.startAt?null===e.startAt:!!this.startAt.isEqual(e.startAt))&&(null===this.endAt?null===e.endAt:this.endAt.isEqual(e.endAt))},e.prototype.docComparator=function(e,t){for(var n=!1,r=0,o=this.orderBy;r<o.length;r++){var i=o[r],s=i.compare(e,t);if(0!==s)return s;n=n||i.field.isKeyField()}return c(n,"orderBy used that doesn't compare on key field"),0},e.prototype.matches=function(e){return this.matchesAncestor(e)&&this.matchesOrderBy(e)&&this.matchesFilters(e)&&this.matchesBounds(e)},e.prototype.hasLimit=function(){return!Q(this.limit)},e.prototype.getFirstOrderByField=function(){return 0<this.explicitOrderBy.length?this.explicitOrderBy[0].field:null},e.prototype.getInequalityFilterField=function(){for(var e=0,t=this.filters,n;e<t.length;e++)if(n=t[e],n instanceof an&&n.isInequality())return n.field;return null},e.prototype.hasArrayContainsFilter=function(){return void 0!==this.filters.find(function(e){return e instanceof an&&e.op===on.ARRAY_CONTAINS})},e.prototype.isDocumentQuery=function(){return It.isDocumentKey(this.path)&&0===this.filters.length},e.prototype.matchesAncestor=function(e){var t=e.key.path;return It.isDocumentKey(this.path)?this.path.isEqual(t):this.path.isPrefixOf(t)&&this.path.length===t.length-1},e.prototype.matchesOrderBy=function(e){for(var t=0,n=this.explicitOrderBy,r;t<n.length;t++)if(r=n[t],!r.field.isKeyField()&&void 0===e.field(r.field))return!1;return!0},e.prototype.matchesFilters=function(e){for(var t=0,n=this.filters,r;t<n.length;t++)if(r=n[t],!r.matches(e))return!1;return!0},e.prototype.matchesBounds=function(e){return this.startAt&&!this.startAt.sortsBeforeDocument(this.orderBy,e)?!1:this.endAt&&this.endAt.sortsBeforeDocument(this.orderBy,e)?!1:!0},e.prototype.assertValidBound=function(e){c(e.position.length<=this.orderBy.length,"Bound is longer than orderBy")},e}(),on=function(){function e(e){this.name=e}return e.fromString=function(t){return"<"===t?e.LESS_THAN:"<="===t?e.LESS_THAN_OR_EQUAL:"=="===t?e.EQUAL:">="===t?e.GREATER_THAN_OR_EQUAL:">"===t?e.GREATER_THAN:"array-contains"===t?e.ARRAY_CONTAINS:d("Unknown relation: "+t)},e.prototype.toString=function(){return this.name},e.prototype.isEqual=function(e){return this.name===e.name},e.LESS_THAN=new e("<"),e.LESS_THAN_OR_EQUAL=new e("<="),e.EQUAL=new e("=="),e.GREATER_THAN=new e(">"),e.GREATER_THAN_OR_EQUAL=new e(">="),e.ARRAY_CONTAINS=new e("array-contains"),e}(),an=function(){function e(e,t,n){this.field=e,this.op=t,this.value=n}return e.prototype.matches=function(e){if(this.field.isKeyField()){c(this.value instanceof Qt,"Comparing on key, but filter value not a RefValue"),c(this.op!==on.ARRAY_CONTAINS,"array-contains queries don't make sense on document keys.");var t=this.value,n=It.comparator(e.key,t.key);return this.matchesComparison(n)}var r=e.field(this.field);return void 0!==r&&this.matchesValue(r)},e.prototype.matchesValue=function(e){var t=this;return this.op===on.ARRAY_CONTAINS?e instanceof $t&&void 0!==e.internalValue.find(function(e){return e.isEqual(t.value)}):this.value.typeOrder===e.typeOrder&&this.matchesComparison(e.compareTo(this.value))},e.prototype.matchesComparison=function(e){switch(this.op){case on.LESS_THAN:return 0>e;case on.LESS_THAN_OR_EQUAL:return 0>=e;case on.EQUAL:return 0===e;case on.GREATER_THAN:return 0<e;case on.GREATER_THAN_OR_EQUAL:return 0<=e;default:return d("Unknown relation op"+this.op);}},e.prototype.isInequality=function(){return this.op!==on.EQUAL&&this.op!==on.ARRAY_CONTAINS},e.prototype.canonicalId=function(){return this.field.canonicalString()+this.op.toString()+this.value.toString()},e.prototype.isEqual=function(t){return!!(t instanceof e)&&this.op.isEqual(t.op)&&this.field.isEqual(t.field)&&this.value.isEqual(t.value)},e.prototype.toString=function(){return this.field.canonicalString()+" "+this.op+" "+this.value.value()},e}(),sn=function(){function e(e){this.field=e}return e.prototype.matches=function(e){var t=e.field(this.field);return void 0!==t&&null===t.value()},e.prototype.canonicalId=function(){return this.field.canonicalString()+" IS null"},e.prototype.toString=function(){return this.field.canonicalString()+" IS null"},e.prototype.isEqual=function(t){return!!(t instanceof e)&&this.field.isEqual(t.field)},e}(),ln=function(){function e(e){this.field=e}return e.prototype.matches=function(e){var t=e.field(this.field).value();return"number"==typeof t&&isNaN(t)},e.prototype.canonicalId=function(){return this.field.canonicalString()+" IS NaN"},e.prototype.toString=function(){return this.field.canonicalString()+" IS NaN"},e.prototype.isEqual=function(t){return!!(t instanceof e)&&this.field.isEqual(t.field)},e}(),dn=function(){function e(e){this.name=e}return e.prototype.toString=function(){return this.name},e.ASCENDING=new e("asc"),e.DESCENDING=new e("desc"),e}(),pn=function(){function e(e,t){this.position=e,this.before=t}return e.prototype.canonicalId=function(){for(var e=this.before?"b:":"a:",t=0,n=this.position,r;t<n.length;t++)r=n[t],e+=r.toString();return e},e.prototype.sortsBeforeDocument=function(e,t){c(this.position.length<=e.length,"Bound has more components than query's orderBy");for(var n=0,r=0;r<this.position.length;r++){var o=e[r],i=this.position[r];if(o.field.isKeyField())c(i instanceof Qt,"Bound has a non-key value where the key path is being used."),n=It.comparator(i.key,t.key);else{var s=t.field(o.field);c(void 0!==s,"Field should exist since document matched the orderBy already."),n=i.compareTo(s)}if(o.dir===dn.DESCENDING&&(n*=-1),0!==n)break}return this.before?0>=n:0>n},e.prototype.isEqual=function(e){if(null===e)return!1;if(this.before!==e.before||this.position.length!==e.position.length)return!1;for(var t=0;t<this.position.length;t++){var n=this.position[t],r=e.position[t];return n.isEqual(r)}return!0},e}(),cn=function(){function e(e,t){this.field=e,void 0===t&&(t=dn.ASCENDING),this.dir=t,this.isKeyOrderBy=e.isKeyField()}return e.prototype.compare=function(e,t){var n=this.isKeyOrderBy?Nt.compareByKey(e,t):Nt.compareByField(this.field,e,t);switch(this.dir){case dn.ASCENDING:return n;case dn.DESCENDING:return-1*n;default:return d("Unknown direction: "+this.dir);}},e.prototype.canonicalId=function(){return this.field.canonicalString()+this.dir.toString()},e.prototype.toString=function(){return this.field.canonicalString()+" ("+this.dir+")"},e.prototype.isEqual=function(e){return this.dir===e.dir&&this.field.isEqual(e.field)},e}(),un=new cn(At.keyField(),dn.ASCENDING),hn=new cn(At.keyField(),dn.DESCENDING),mn=function(){function e(e){this.timestamp=e}return e.fromMicroseconds=function(t){var n=nt(t/1e6);return new e(new vt(n,1e3*(t%1e6)))},e.fromTimestamp=function(t){return new e(t)},e.forDeletedDoc=function(){return e.MIN},e.prototype.compareTo=function(e){return this.timestamp._compareTo(e.timestamp)},e.prototype.isEqual=function(e){return this.timestamp.isEqual(e.timestamp)},e.prototype.toMicroseconds=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},e.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},e.prototype.toTimestamp=function(){return this.timestamp},e.MIN=new e(new vt(0,0)),e}(),gn;(function(e){e[e.Listen=0]="Listen",e[e.ExistenceFilterMismatch=1]="ExistenceFilterMismatch",e[e.LimboResolution=2]="LimboResolution"})(gn||(gn={}));var fn=function(){function e(e,t,n,r,o){void 0===r&&(r=mn.MIN),void 0===o&&(o=p()),this.query=e,this.targetId=t,this.purpose=n,this.snapshotVersion=r,this.resumeToken=o}return e.prototype.update=function(t){return new e(this.query,this.targetId,this.purpose,t.snapshotVersion,t.resumeToken)},e.prototype.isEqual=function(e){return this.targetId===e.targetId&&this.purpose===e.purpose&&this.snapshotVersion.isEqual(e.snapshotVersion)&&this.resumeToken===e.resumeToken&&this.query.isEqual(e.query)},e}(),yn=function(){function e(e){this.fields=e}return e.prototype.covers=function(e){for(var t=0,n=this.fields,r;t<n.length;t++)if(r=n[t],r.isPrefixOf(e))return!0;return!1},e.prototype.isEqual=function(e){return q(this.fields,e.fields)},e}(),bn=function(){function e(e,t){this.field=e,this.transform=t}return e.prototype.isEqual=function(e){return this.field.isEqual(e.field)&&this.transform.isEqual(e.transform)},e}(),xn=function(){return function(e,t){this.version=e,this.transformResults=t}}(),vn;(function(e){e[e.Set=0]="Set",e[e.Patch=1]="Patch",e[e.Transform=2]="Transform",e[e.Delete=3]="Delete"})(vn||(vn={}));var kn=function(){function e(e,t){this.updateTime=e,this.exists=t,c(void 0===e||void 0===t,"Precondition can specify \"exists\" or \"updateTime\" but not both")}return e.exists=function(t){return new e(void 0,t)},e.updateTime=function(t){return new e(t)},Object.defineProperty(e.prototype,"isNone",{get:function(){return void 0===this.updateTime&&void 0===this.exists},enumerable:!0,configurable:!0}),e.prototype.isValidFor=function(e){return void 0===this.updateTime?void 0===this.exists?(c(this.isNone,"Precondition should be empty"),!0):this.exists?e instanceof Nt:null===e||e instanceof Lt:e instanceof Nt&&e.version.isEqual(this.updateTime)},e.prototype.isEqual=function(e){return j(this.updateTime,e.updateTime)&&this.exists===e.exists},e.NONE=new e,e}(),Sn=function(){function e(){}return e.prototype.verifyKeyMatches=function(e){null!=e&&c(e.key.isEqual(this.key),"Can only apply a mutation to a document with the same key")},e.getPostMutationVersion=function(e){return e instanceof Nt?e.version:mn.MIN},e}(),wn=function(e){function t(t,n,r){var o=e.call(this)||this;return o.key=t,o.value=n,o.precondition=r,o.type=vn.Set,o}return lt.__extends(t,e),t.prototype.applyToRemoteDocument=function(e,t){this.verifyKeyMatches(e),c(null==t.transformResults,"Transform results received by SetMutation.");var n=Sn.getPostMutationVersion(e);return new Nt(this.key,n,this.value,{hasLocalMutations:!1})},t.prototype.applyToLocalView=function(e){if(this.verifyKeyMatches(e),!this.precondition.isValidFor(e))return e;var t=Sn.getPostMutationVersion(e);return new Nt(this.key,t,this.value,{hasLocalMutations:!0})},t.prototype.isEqual=function(e){return e instanceof t&&this.key.isEqual(e.key)&&this.value.isEqual(e.value)&&this.precondition.isEqual(e.precondition)},t}(Sn),Cn=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.key=t,i.data=n,i.fieldMask=r,i.precondition=o,i.type=vn.Patch,i}return lt.__extends(t,e),t.prototype.applyToRemoteDocument=function(e,t){if(this.verifyKeyMatches(e),c(null==t.transformResults,"Transform results received by PatchMutation."),!this.precondition.isValidFor(e))return e;var n=Sn.getPostMutationVersion(e),r=this.patchDocument(e);return new Nt(this.key,n,r,{hasLocalMutations:!1})},t.prototype.applyToLocalView=function(e){if(this.verifyKeyMatches(e),!this.precondition.isValidFor(e))return e;var t=Sn.getPostMutationVersion(e),n=this.patchDocument(e);return new Nt(this.key,t,n,{hasLocalMutations:!0})},t.prototype.isEqual=function(e){return e instanceof t&&this.key.isEqual(e.key)&&this.fieldMask.isEqual(e.fieldMask)&&this.precondition.isEqual(e.precondition)},t.prototype.patchDocument=function(e){var t;return t=e instanceof Nt?e.data:Jt.EMPTY,this.patchObject(t)},t.prototype.patchObject=function(e){for(var t=0,n=this.fieldMask.fields;t<n.length;t++){var r=n[t],o=this.data.field(r);e=void 0===o?e.delete(r):e.set(r,o)}return e},t}(Sn),Tn=function(e){function t(t,n){var r=e.call(this)||this;return r.key=t,r.fieldTransforms=n,r.type=vn.Transform,r.precondition=kn.exists(!0),r}return lt.__extends(t,e),t.prototype.applyToRemoteDocument=function(e,t){if(this.verifyKeyMatches(e),c(null!=t.transformResults,"Transform results missing for TransformMutation."),!this.precondition.isValidFor(e))return e;var n=this.requireDocument(e),r=this.serverTransformResults(e,t.transformResults),o=this.transformObject(n.data,r);return new Nt(this.key,n.version,o,{hasLocalMutations:!1})},t.prototype.applyToLocalView=function(e,t,n){if(this.verifyKeyMatches(e),!this.precondition.isValidFor(e))return e;var r=this.requireDocument(e),o=this.localTransformResults(n,t),i=this.transformObject(r.data,o);return new Nt(this.key,r.version,i,{hasLocalMutations:!0})},t.prototype.isEqual=function(e){return e instanceof t&&this.key.isEqual(e.key)&&q(this.fieldTransforms,e.fieldTransforms)&&this.precondition.isEqual(e.precondition)},t.prototype.requireDocument=function(e){c(e instanceof Nt,"Unknown MaybeDocument type "+e);var t=e;return c(t.key.isEqual(this.key),"Can only transform a document with the same key"),t},t.prototype.serverTransformResults=function(e,t){var n=[];c(this.fieldTransforms.length===t.length,"server transform result count ("+t.length+") "+("should match field transform count ("+this.fieldTransforms.length+")"));for(var r=0;r<t.length;r++){var o=this.fieldTransforms[r],i=o.transform,s=null;e instanceof Nt&&(s=e.field(o.field)||null),n.push(i.applyToRemoteDocument(s,t[r]))}return n},t.prototype.localTransformResults=function(e,t){for(var n=[],r=0,o=this.fieldTransforms;r<o.length;r++){var i=o[r],s=i.transform,l=null;t instanceof Nt&&(l=t.field(i.field)||null),n.push(s.applyToLocalView(l,e))}return n},t.prototype.transformObject=function(e,t){c(t.length===this.fieldTransforms.length,"TransformResults length mismatch.");for(var n=0;n<this.fieldTransforms.length;n++){var r=this.fieldTransforms[n],o=r.field;e=e.set(o,t[n])}return e},t}(Sn),_n=function(e){function t(t,n){var r=e.call(this)||this;return r.key=t,r.precondition=n,r.type=vn.Delete,r}return lt.__extends(t,e),t.prototype.applyToRemoteDocument=function(e,t){return this.verifyKeyMatches(e),c(null==t.transformResults,"Transform results received by DeleteMutation."),new Lt(this.key,mn.MIN)},t.prototype.applyToLocalView=function(e){return(this.verifyKeyMatches(e),!this.precondition.isValidFor(e))?e:(e&&c(e.key.isEqual(this.key),"Can only apply mutation to document with same key"),new Lt(this.key,mn.forDeletedDoc()))},t.prototype.isEqual=function(e){return e instanceof t&&this.key.isEqual(e.key)&&this.precondition.isEqual(e.precondition)},t}(Sn),En=function(){function e(e){this.count=e}return e.prototype.isEqual=function(e){return e&&e.count===this.count},e}(),An;(function(e){e[e.OK=0]="OK",e[e.CANCELLED=1]="CANCELLED",e[e.UNKNOWN=2]="UNKNOWN",e[e.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",e[e.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",e[e.NOT_FOUND=5]="NOT_FOUND",e[e.ALREADY_EXISTS=6]="ALREADY_EXISTS",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",e[e.ABORTED=10]="ABORTED",e[e.OUT_OF_RANGE=11]="OUT_OF_RANGE",e[e.UNIMPLEMENTED=12]="UNIMPLEMENTED",e[e.INTERNAL=13]="INTERNAL",e[e.UNAVAILABLE=14]="UNAVAILABLE",e[e.DATA_LOSS=15]="DATA_LOSS"})(An||(An={}));var In=function(){function e(e){this.comparator=e,this.data=new Ot(this.comparator)}return e.fromMapKeys=function(t){var n=new e(t.comparator);return t.forEach(function(e){n=n.add(e)}),n},e.prototype.has=function(e){return null!==this.data.get(e)},e.prototype.first=function(){return this.data.minKey()},e.prototype.last=function(){return this.data.maxKey()},Object.defineProperty(e.prototype,"size",{get:function(){return this.data.size},enumerable:!0,configurable:!0}),e.prototype.indexOf=function(e){return this.data.indexOf(e)},e.prototype.forEach=function(e){this.data.inorderTraversal(function(t){return e(t),!1})},e.prototype.forEachInRange=function(e,t){for(var n=this.data.getIteratorFrom(e[0]),r;n.hasNext();){if(r=n.getNext(),0<=this.comparator(r.key,e[1]))return;t(r.key)}},e.prototype.forEachWhile=function(e,t){var n;for(n=void 0===t?this.data.getIterator():this.data.getIteratorFrom(t);n.hasNext();){var r=n.getNext(),o=e(r.key);if(!o)return}},e.prototype.firstAfterOrEqual=function(e){var t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null},e.prototype.add=function(e){return this.copy(this.data.remove(e).insert(e,!0))},e.prototype.delete=function(e){return this.has(e)?this.copy(this.data.remove(e)):this},e.prototype.isEmpty=function(){return this.data.isEmpty()},e.prototype.unionWith=function(e){var t=this;return e.forEach(function(e){t=t.add(e)}),t},e.prototype.isEqual=function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.data.getIterator(),r=t.data.getIterator();n.hasNext();){var o=n.getNext().key,i=r.getNext().key;if(0!==this.comparator(o,i))return!1}return!0},e.prototype.toString=function(){var e=[];return this.forEach(function(t){return e.push(t)}),"SortedSet("+e.toString()+")"},e.prototype.copy=function(t){var n=new e(this.comparator);return n.data=t,n},e}(),Nn=new Ot(It.comparator),Ln=new Ot(It.comparator),On=new Ot(It.comparator),Mn=new In(It.comparator),Dn=function(){function e(e,t,n,r){this.snapshotVersion=e,this.targetChanges=t,this.documentUpdates=n,this.limboDocuments=r}return e.prototype.addDocumentUpdate=function(e){this.documentUpdates=this.documentUpdates.insert(e.key,e)},e.prototype.handleExistenceFilterMismatch=function(e){this.targetChanges[e]={mapping:new Bn,snapshotVersion:mn.MIN,currentStatusUpdate:Rn.MarkNotCurrent,resumeToken:p()}},e.prototype.synthesizeDeleteForLimboTargetChange=function(e,t){e.currentStatusUpdate!==Rn.MarkCurrent||this.documentUpdates.get(t)||(this.documentUpdates=this.documentUpdates.insert(t,new Lt(t,this.snapshotVersion)),this.limboDocuments=this.limboDocuments.add(t))},e}(),Rn;(function(e){e[e.None=0]="None",e[e.MarkNotCurrent=1]="MarkNotCurrent",e[e.MarkCurrent=2]="MarkCurrent"})(Rn||(Rn={}));var Pn=ie(),Bn=function(){function e(){this.docs=Pn}return Object.defineProperty(e.prototype,"documents",{get:function(){return this.docs},enumerable:!0,configurable:!0}),e.prototype.add=function(e){this.docs=this.docs.add(e)},e.prototype.delete=function(e){this.docs=this.docs.delete(e)},e.prototype.isEqual=function(e){return null!==e&&this.docs.isEqual(e.docs)},e.prototype.filterUpdates=function(){},e}(),Fn=function(){function e(){this.addedDocuments=Pn,this.removedDocuments=Pn}return e.prototype.applyToKeySet=function(e){var t=e;return this.addedDocuments.forEach(function(e){return t=t.add(e)}),this.removedDocuments.forEach(function(e){return t=t.delete(e)}),t},e.prototype.add=function(e){this.addedDocuments=this.addedDocuments.add(e),this.removedDocuments=this.removedDocuments.delete(e)},e.prototype.delete=function(e){this.addedDocuments=this.addedDocuments.delete(e),this.removedDocuments=this.removedDocuments.add(e)},e.prototype.isEqual=function(e){return null!==e&&this.addedDocuments.isEqual(e.addedDocuments)&&this.removedDocuments.isEqual(e.removedDocuments)},e.prototype.filterUpdates=function(e){var t=this.addedDocuments;this.addedDocuments.forEach(function(n){e.has(n)&&(t=t.delete(n))}),this.addedDocuments=t},e}(),Un=function(){return function(e,t,n,r){this.updatedTargetIds=e,this.removedTargetIds=t,this.key=n,this.newDoc=r}}(),zn=function(){return function(e,t){this.targetId=e,this.existenceFilter=t}}(),jn;(function(e){e[e.NoChange=0]="NoChange",e[e.Added=1]="Added",e[e.Removed=2]="Removed",e[e.Current=3]="Current",e[e.Reset=4]="Reset"})(jn||(jn={}));var qn=function(){return function(e,t,n,r){void 0===n&&(n=p()),void 0===r&&(r=null),this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r}}(),Vn=function(){function e(e,t,n){this.snapshotVersion=e,this.listenTargets=t,this.existenceFilters={},this.targetChanges={},this.documentUpdates=re(),this.frozen=!1,this.limboDocuments=ie(),this.pendingTargetResponses=b(n)}return e.prototype.add=function(e){c(!this.frozen,"Trying to modify frozen WatchChangeAggregator."),e instanceof Un?this.addDocumentChange(e):e instanceof qn?this.addTargetChange(e):e instanceof zn?this.addExistenceFilterChange(e):d("Unknown watch change: "+e)},e.prototype.addChanges=function(e){var t=this;c(!this.frozen,"Trying to modify frozen WatchChangeAggregator."),e.forEach(function(e){return t.add(e)})},e.prototype.createRemoteEvent=function(){var e=this,t=this.targetChanges;return g(this.targetChanges,function(n){e.isActiveTarget(n)||delete t[n]}),this.frozen=!0,new Dn(this.snapshotVersion,t,this.documentUpdates,this.limboDocuments)},e.prototype.ensureTargetChange=function(e){var t=this.targetChanges[e];return t||(t={currentStatusUpdate:Rn.None,snapshotVersion:this.snapshotVersion,mapping:new Fn,resumeToken:p()},this.targetChanges[e]=t),t},e.prototype.queryDataForActiveTarget=function(e){var t=this.listenTargets[e];return t&&!h(this.pendingTargetResponses,e)?t:null},e.prototype.isActiveTarget=function(e){return null!==this.queryDataForActiveTarget(e)},e.prototype.updateLimboDocuments=function(e,t,n){return!!n&&(this.documentUpdates.get(e)?t.purpose===gn.LimboResolution||(this.limboDocuments=this.limboDocuments.delete(e),!1):t.purpose===gn.LimboResolution&&(this.limboDocuments=this.limboDocuments.add(e),!0))},e.prototype.addDocumentChange=function(e){for(var t=!1,n=!0,r=0,o=e.updatedTargetIds;r<o.length;r++){var i=o[r],s=this.queryDataForActiveTarget(i);if(s){var l=this.ensureTargetChange(i);n=this.updateLimboDocuments(e.key,s,n),l.mapping.add(e.key),t=!0}}for(var d=0,p=e.removedTargetIds;d<p.length;d++){var i=p[d],s=this.queryDataForActiveTarget(i);if(s){var l=this.ensureTargetChange(i);n=this.updateLimboDocuments(e.key,s,n),l.mapping.delete(e.key),t=!0}}e.newDoc&&t&&(this.documentUpdates=this.documentUpdates.insert(e.key,e.newDoc))},e.prototype.addTargetChange=function(e){var t=this;e.targetIds.forEach(function(n){var r=t.ensureTargetChange(n);switch(e.state){case jn.NoChange:t.isActiveTarget(n)&&se(r,e.resumeToken);break;case jn.Added:t.recordTargetResponse(n),h(t.pendingTargetResponses,n)||(r.mapping=new Fn,r.currentStatusUpdate=Rn.None,delete t.existenceFilters[n]),se(r,e.resumeToken);break;case jn.Removed:t.recordTargetResponse(n),c(!e.cause,"WatchChangeAggregator does not handle errored targets");break;case jn.Current:t.isActiveTarget(n)&&(r.currentStatusUpdate=Rn.MarkCurrent,se(r,e.resumeToken));break;case jn.Reset:t.isActiveTarget(n)&&(r.mapping=new Bn,se(r,e.resumeToken));break;default:d("Unknown target watch change state: "+e.state);}})},e.prototype.recordTargetResponse=function(e){var t=(this.pendingTargetResponses[e]||0)-1;0==t?delete this.pendingTargetResponses[e]:this.pendingTargetResponses[e]=t},e.prototype.addExistenceFilterChange=function(e){this.isActiveTarget(e.targetId)&&(this.existenceFilters[e.targetId]=e.existenceFilter)},e}(),Wn=function(){function e(){}return e.prototype.applyToLocalView=function(e,t){return new Gt(t,e)},e.prototype.applyToRemoteDocument=function(e,t){return t},e.prototype.isEqual=function(t){return t instanceof e},e.instance=new e,e}(),Hn=function(){function e(e){this.elements=e}return e.prototype.applyToLocalView=function(e){return this.apply(e)},e.prototype.applyToRemoteDocument=function(e){return this.apply(e)},e.prototype.apply=function(e){for(var t=le(e),n=function(e){t.find(function(t){return t.isEqual(e)})||t.push(e)},r=0,o=this.elements,i;r<o.length;r++)i=o[r],n(i);return new $t(t)},e.prototype.isEqual=function(t){return t instanceof e&&q(t.elements,this.elements)},e}(),Kn=function(){function e(e){this.elements=e}return e.prototype.applyToLocalView=function(e){return this.apply(e)},e.prototype.applyToRemoteDocument=function(e){return this.apply(e)},e.prototype.apply=function(e){for(var t=le(e),n=function(e){t=t.filter(function(t){return!t.isEqual(e)})},r=0,o=this.elements,i;r<o.length;r++)i=o[r],n(i);return new $t(t)},e.prototype.isEqual=function(t){return t instanceof e&&q(t.elements,this.elements)},e}(),Gn=function(){var e={};return e[dn.ASCENDING.name]="ASCENDING",e[dn.DESCENDING.name]="DESCENDING",e}(),Xn=function(){var e={};return e[on.LESS_THAN.name]="LESS_THAN",e[on.LESS_THAN_OR_EQUAL.name]="LESS_THAN_OR_EQUAL",e[on.GREATER_THAN.name]="GREATER_THAN",e[on.GREATER_THAN_OR_EQUAL.name]="GREATER_THAN_OR_EQUAL",e[on.EQUAL.name]="EQUAL",e[on.ARRAY_CONTAINS.name]="ARRAY_CONTAINS",e}(),Qn=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/),Yn=function(){function e(e,t){this.databaseId=e,this.options=t}return e.prototype.emptyByteString=function(){return this.options.useProto3Json?"":new Uint8Array(0)},e.prototype.unsafeCastProtoByteString=function(e){return e},e.prototype.fromRpcStatus=function(e){var t=void 0===e.code?mt.UNKNOWN:ee(e.code);return new gt(t,e.message||"")},e.prototype.toInt32Value=function(e){return Q(e)?void 0:{value:e}},e.prototype.fromInt32Value=function(e){var t;return t="object"==typeof e?e.value:e,Q(t)?null:t},e.prototype.toTimestamp=function(e){return{seconds:e.seconds,nanos:e.nanoseconds}},e.prototype.fromTimestamp=function(e){if("string"==typeof e)return this.fromIso8601String(e);c(!!e,"Cannot deserialize null or undefined timestamp.");var t=pe(e.seconds||"0"),n=e.nanos||0;return new vt(t,n)},e.prototype.fromIso8601String=function(e){var t=0,n=Qn.exec(e);if(c(!!n,"invalid timestamp: "+e),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),t=+r}var o=new Date(e),i=nt(o.getTime()/1e3);return new vt(i,t)},e.prototype.toBytes=function(e){return this.options.useProto3Json?e.toBase64():this.unsafeCastProtoByteString(e.toUint8Array())},e.prototype.fromBlob=function(e){return"string"==typeof e?(c(this.options.useProto3Json,"Expected bytes to be passed in as Uint8Array, but got a string instead."),yt.fromBase64String(e)):(c(!this.options.useProto3Json,"Expected bytes to be passed in as string, but got something else instead."),yt.fromUint8Array(e))},e.prototype.toVersion=function(e){return this.toTimestamp(e.toTimestamp())},e.prototype.fromVersion=function(e){return c(!!e,"Trying to deserialize version that isn't set"),mn.fromTimestamp(this.fromTimestamp(e))},e.prototype.toResourceName=function(e,t){return this.fullyQualifiedPrefixPath(e).child("documents").child(t).canonicalString()},e.prototype.fromResourceName=function(e){var t=_t.fromString(e);return c(this.isValidResourceName(t),"Tried to deserialize invalid key "+t.toString()),t},e.prototype.toName=function(e){return this.toResourceName(this.databaseId,e.path)},e.prototype.fromName=function(e){var t=this.fromResourceName(e);return c(t.get(1)===this.databaseId.projectId,"Tried to deserialize key from different project: "+t.get(1)+" vs "+this.databaseId.projectId),c(!t.get(3)&&!this.databaseId.database||t.get(3)===this.databaseId.database,"Tried to deserialize key from different database: "+t.get(3)+" vs "+this.databaseId.database),new It(this.extractLocalPathFromResourceName(t))},e.prototype.toQueryPath=function(e){return 0===e.length?this.encodedDatabaseId:this.toResourceName(this.databaseId,e)},e.prototype.fromQueryPath=function(e){var t=this.fromResourceName(e);return 4===t.length?_t.EMPTY_PATH:this.extractLocalPathFromResourceName(t)},Object.defineProperty(e.prototype,"encodedDatabaseId",{get:function(){var e=new _t(["projects",this.databaseId.projectId,"databases",this.databaseId.database]);return e.canonicalString()},enumerable:!0,configurable:!0}),e.prototype.fullyQualifiedPrefixPath=function(e){return new _t(["projects",e.projectId,"databases",e.database])},e.prototype.extractLocalPathFromResourceName=function(e){return c(4<e.length&&"documents"===e.get(4),"tried to deserialize invalid key "+e.toString()),e.popFirst(5)},e.prototype.isValidResourceName=function(e){return 4<=e.length&&"projects"===e.get(0)&&"databases"===e.get(2)},e.prototype.toValue=function(e){if(e instanceof zt)return{nullValue:"NULL_VALUE"};if(e instanceof jt)return{booleanValue:e.value()};if(e instanceof Vt)return{integerValue:""+e.value()};if(e instanceof Wt){var t=e.value();if(this.options.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===Infinity)return{doubleValue:"Infinity"};if(t===-Infinity)return{doubleValue:"-Infinity"}}return{doubleValue:e.value()}}return e instanceof Ht?{stringValue:e.value()}:e instanceof Jt?{mapValue:this.toMapValue(e)}:e instanceof $t?{arrayValue:this.toArrayValue(e)}:e instanceof Kt?{timestampValue:this.toTimestamp(e.internalValue)}:e instanceof Yt?{geoPointValue:{latitude:e.value().latitude,longitude:e.value().longitude}}:e instanceof Xt?{bytesValue:this.toBytes(e.value())}:e instanceof Qt?{referenceValue:this.toResourceName(e.databaseId,e.key.path)}:d("Unknown FieldValue "+JSON.stringify(e))},e.prototype.fromValue=function(e){var t=this,n=e.value_type;if(ce(e,n,"nullValue"))return zt.INSTANCE;if(ce(e,n,"booleanValue"))return jt.of(e.booleanValue);if(ce(e,n,"integerValue"))return new Vt(pe(e.integerValue));if(ce(e,n,"doubleValue")){if(this.options.useProto3Json){if("NaN"===e.doubleValue)return Wt.NAN;if("Infinity"===e.doubleValue)return Wt.POSITIVE_INFINITY;if("-Infinity"===e.doubleValue)return Wt.NEGATIVE_INFINITY}return new Wt(e.doubleValue)}if(ce(e,n,"stringValue"))return new Ht(e.stringValue);if(ce(e,n,"mapValue"))return this.fromFields(e.mapValue.fields||{});if(ce(e,n,"arrayValue")){de(e.arrayValue,"arrayValue");var r=e.arrayValue.values||[];return new $t(r.map(function(e){return t.fromValue(e)}))}if(ce(e,n,"timestampValue"))return de(e.timestampValue,"timestampValue"),new Kt(this.fromTimestamp(e.timestampValue));if(ce(e,n,"geoPointValue")){de(e.geoPointValue,"geoPointValue");var o=e.geoPointValue.latitude||0,i=e.geoPointValue.longitude||0;return new Yt(new xt(o,i))}if(ce(e,n,"bytesValue")){de(e.bytesValue,"bytesValue");var s=this.fromBlob(e.bytesValue);return new Xt(s)}if(ce(e,n,"referenceValue")){de(e.referenceValue,"referenceValue");var l=this.fromResourceName(e.referenceValue),p=new wt(l.get(1),l.get(3)),c=new It(this.extractLocalPathFromResourceName(l));return new Qt(p,c)}return d("Unknown Value proto "+JSON.stringify(e))},e.prototype.toMutationDocument=function(e,t){return{name:this.toName(e),fields:this.toFields(t)}},e.prototype.toDocument=function(e){return c(!e.hasLocalMutations,"Can't serialize documents with mutations."),{name:this.toName(e.key),fields:this.toFields(e.data),updateTime:this.toTimestamp(e.version.toTimestamp())}},e.prototype.fromDocument=function(e){return new Nt(this.fromName(e.name),this.fromVersion(e.updateTime),this.fromFields(e.fields||{}),{hasLocalMutations:!1})},e.prototype.toFields=function(e){var t=this,n={};return e.forEach(function(e,r){n[e]=t.toValue(r)}),n},e.prototype.fromFields=function(e){var t=this,n=Jt.EMPTY;return f(e,function(e,r){n=n.set(new At([e]),t.fromValue(r))}),n},e.prototype.toMapValue=function(e){return{fields:this.toFields(e)}},e.prototype.toArrayValue=function(e){var t=this,n=[];return e.forEach(function(e){n.push(t.toValue(e))}),{values:n}},e.prototype.fromFound=function(e){c(!!e.found,"Tried to deserialize a found document from a missing document."),de(e.found.name,"doc.found.name"),de(e.found.updateTime,"doc.found.updateTime");var t=this.fromName(e.found.name),n=this.fromVersion(e.found.updateTime),r=this.fromFields(e.found.fields||{});return new Nt(t,n,r,{hasLocalMutations:!1})},e.prototype.fromMissing=function(e){c(!!e.missing,"Tried to deserialize a missing document from a found document."),c(!!e.readTime,"Tried to deserialize a missing document without a read time.");var t=this.fromName(e.missing),n=this.fromVersion(e.readTime);return new Lt(t,n)},e.prototype.fromMaybeDocument=function(e){var t=e.result;return ce(e,t,"found")?this.fromFound(e):ce(e,t,"missing")?this.fromMissing(e):d("invalid batch get response: "+JSON.stringify(e))},e.prototype.toWatchTargetChangeState=function(e){return e===jn.Added?"ADD":e===jn.Current?"CURRENT":e===jn.NoChange?"NO_CHANGE":e===jn.Removed?"REMOVE":e===jn.Reset?"RESET":d("Unknown WatchTargetChangeState: "+e)},e.prototype.toTestWatchChange=function(e){if(e instanceof zn)return{filter:{count:e.existenceFilter.count,targetId:e.targetId}};if(e instanceof Un){if(e.newDoc instanceof Nt){var t=e.newDoc;return{documentChange:{document:{name:this.toName(t.key),fields:this.toFields(t.data),updateTime:this.toVersion(t.version)},targetIds:e.updatedTargetIds,removedTargetIds:e.removedTargetIds}}}if(e.newDoc instanceof Lt){var t=e.newDoc;return{documentDelete:{document:this.toName(t.key),readTime:this.toVersion(t.version),removedTargetIds:e.removedTargetIds}}}if(null===e.newDoc)return{documentRemove:{document:this.toName(e.key),removedTargetIds:e.removedTargetIds}}}if(e instanceof qn){var n;return e.cause&&(n={code:te(e.cause.code),message:e.cause.message}),{targetChange:{targetChangeType:this.toWatchTargetChangeState(e.state),targetIds:e.targetIds,resumeToken:this.unsafeCastProtoByteString(e.resumeToken),cause:n}}}return d("Unrecognized watch change: "+JSON.stringify(e))},e.prototype.fromWatchChange=function(e){var t=e.response_type,n;if(ce(e,t,"targetChange")){de(e.targetChange,"targetChange");var r=this.fromWatchTargetChangeState(e.targetChange.targetChangeType||"NO_CHANGE"),o=e.targetChange.targetIds||[],i=e.targetChange.resumeToken||this.emptyByteString(),s=e.targetChange.cause,l=s&&this.fromRpcStatus(s);n=new qn(r,o,i,l||null)}else if(ce(e,t,"documentChange")){de(e.documentChange,"documentChange"),de(e.documentChange.document,"documentChange.name"),de(e.documentChange.document.name,"documentChange.document.name"),de(e.documentChange.document.updateTime,"documentChange.document.updateTime");var p=e.documentChange,c=this.fromName(p.document.name),u=this.fromVersion(p.document.updateTime),h=this.fromFields(p.document.fields||{}),m=new Nt(c,u,h,{hasLocalMutations:!1}),g=p.targetIds||[],f=p.removedTargetIds||[];n=new Un(g,f,m.key,m)}else if(ce(e,t,"documentDelete")){de(e.documentDelete,"documentDelete"),de(e.documentDelete.document,"documentDelete.document");var y=e.documentDelete,c=this.fromName(y.document),u=y.readTime?this.fromVersion(y.readTime):mn.forDeletedDoc(),m=new Lt(c,u),f=y.removedTargetIds||[];n=new Un([],f,m.key,m)}else if(ce(e,t,"documentRemove")){de(e.documentRemove,"documentRemove"),de(e.documentRemove.document,"documentRemove");var b=e.documentRemove,c=this.fromName(b.document),f=b.removedTargetIds||[];n=new Un([],f,c,null)}else if(ce(e,t,"filter")){de(e.filter,"filter"),de(e.filter.targetId,"filter.targetId");var x=e.filter,v=x.count||0,k=new En(v),S=x.targetId;n=new zn(S,k)}else return d("Unknown change type "+JSON.stringify(e));return n},e.prototype.fromWatchTargetChangeState=function(e){return"NO_CHANGE"===e?jn.NoChange:"ADD"===e?jn.Added:"REMOVE"===e?jn.Removed:"CURRENT"===e?jn.Current:"RESET"===e?jn.Reset:d("Got unexpected TargetChange.state: "+e)},e.prototype.versionFromListenResponse=function(e){var t=e.response_type;if(!ce(e,t,"targetChange"))return mn.MIN;var n=e.targetChange;return n.targetIds&&n.targetIds.length?mn.MIN:n.readTime?this.fromVersion(n.readTime):mn.MIN},e.prototype.toMutation=function(e){var t=this,n;if(e instanceof wn)n={update:this.toMutationDocument(e.key,e.value)};else if(e instanceof _n)n={delete:this.toName(e.key)};else if(e instanceof Cn)n={update:this.toMutationDocument(e.key,e.data),updateMask:this.toDocumentMask(e.fieldMask)};else if(e instanceof Tn)n={transform:{document:this.toName(e.key),fieldTransforms:e.fieldTransforms.map(function(e){return t.toFieldTransform(e)})}};else return d("Unknown mutation type "+e.type);return e.precondition.isNone||(n.currentDocument=this.toPrecondition(e.precondition)),n},e.prototype.fromMutation=function(e){var t=this,n=e.currentDocument?this.fromPrecondition(e.currentDocument):kn.NONE;if(e.update){de(e.update.name,"name");var r=this.fromName(e.update.name),o=this.fromFields(e.update.fields||{});if(e.updateMask){var i=this.fromDocumentMask(e.updateMask);return new Cn(r,o,i,n)}return new wn(r,o,n)}if(e.delete){var r=this.fromName(e.delete);return new _n(r,n)}if(e.transform){var r=this.fromName(e.transform.document),s=e.transform.fieldTransforms.map(function(e){return t.fromFieldTransform(e)});return c(!0===n.exists,"Transforms only support precondition \"exists == true\""),new Tn(r,s)}return d("unknown mutation proto: "+JSON.stringify(e))},e.prototype.toPrecondition=function(e){return c(!e.isNone,"Can't serialize an empty precondition"),void 0===e.updateTime?void 0===e.exists?d("Unknown precondition"):{exists:e.exists}:{updateTime:this.toVersion(e.updateTime)}},e.prototype.fromPrecondition=function(e){return void 0===e.updateTime?void 0===e.exists?kn.NONE:kn.exists(e.exists):kn.updateTime(this.fromVersion(e.updateTime))},e.prototype.fromWriteResult=function(e){var t=this,n=e.updateTime?this.fromVersion(e.updateTime):null,r=null;return e.transformResults&&0<e.transformResults.length&&(r=e.transformResults.map(function(e){return t.fromValue(e)})),new xn(n,r)},e.prototype.fromWriteResults=function(e){var t=this;return(e||[]).map(function(e){return t.fromWriteResult(e)})},e.prototype.toFieldTransform=function(e){var t=this,n=e.transform;return n instanceof Wn?{fieldPath:e.field.canonicalString(),setToServerValue:"REQUEST_TIME"}:n instanceof Hn?{fieldPath:e.field.canonicalString(),appendMissingElements:{values:n.elements.map(function(e){return t.toValue(e)})}}:n instanceof Kn?{fieldPath:e.field.canonicalString(),removeAllFromArray:{values:n.elements.map(function(e){return t.toValue(e)})}}:void d("Unknown transform: "+e.transform)},e.prototype.fromFieldTransform=function(e){var t=this,n=e.transform_type,r=null;if(ce(e,n,"setToServerValue"))c("REQUEST_TIME"===e.setToServerValue,"Unknown server value transform proto: "+JSON.stringify(e)),r=Wn.instance;else if(ce(e,n,"appendMissingElements")){var o=e.appendMissingElements.values||[];r=new Hn(o.map(function(e){return t.fromValue(e)}))}else if(ce(e,n,"removeAllFromArray")){var o=e.removeAllFromArray.values||[];r=new Kn(o.map(function(e){return t.fromValue(e)}))}else d("Unknown transform proto: "+JSON.stringify(e));var i=At.fromServerFormat(e.fieldPath);return new bn(i,r)},e.prototype.toDocumentsTarget=function(e){return{documents:[this.toQueryPath(e.path)]}},e.prototype.fromDocumentsTarget=function(e){var t=e.documents.length;c(1===t,"DocumentsTarget contained other than 1 document: "+t);var n=e.documents[0];return rn.atPath(this.fromQueryPath(n))},e.prototype.toQueryTarget=function(e){var t={structuredQuery:{}};if(e.path.isEmpty())t.parent=this.toQueryPath(_t.EMPTY_PATH);else{var n=e.path;c(0!=n.length%2,"Document queries with filters are not supported."),t.parent=this.toQueryPath(n.popLast()),t.structuredQuery.from=[{collectionId:n.lastSegment()}]}var r=this.toFilter(e.filters);r&&(t.structuredQuery.where=r);var o=this.toOrder(e.orderBy);o&&(t.structuredQuery.orderBy=o);var i=this.toInt32Value(e.limit);return void 0!==i&&(t.structuredQuery.limit=i),e.startAt&&(t.structuredQuery.startAt=this.toCursor(e.startAt)),e.endAt&&(t.structuredQuery.endAt=this.toCursor(e.endAt)),t},e.prototype.fromQueryTarget=function(e){var t=this.fromQueryPath(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0;if(0<r){c(1===r,"StructuredQuery.from with more than one collection is not supported.");var o=n.from[0];t=t.child(o.collectionId)}var i=[];n.where&&(i=this.fromFilter(n.where));var s=[];n.orderBy&&(s=this.fromOrder(n.orderBy));var l=null;n.limit&&(l=this.fromInt32Value(n.limit));var d=null;n.startAt&&(d=this.fromCursor(n.startAt));var p=null;return n.endAt&&(p=this.fromCursor(n.endAt)),new rn(t,s,i,l,d,p)},e.prototype.toListenRequestLabels=function(e){var t=this.toLabel(e.purpose);return null==t?null:{"goog-listen-tags":t}},e.prototype.toLabel=function(e){return e===gn.Listen?null:e===gn.ExistenceFilterMismatch?"existence-filter-mismatch":e===gn.LimboResolution?"limbo-document":d("Unrecognized query purpose: "+e)},e.prototype.toTarget=function(e){var t=e.query,n;return n=t.isDocumentQuery()?{documents:this.toDocumentsTarget(t)}:{query:this.toQueryTarget(t)},n.targetId=e.targetId,0<e.resumeToken.length&&(n.resumeToken=this.unsafeCastProtoByteString(e.resumeToken)),n},e.prototype.toFilter=function(e){var t=this;if(0!==e.length){var n=e.map(function(e){return e instanceof an?t.toRelationFilter(e):t.toUnaryFilter(e)});return 1===n.length?n[0]:{compositeFilter:{op:"AND",filters:n}}}},e.prototype.fromFilter=function(e){var t=this;return e?void 0===e.unaryFilter?void 0===e.fieldFilter?void 0===e.compositeFilter?d("Unknown filter: "+JSON.stringify(e)):e.compositeFilter.filters.map(function(e){return t.fromFilter(e)}).reduce(function(e,t){return e.concat(t)}):[this.fromRelationFilter(e)]:[this.fromUnaryFilter(e)]:[]},e.prototype.toOrder=function(e){var t=this;return 0===e.length?void 0:e.map(function(e){return t.toPropertyOrder(e)})},e.prototype.fromOrder=function(e){var t=this;return e.map(function(e){return t.fromPropertyOrder(e)})},e.prototype.toCursor=function(e){var t=this;return{before:e.before,values:e.position.map(function(e){return t.toValue(e)})}},e.prototype.fromCursor=function(e){var t=this,n=!!e.before,r=e.values.map(function(e){return t.fromValue(e)});return new pn(r,n)},e.prototype.toDirection=function(e){return Gn[e.name]},e.prototype.fromDirection=function(e){return"ASCENDING"===e?dn.ASCENDING:"DESCENDING"===e?dn.DESCENDING:void 0},e.prototype.toOperatorName=function(e){return Xn[e.name]},e.prototype.fromOperatorName=function(e){return"EQUAL"===e?on.EQUAL:"GREATER_THAN"===e?on.GREATER_THAN:"GREATER_THAN_OR_EQUAL"===e?on.GREATER_THAN_OR_EQUAL:"LESS_THAN"===e?on.LESS_THAN:"LESS_THAN_OR_EQUAL"===e?on.LESS_THAN_OR_EQUAL:"ARRAY_CONTAINS"===e?on.ARRAY_CONTAINS:"OPERATOR_UNSPECIFIED"===e?d("Unspecified relation"):d("Unknown relation")},e.prototype.toFieldPathReference=function(e){return{fieldPath:e.canonicalString()}},e.prototype.fromFieldPathReference=function(e){return At.fromServerFormat(e.fieldPath)},e.prototype.toPropertyOrder=function(e){return{field:this.toFieldPathReference(e.field),direction:this.toDirection(e.dir)}},e.prototype.fromPropertyOrder=function(e){return new cn(this.fromFieldPathReference(e.field),this.fromDirection(e.direction))},e.prototype.toRelationFilter=function(e){return e instanceof an?{fieldFilter:{field:this.toFieldPathReference(e.field),op:this.toOperatorName(e.op),value:this.toValue(e.value)}}:d("Unrecognized filter: "+JSON.stringify(e))},e.prototype.fromRelationFilter=function(e){return new an(this.fromFieldPathReference(e.fieldFilter.field),this.fromOperatorName(e.fieldFilter.op),this.fromValue(e.fieldFilter.value))},e.prototype.toUnaryFilter=function(e){return e instanceof ln?{unaryFilter:{field:this.toFieldPathReference(e.field),op:"IS_NAN"}}:e instanceof sn?{unaryFilter:{field:this.toFieldPathReference(e.field),op:"IS_NULL"}}:d("Unrecognized filter: "+JSON.stringify(e))},e.prototype.fromUnaryFilter=function(e){switch(e.unaryFilter.op){case"IS_NAN":var t=this.fromFieldPathReference(e.unaryFilter.field);return new ln(t);case"IS_NULL":var n=this.fromFieldPathReference(e.unaryFilter.field);return new sn(n);case"OPERATOR_UNSPECIFIED":return d("Unspecified filter");default:return d("Unknown filter");}},e.prototype.toDocumentMask=function(e){return{fieldPaths:e.fields.map(function(e){return e.canonicalString()})}},e.prototype.fromDocumentMask=function(e){var t=e.fieldPaths||[],n=t.map(function(e){return At.fromServerFormat(e)});return new yn(n)},e}(),Jn=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},$n="FirebaseError",Zn=Error.captureStackTrace,er=function(){return function(e,t){if(this.code=e,this.message=t,Zn)Zn(this,tr.prototype.create);else try{throw Error.apply(this,arguments)}catch(e){this.name=$n,Object.defineProperty(this,"stack",{get:function(){return e.stack}})}}}();er.prototype=Object.create(Error.prototype),er.prototype.constructor=er,er.prototype.name=$n;var tr=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return e.prototype.create=function(e,t){void 0===t&&(t={});var n=this.errors[e],r=this.service+"/"+e,o;o=void 0===n?"Error":n.replace(this.pattern,function(e,n){var r=t[n];return void 0===r?"<"+n+"?>":r.toString()}),o=this.serviceName+": "+o+" ("+r+").";var i=new er(r,o);for(var s in t)t.hasOwnProperty(s)&&"_"!==s.slice(-1)&&(i[s]=t[s]);return i},e}(),nr=function(){return function(){this.blockSize=-1}}(),rr=function(e){function t(){var t=e.call(this)||this;t.chain_=[],t.buf_=[],t.W_=[],t.pad_=[],t.inbuf_=0,t.total_=0,t.blockSize=64,t.pad_[0]=128;for(var n=1;n<t.blockSize;++n)t.pad_[n]=0;return t.reset(),t}return lt.__extends(t,e),t.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},t.prototype.compress_=function(n,r){r||(r=0);var o=this.W_;if("string"==typeof n)for(var s=0;16>s;s++)o[s]=n.charCodeAt(r)<<24|n.charCodeAt(r+1)<<16|n.charCodeAt(r+2)<<8|n.charCodeAt(r+3),r+=4;else for(var s=0;16>s;s++)o[s]=n[r]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],r+=4;for(var s=16,i;80>s;s++)i=o[s-3]^o[s-8]^o[s-14]^o[s-16],o[s]=4294967295&(i<<1|i>>>31);for(var t=this.chain_[0],l=this.chain_[1],p=this.chain_[2],c=this.chain_[3],d=this.chain_[4],s=0,e,u;80>s;s++){40>s?20>s?(e=c^l&(p^c),u=1518500249):(e=l^p^c,u=1859775393):60>s?(e=l&p|c&(l|p),u=2400959708):(e=l^p^c,u=3395469782);var i=4294967295&(t<<5|t>>>27)+e+d+u+o[s];d=c,c=p,p=4294967295&(l<<30|l>>>2),l=t,t=i}this.chain_[0]=4294967295&this.chain_[0]+t,this.chain_[1]=4294967295&this.chain_[1]+l,this.chain_[2]=4294967295&this.chain_[2]+p,this.chain_[3]=4294967295&this.chain_[3]+c,this.chain_[4]=4294967295&this.chain_[4]+d},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var r=t-this.blockSize,o=0,n=this.buf_,i=this.inbuf_;o<t;){if(0==i)for(;o<=r;)this.compress_(e,o),o+=this.blockSize;if("string"==typeof e){for(;o<t;)if(n[i]=e.charCodeAt(o),++i,++o,i==this.blockSize){this.compress_(n),i=0;break}}else for(;o<t;)if(n[i]=e[o],++i,++o,i==this.blockSize){this.compress_(n),i=0;break}}this.inbuf_=i,this.total_+=t}},t.prototype.digest=function(){var e=[],t=8*this.total_;56>this.inbuf_?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var r=this.blockSize-1;56<=r;r--)this.buf_[r]=255&t,t/=256;this.compress_(this.buf_);for(var o=0,r=0;5>r;r++)for(var n=24;0<=n;n-=8)e[o]=255&this.chain_[r]>>n,++o;return e},t}(nr),or=function(){function e(e){this.sendFn=e.sendFn,this.closeFn=e.closeFn}return e.prototype.onOpen=function(e){c(!this.wrappedOnOpen,"Called onOpen on stream twice!"),this.wrappedOnOpen=e},e.prototype.onClose=function(e){c(!this.wrappedOnClose,"Called onClose on stream twice!"),this.wrappedOnClose=e},e.prototype.onMessage=function(e){c(!this.wrappedOnMessage,"Called onMessage on stream twice!"),this.wrappedOnMessage=e},e.prototype.close=function(){this.closeFn()},e.prototype.send=function(e){this.sendFn(e)},e.prototype.callOnOpen=function(){c(void 0!==this.wrappedOnOpen,"Cannot call onOpen because no callback was set"),this.wrappedOnOpen()},e.prototype.callOnClose=function(e){c(void 0!==this.wrappedOnClose,"Cannot call onClose because no callback was set"),this.wrappedOnClose(e)},e.prototype.callOnMessage=function(e){c(void 0!==this.wrappedOnMessage,"Cannot call onMessage because no callback was set"),this.wrappedOnMessage(e)},e}(),ar="Connection",ir={BatchGetDocuments:"batchGet",Commit:"commit"},sr=function(){function e(e){this.databaseId=e.databaseId,this.pool=new dt.XhrIoPool;var t=e.ssl?"https":"http";this.baseUrl=t+"://"+e.host}return e.prototype.modifyHeadersForRequest=function(e,t){if(t)for(var n in t.authHeaders)t.authHeaders.hasOwnProperty(n)&&(e[n]=t.authHeaders[n]);e["X-Goog-Api-Client"]="gl-js/ fire/"+pt},e.prototype.invokeRPC=function(e,t,n){var r=this,o=this.makeUrl(e);return new Promise(function(s,l){r.pool.getObject(function(p){p.listenOnce(dt.EventType.COMPLETE,function(){try{switch(p.getLastErrorCode()){case dt.ErrorCode.NO_ERROR:var t=p.getResponseJson();i(ar,"XHR received:",JSON.stringify(t)),s(t);break;case dt.ErrorCode.TIMEOUT:i(ar,"RPC \""+e+"\" timed out"),l(new gt(mt.DEADLINE_EXCEEDED,"Request time out"));break;case dt.ErrorCode.HTTP_ERROR:var n=p.getStatus();i(ar,"RPC \""+e+"\" failed with status:",n,"response text:",p.getResponseText()),0<n?l(new gt(ne(n),"Server responded with status "+p.getStatusText())):(i(ar,"RPC \""+e+"\" failed"),l(new gt(mt.UNAVAILABLE,"Connection failed.")));break;default:d("RPC \""+e+"\" failed with unanticipated webchannel error "+p.getLastErrorCode()+": "+p.getLastError()+", giving up.");}}finally{i(ar,"RPC \""+e+"\" completed."),r.pool.releaseObject(p)}});var c=JSON.stringify(t);i(ar,"XHR sending: ",o+" "+c);var u={"Content-Type":"text/plain"};r.modifyHeadersForRequest(u,n),p.send(o,"POST",c,u,15)})})},e.prototype.invokeStreamingRPC=function(e,t,n){return this.invokeRPC(e,t,n)},e.prototype.openStream=function(e,t){var n=[this.baseUrl,"/","google.firestore.v1beta1.Firestore","/",e,"/channel"],r=dt.createWebChannelTransport(),o={backgroundChannelTest:!0,httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database},sendRawJson:!0,supportsCrossDomainXhr:!0};this.modifyHeadersForRequest(o.initMessageHeaders,t),Jn()||(o.httpHeadersOverwriteParam="$httpHeaders");var s=n.join("");i(ar,"Creating WebChannel: "+s+" "+o);var l=r.createWebChannel(s,o),d=!1,p=!1,u=new or({sendFn:function(e){p?i(ar,"Not sending because WebChannel is closed:",e):(!d&&(i(ar,"Opening WebChannel transport."),l.open(),d=!0),i(ar,"WebChannel sending:",e),l.send(e))},closeFn:function(){return l.close()}}),h=function(e,t){l.listen(e,function(e){try{t(e)}catch(t){setTimeout(function(){throw t},0)}})};return h(dt.WebChannel.EventType.OPEN,function(){p||i(ar,"WebChannel transport opened.")}),h(dt.WebChannel.EventType.CLOSE,function(){p||(p=!0,i(ar,"WebChannel transport closed"),u.callOnClose())}),h(dt.WebChannel.EventType.ERROR,function(e){p||(p=!0,i(ar,"WebChannel transport errored:",e),u.callOnClose(new gt(mt.UNAVAILABLE,"The operation could not be completed")))}),h(dt.WebChannel.EventType.MESSAGE,function(e){if(!p){var t=e.data[0];c(!!t,"Got a webchannel message without data.");var n=t.error||t[0]&&t[0].error;if(n){i(ar,"WebChannel received error:",n);var r=n.status,o=Z(r),s=n.message;void 0===o&&(o=mt.INTERNAL,s="Unknown error status: "+r+" with message "+n.message),p=!0,u.callOnClose(new gt(o,s)),l.close()}else i(ar,"WebChannel received:",t),u.callOnMessage(t)}}),setTimeout(function(){u.callOnOpen()},0),u},e.prototype.makeUrl=function(e){var t=ir[e];c(void 0!==t,"Unknown REST mapping for: "+e);var n=[this.baseUrl,"/","v1beta1","/projects/",this.databaseId.projectId,"/databases/",this.databaseId.database,"/documents",":",t];return n.join("")},e}(),lr=function(){function e(){this.emptyByteString="",this.base64Available="undefined"!=typeof atob}return e.prototype.loadConnection=function(e){return Promise.resolve(new sr(e))},e.prototype.newSerializer=function(e){return new Yn(e,{useProto3Json:!0})},e.prototype.formatJSON=function(e){return JSON.stringify(e)},e.prototype.atob=function(e){return atob(e)},e.prototype.btoa=function(e){return btoa(e)},e}();ht.setPlatform(new lr);var dr=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];S("FieldPath",e,"fieldNames",1);for(var n=0;n<e.length;++n)if(w("FieldPath","string",n,e[n]),0===e[n].length)throw new gt(mt.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new At(e)}return e.documentId=function(){return e._DOCUMENT_ID},e.prototype.isEqual=function(t){if(!(t instanceof e))throw B("isEqual","FieldPath",1,t);return this._internalPath.isEqual(t._internalPath)},e._DOCUMENT_ID=new e(At.keyField().canonicalString()),e}(),pr=/[~\*\/\[\]]/,cr;(function(e){e[e.Unknown=0]="Unknown",e[e.Online=1]="Online",e[e.Offline=2]="Offline"})(cr||(cr={}));var ur;(function(e){e[e.Added=0]="Added",e[e.Removed=1]="Removed",e[e.Modified=2]="Modified",e[e.Metadata=3]="Metadata"})(ur||(ur={}));var hr;(function(e){e[e.Local=0]="Local",e[e.Synced=1]="Synced"})(hr||(hr={}));var mr=function(){function e(){this.changeMap=new Ot(It.comparator)}return e.prototype.track=function(e){var t=e.doc.key,n=this.changeMap.get(t);return n?void(e.type!==ur.Added&&n.type===ur.Metadata?this.changeMap=this.changeMap.insert(t,e):e.type===ur.Metadata&&n.type!==ur.Removed?this.changeMap=this.changeMap.insert(t,{type:n.type,doc:e.doc}):e.type===ur.Modified&&n.type===ur.Modified?this.changeMap=this.changeMap.insert(t,{type:ur.Modified,doc:e.doc}):e.type===ur.Modified&&n.type===ur.Added?this.changeMap=this.changeMap.insert(t,{type:ur.Added,doc:e.doc}):e.type===ur.Removed&&n.type===ur.Added?this.changeMap=this.changeMap.remove(t):e.type===ur.Removed&&n.type===ur.Modified?this.changeMap=this.changeMap.insert(t,{type:ur.Removed,doc:n.doc}):e.type===ur.Added&&n.type===ur.Removed?this.changeMap=this.changeMap.insert(t,{type:ur.Modified,doc:e.doc}):d("unsupported combination of changes: "+JSON.stringify(e)+" after "+JSON.stringify(n))):void(this.changeMap=this.changeMap.insert(t,e))},e.prototype.getChanges=function(){var e=[];return this.changeMap.inorderTraversal(function(t,n){e.push(n)}),e},e}(),gr=function(){function e(e,t,n,r,o,i,s,l){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.fromCache=o,this.hasPendingWrites=i,this.syncStateChanged=s,this.excludesMetadataChanges=l}return e.prototype.isEqual=function(e){if(this.fromCache!==e.fromCache||this.hasPendingWrites!==e.hasPendingWrites||this.syncStateChanged!==e.syncStateChanged||!this.query.isEqual(e.query)||!this.docs.isEqual(e.docs)||!this.oldDocs.isEqual(e.oldDocs))return!1;var t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0},e}(),fr=function(){function e(e){this.comparator=e?function(t,n){return e(t,n)||It.comparator(t.key,n.key)}:function(e,t){return It.comparator(e.key,t.key)},this.keyedMap=oe(),this.sortedSet=new Ot(this.comparator)}return e.emptySet=function(t){return new e(t.comparator)},e.prototype.has=function(e){return null!=this.keyedMap.get(e)},e.prototype.get=function(e){return this.keyedMap.get(e)},e.prototype.first=function(){return this.sortedSet.minKey()},e.prototype.last=function(){return this.sortedSet.maxKey()},e.prototype.isEmpty=function(){return this.sortedSet.isEmpty()},e.prototype.indexOf=function(e){var t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1},Object.defineProperty(e.prototype,"size",{get:function(){return this.sortedSet.size},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e){this.sortedSet.inorderTraversal(function(t){return e(t),!1})},e.prototype.add=function(e){var t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))},e.prototype.delete=function(e){var t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this},e.prototype.isEqual=function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();n.hasNext();){var o=n.getNext().key,i=r.getNext().key;if(!o.isEqual(i))return!1}return!0},e.prototype.toString=function(){var e=[];return this.forEach(function(t){e.push(t.toString())}),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"},e.prototype.copy=function(t,n){var r=new e;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r},e}(),yr=function(){function e(e){this.mapKeyFn=e,this.inner={}}return e.prototype.get=function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n)for(var r=0,o=n;r<o.length;r++){var i=o[r],s=i[0],l=i[1];if(s.isEqual(e))return l}},e.prototype.has=function(e){return void 0!==this.get(e)},e.prototype.set=function(e,t){var n=this.mapKeyFn(e),r=this.inner[n];if(void 0===r)return void(this.inner[n]=[[e,t]]);for(var o=0;o<r.length;o++)if(r[o][0].isEqual(e))return void(r[o]=[e,t]);r.push([e,t])},e.prototype.delete=function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(n[r][0].isEqual(e))return 1===n.length?delete this.inner[t]:n.splice(r,1),!0;return!1},e.prototype.forEach=function(e){f(this.inner,function(t,n){for(var r=0,o=n;r<o.length;r++){var i=o[r],s=i[0],l=i[1];e(s,l)}})},e.prototype.isEmpty=function(){return y(this.inner)},e}(),br=function(){return function(){this.listeners=[]}}(),xr=function(){function e(e){this.syncEngine=e,this.queries=new yr(function(e){return e.canonicalId()}),this.onlineState=cr.Unknown,this.syncEngine.subscribe(this.onChange.bind(this),this.onError.bind(this))}return e.prototype.listen=function(e){var t=e.query,n=!1,r=this.queries.get(t);return r||(n=!0,r=new br,this.queries.set(t,r)),r.listeners.push(e),e.applyOnlineStateChange(this.onlineState),r.viewSnap&&e.onViewSnapshot(r.viewSnap),n?this.syncEngine.listen(t).then(function(e){return r.targetId=e,e}):Promise.resolve(r.targetId)},e.prototype.unlisten=function(e){return lt.__awaiter(this,void 0,void 0,function(){var t,n,r,o;return lt.__generator(this,function(){return t=e.query,n=!1,r=this.queries.get(t),r&&(o=r.listeners.indexOf(e),0<=o&&(r.listeners.splice(o,1),n=0===r.listeners.length)),n?(this.queries.delete(t),[2,this.syncEngine.unlisten(t)]):[2]})})},e.prototype.onChange=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t],o=r.query,i=this.queries.get(o);if(i){for(var s=0,l=i.listeners,d;s<l.length;s++)d=l[s],d.onViewSnapshot(r);i.viewSnap=r}}},e.prototype.onError=function(e,t){var n=this.queries.get(e);if(n)for(var r=0,o=n.listeners,i;r<o.length;r++)i=o[r],i.onError(t);this.queries.delete(e)},e.prototype.applyOnlineStateChange=function(e){this.onlineState=e,this.queries.forEach(function(t,n){for(var r=0,o=n.listeners,i;r<o.length;r++)i=o[r],i.applyOnlineStateChange(e)})},e}(),vr=function(){function e(e,t,n){this.query=e,this.queryObserver=t,this.raisedInitialEvent=!1,this.onlineState=cr.Unknown,this.options=n||{}}return e.prototype.onViewSnapshot=function(e){if(c(0<e.docChanges.length||e.syncStateChanged,"We got a new snapshot with no changes?"),!this.options.includeMetadataChanges){for(var t=[],n=0,r=e.docChanges,o;n<r.length;n++)o=r[n],o.type!==ur.Metadata&&t.push(o);e=new gr(e.query,e.docs,e.oldDocs,t,e.fromCache,e.hasPendingWrites,e.syncStateChanged,!0)}this.raisedInitialEvent?this.shouldRaiseEvent(e)&&this.queryObserver.next(e):this.shouldRaiseInitialEvent(e,this.onlineState)&&this.raiseInitialEvent(e),this.snap=e},e.prototype.onError=function(e){this.queryObserver.error(e)},e.prototype.applyOnlineStateChange=function(e){this.onlineState=e,this.snap&&!this.raisedInitialEvent&&this.shouldRaiseInitialEvent(this.snap,e)&&this.raiseInitialEvent(this.snap)},e.prototype.shouldRaiseInitialEvent=function(e,t){if(c(!this.raisedInitialEvent,"Determining whether to raise first event but already had first event"),!e.fromCache)return!0;var n=t!==cr.Offline;return this.options.waitForSyncWhenOnline&&n?(c(e.fromCache,"Waiting for sync, but snapshot is not from cache"),!1):!e.docs.isEmpty()||t===cr.Offline},e.prototype.shouldRaiseEvent=function(e){if(0<e.docChanges.length)return!0;var t=this.snap&&this.snap.hasPendingWrites!==e.hasPendingWrites;return(e.syncStateChanged||t)&&!0===this.options.includeMetadataChanges},e.prototype.raiseInitialEvent=function(t){c(!this.raisedInitialEvent,"Trying to raise initial events for second time"),t=new gr(t.query,t.docs,fr.emptySet(t.docs),e.getInitialViewChanges(t),t.fromCache,t.hasPendingWrites,!0,!1),this.raisedInitialEvent=!0,this.queryObserver.next(t)},e.getInitialViewChanges=function(e){var t=[];return e.docs.forEach(function(e){t.push({type:ur.Added,doc:e})}),t},e}(),kr=function(){function t(e){var t=this;this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(function(e){t.isDone=!0,t.result=e,t.nextCallback&&t.nextCallback(e)},function(e){t.isDone=!0,t.error=e,t.catchCallback&&t.catchCallback(e)})}return t.prototype.catch=function(e){return this.next(void 0,e)},t.prototype.next=function(e,n){var r=this;return this.callbackAttached&&d("Called next() or catch() twice for PersistencePromise"),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new t(function(t,o){r.nextCallback=function(n){r.wrapSuccess(e,n).next(t,o)},r.catchCallback=function(e){r.wrapFailure(n,e).next(t,o)}})},t.prototype.toPromise=function(){var e=this;return new Promise(function(t,n){e.next(t,n)})},t.prototype.wrapUserFunction=function(e){try{var n=e();return n instanceof t?n:t.resolve(n)}catch(n){return t.reject(n)}},t.prototype.wrapSuccess=function(e,n){return e?this.wrapUserFunction(function(){return e(n)}):t.resolve(n)},t.prototype.wrapFailure=function(e,n){return e?this.wrapUserFunction(function(){return e(n)}):t.reject(n)},t.resolve=function(e){return new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.waitFor=function(e){var n=e.length;if(0===n)return t.resolve();var r=0;return new t(function(t,o){for(var i=0,s=e,l;i<s.length;i++)l=s[i],l.next(function(){++r,r===n&&t()},function(e){return o(e)})})},t.map=function(e){for(var n=[],r=[],o=function(t){r[t]=e[t].next(function(e){n[t]=e})},s=0;s<e.length;++s)o(s);return t.waitFor(r).next(function(){return n})},t}(),Sr=function(){function e(){this.isEager=!0,this.sources=[],this.potentialGarbage=ie()}return e.prototype.addGarbageSource=function(e){this.sources.push(e),e.setGarbageCollector(this)},e.prototype.removeGarbageSource=function(e){this.sources.splice(this.sources.indexOf(e),1),e.setGarbageCollector(null)},e.prototype.addPotentialGarbageKey=function(e){this.potentialGarbage=this.potentialGarbage.add(e)},e.prototype.collectGarbage=function(e){var t=this,n=[],r=ie();return this.potentialGarbage.forEach(function(o){var i=t.documentHasAnyReferences(e,o);n.push(i.next(function(e){return e||(r=r.add(o)),kr.resolve()}))}),this.potentialGarbage=ie(),kr.waitFor(n).next(function(){return r})},e.prototype.documentHasAnyReferences=function(e,t){var n=kr.resolve(!1);return this.sources.map(function(n){return function(){return n.containsKey(e,t)}}).reduce(function(e,t){return e.next(function(e){return e?kr.resolve(!0):t()})},n)},e}(),wr=function(){function e(e,t,n){this.query=e,this.addedKeys=t,this.removedKeys=n}return e.fromSnapshot=function(t){for(var n=ie(),r=ie(),o=0,i=t.docChanges,s;o<i.length;o++)switch(s=i[o],s.type){case ur.Added:n=n.add(s.doc.key);break;case ur.Removed:r=r.add(s.doc.key);break;default:}return new e(t.query,n,r)},e}(),Cr=function(){function e(){this.refsByKey=new In(Tr.compareByKey),this.refsByTarget=new In(Tr.compareByTargetId),this.garbageCollector=null}return e.prototype.isEmpty=function(){return this.refsByKey.isEmpty()},e.prototype.addReference=function(e,t){var n=new Tr(e,t);this.refsByKey=this.refsByKey.add(n),this.refsByTarget=this.refsByTarget.add(n)},e.prototype.addReferences=function(e,t){var n=this;e.forEach(function(e){return n.addReference(e,t)})},e.prototype.removeReference=function(e,t){this.removeRef(new Tr(e,t))},e.prototype.removeReferences=function(e,t){var n=this;e.forEach(function(e){return n.removeReference(e,t)})},e.prototype.removeReferencesForId=function(e){var t=this,n=It.EMPTY,r=new Tr(n,e),o=new Tr(n,e+1);this.refsByTarget.forEachInRange([r,o],function(e){t.removeRef(e)})},e.prototype.removeAllReferences=function(){var e=this;this.refsByKey.forEach(function(t){return e.removeRef(t)})},e.prototype.removeRef=function(e){this.refsByKey=this.refsByKey.delete(e),this.refsByTarget=this.refsByTarget.delete(e),null!==this.garbageCollector&&this.garbageCollector.addPotentialGarbageKey(e.key)},e.prototype.referencesForId=function(e){var t=It.EMPTY,n=new Tr(t,e),r=new Tr(t,e+1),o=ie();return this.refsByTarget.forEachInRange([n,r],function(e){o=o.add(e.key)}),o},e.prototype.setGarbageCollector=function(e){this.garbageCollector=e},e.prototype.containsKey=function(e,t){var n=new Tr(t,0),r=this.refsByKey.firstAfterOrEqual(n);return kr.resolve(null!==r&&t.isEqual(r.key))},e}(),Tr=function(){function e(e,t){this.key=e,this.targetOrBatchId=t}return e.compareByKey=function(e,t){return It.comparator(e.key,t.key)||z(e.targetOrBatchId,t.targetOrBatchId)},e.compareByTargetId=function(e,t){return z(e.targetOrBatchId,t.targetOrBatchId)||It.comparator(e.key,t.key)},e}(),_r=1,Er;(function(e){e[e.LocalStore=0]="LocalStore",e[e.SyncEngine=1]="SyncEngine"})(Er||(Er={}));var Ar=function(){function e(e,t){void 0===t&&(t=0),this.generatorId=e;var n=t>>_r<<_r,r=t-n;this.previousId=r>=e?n|this.generatorId:(n|this.generatorId)-(1<<_r)}return e.prototype.next=function(){return this.previousId+=1<<_r,this.previousId},e.forLocalStore=function(t){return void 0===t&&(t=0),new e(Er.LocalStore,t)},e.forSyncEngine=function(){return new e(Er.SyncEngine)},e}(),Ir=function(){return function(e){this.key=e}}(),Nr=function(){return function(e){this.key=e}}(),Lr=function(){function e(e,t){this.query=e,this._syncedDocuments=t,this.syncState=null,this.current=!1,this.limboDocuments=ie(),this.mutatedKeys=ie(),this.documentSet=new fr(e.docComparator.bind(e))}return Object.defineProperty(e.prototype,"syncedDocuments",{get:function(){return this._syncedDocuments},enumerable:!0,configurable:!0}),e.prototype.computeDocChanges=function(e,t){var n=this,r=t?t.changeSet:new mr,o=t?t.documentSet:this.documentSet,i=t?t.mutatedKeys:this.mutatedKeys,s=o,l=!1,d=this.query.hasLimit()&&o.size===this.query.limit?o.last():null;if(e.inorderTraversal(function(e,t){var p=o.get(e),u=t instanceof Nt?t:null;if(u&&(c(e.isEqual(u.key),"Mismatching keys found in document changes: "+e+" != "+u.key),u=n.query.matches(u)?u:null),u?(s=s.add(u),i=u.hasLocalMutations?i.add(e):i.delete(e)):(s=s.delete(e),i=i.delete(e)),p&&u){var h=p.data.isEqual(u.data);h&&p.hasLocalMutations===u.hasLocalMutations||(h?r.track({type:ur.Metadata,doc:u}):r.track({type:ur.Modified,doc:u}),d&&0<n.query.docComparator(u,d)&&(l=!0))}else!p&&u?r.track({type:ur.Added,doc:u}):p&&!u&&(r.track({type:ur.Removed,doc:p}),d&&(l=!0))}),this.query.hasLimit())for(;s.size>this.query.limit;){var p=s.last();s=s.delete(p.key),r.track({type:ur.Removed,doc:p})}return c(!l||!t,"View was refilled using docs that themselves needed refilling."),{documentSet:s,changeSet:r,needsRefill:l,mutatedKeys:i}},e.prototype.applyChanges=function(e,t){var n=this;c(!e.needsRefill,"Cannot apply changes that need a refill");var r=this.documentSet;this.documentSet=e.documentSet,this.mutatedKeys=e.mutatedKeys;var o=e.changeSet.getChanges();o.sort(function(e,t){return he(e.type,t.type)||n.query.docComparator(e.doc,t.doc)}),this.applyTargetChange(t);var i=this.updateLimboDocuments(),s=0===this.limboDocuments.size&&this.current,l=s?hr.Synced:hr.Local,d=l!==this.syncState;if(this.syncState=l,0===o.length&&!d)return{limboChanges:i};var p=new gr(this.query,e.documentSet,r,o,l===hr.Local,!e.mutatedKeys.isEmpty(),d,!1);return{snapshot:p,limboChanges:i}},e.prototype.applyOnlineStateChange=function(e){return this.current&&e===cr.Offline?(this.current=!1,this.applyChanges({documentSet:this.documentSet,changeSet:new mr,mutatedKeys:this.mutatedKeys,needsRefill:!1})):{limboChanges:[]}},e.prototype.shouldBeInLimbo=function(e){return!this._syncedDocuments.has(e)&&!!this.documentSet.has(e)&&!this.documentSet.get(e).hasLocalMutations},e.prototype.applyTargetChange=function(e){if(e){var t=e.mapping;switch(t instanceof Bn?this._syncedDocuments=t.documents:t instanceof Fn&&(this._syncedDocuments=t.applyToKeySet(this._syncedDocuments)),e.currentStatusUpdate){case Rn.MarkCurrent:this.current=!0;break;case Rn.MarkNotCurrent:this.current=!1;break;case Rn.None:break;default:d("Unknown current status update: "+e.currentStatusUpdate);}}},e.prototype.updateLimboDocuments=function(){var e=this;if(!this.current)return[];var t=this.limboDocuments;this.limboDocuments=ie(),this.documentSet.forEach(function(t){e.shouldBeInLimbo(t.key)&&(e.limboDocuments=e.limboDocuments.add(t.key))});var n=[];return t.forEach(function(t){e.limboDocuments.has(t)||n.push(new Nr(t))}),this.limboDocuments.forEach(function(e){t.has(e)||n.push(new Ir(e))}),n},e}(),Or="SyncEngine",Mr=function(){return function(e,t,n,r){this.query=e,this.targetId=t,this.resumeToken=n,this.view=r}}(),Dr=function(){function e(e,t,n){this.localStore=e,this.remoteStore=t,this.currentUser=n,this.viewHandler=null,this.errorHandler=null,this.queryViewsByQuery=new yr(function(e){return e.canonicalId()}),this.queryViewsByTarget={},this.limboTargetsByKey=new Ot(It.comparator),this.limboKeysByTarget={},this.limboDocumentRefs=new Cr,this.limboCollector=new Sr,this.mutationUserCallbacks={},this.targetIdGenerator=Ar.forSyncEngine()}return e.prototype.subscribe=function(e,t){c(null!==e&&null!==t,"View and error handlers cannot be null"),c(null===this.viewHandler&&null===this.errorHandler,"SyncEngine already has a subscriber."),this.viewHandler=e,this.errorHandler=t,this.limboCollector.addGarbageSource(this.limboDocumentRefs)},e.prototype.listen=function(e){var t=this;return this.assertSubscribed("listen()"),c(!this.queryViewsByQuery.has(e),"We already listen to the query: "+e),this.localStore.allocateQuery(e).then(function(n){return t.localStore.executeQuery(e).then(function(r){return t.localStore.remoteDocumentKeys(n.targetId).then(function(o){var i=new Lr(e,o),s=i.computeDocChanges(r),l=i.applyChanges(s);c(0===l.limboChanges.length,"View returned limbo docs before target ack from the server."),c(!!l.snapshot,"applyChanges for new view should always return a snapshot");var d=new Mr(e,n.targetId,n.resumeToken,i);t.queryViewsByQuery.set(e,d),t.queryViewsByTarget[n.targetId]=d,t.viewHandler([l.snapshot]),t.remoteStore.listen(n)})}).then(function(){return n.targetId})})},e.prototype.unlisten=function(e){var t=this;this.assertSubscribed("unlisten()");var n=this.queryViewsByQuery.get(e);return c(!!n,"Trying to unlisten on query not found:"+e),this.localStore.releaseQuery(e).then(function(){return t.remoteStore.unlisten(n.targetId),t.removeAndCleanupQuery(n).then(function(){return t.localStore.collectGarbage()})})},e.prototype.write=function(e,t){var n=this;return this.assertSubscribed("write()"),this.localStore.localWrite(e).then(function(e){return n.addMutationCallback(e.batchId,t),n.emitNewSnapsAndNotifyLocalStore(e.changes)}).then(function(){return n.remoteStore.fillWritePipeline()})},e.prototype.wrapUpdateFunctionError=function(e){return e},e.prototype.runTransaction=function(e,t){var n=this;void 0===t&&(t=5),c(0<=t,"Got negative number of retries for transaction.");var r=this.remoteStore.createTransaction();return function(){try{var t=e(r);return!Q(t)&&t.catch&&t.then?t.catch(function(t){return Promise.reject(n.wrapUpdateFunctionError(t))}):Promise.reject(Error("Transaction callback must return a Promise"))}catch(t){return Promise.reject(n.wrapUpdateFunctionError(t))}}().then(function(o){return r.commit().then(function(){return o}).catch(function(r){return 0===t?Promise.reject(r):n.runTransaction(e,t-1)})})},e.prototype.applyRemoteEvent=function(e){var t=this;return this.assertSubscribed("applyRemoteEvent()"),g(e.targetChanges,function(n,r){var o=t.limboKeysByTarget[n];if(!o){var i=t.queryViewsByTarget[n];c(!!i,"Missing QueryView for non-limbo query: "+n),r.mapping.filterUpdates(i.view.syncedDocuments)}else e.synthesizeDeleteForLimboTargetChange(r,o)}),this.localStore.applyRemoteEvent(e).then(function(n){return t.emitNewSnapsAndNotifyLocalStore(n,e)})},e.prototype.applyOnlineStateChange=function(e){var t=[];this.queryViewsByQuery.forEach(function(n,r){var o=r.view.applyOnlineStateChange(e);c(0===o.limboChanges.length,"OnlineState should not affect limbo documents."),o.snapshot&&t.push(o.snapshot)}),this.viewHandler(t)},e.prototype.rejectListen=function(e,t){var n=this;this.assertSubscribed("rejectListens()");var r=this.limboKeysByTarget[e];if(r){this.limboTargetsByKey=this.limboTargetsByKey.remove(r),delete this.limboKeysByTarget[e];var o=new Ot(It.comparator);o=o.insert(r,new Lt(r,mn.forDeletedDoc()));var i=ie().add(r),s=new Dn(mn.MIN,{},o,i);return this.applyRemoteEvent(s)}var l=this.queryViewsByTarget[e];return c(!!l,"Unknown targetId: "+e),this.localStore.releaseQuery(l.query).then(function(){return n.removeAndCleanupQuery(l).then(function(){n.errorHandler(l.query,t)})})},e.prototype.applySuccessfulWrite=function(e){var t=this;return this.assertSubscribed("applySuccessfulWrite()"),this.processUserCallback(e.batch.batchId,null),this.localStore.acknowledgeBatch(e).then(function(e){return t.emitNewSnapsAndNotifyLocalStore(e)})},e.prototype.rejectFailedWrite=function(e,t){var n=this;return this.assertSubscribed("rejectFailedWrite()"),this.processUserCallback(e,t),this.localStore.rejectBatch(e).then(function(e){return n.emitNewSnapsAndNotifyLocalStore(e)})},e.prototype.addMutationCallback=function(e,t){var n=this.mutationUserCallbacks[this.currentUser.toKey()];n||(n=new Ot(z)),n=n.insert(e,t),this.mutationUserCallbacks[this.currentUser.toKey()]=n},e.prototype.processUserCallback=function(e,t){var n=this.mutationUserCallbacks[this.currentUser.toKey()];if(n){var r=n.get(e);r&&(c(e===n.minKey(),"Mutation callbacks processed out-of-order?"),t?r.reject(t):r.resolve(),n=n.remove(e)),this.mutationUserCallbacks[this.currentUser.toKey()]=n}},e.prototype.removeAndCleanupQuery=function(e){return this.queryViewsByQuery.delete(e.query),delete this.queryViewsByTarget[e.targetId],this.limboDocumentRefs.removeReferencesForId(e.targetId),this.gcLimboDocuments()},e.prototype.updateTrackedLimbos=function(e,t){for(var n=0,r=t,o;n<r.length;n++)o=r[n],o instanceof Ir?(this.limboDocumentRefs.addReference(o.key,e),this.trackLimboChange(o)):o instanceof Nr?(i(Or,"Document no longer in limbo: "+o.key),this.limboDocumentRefs.removeReference(o.key,e)):d("Unknown limbo change: "+JSON.stringify(o));return this.gcLimboDocuments()},e.prototype.trackLimboChange=function(e){var t=e.key;if(!this.limboTargetsByKey.get(t)){i(Or,"New document in limbo: "+t);var n=this.targetIdGenerator.next(),r=rn.atPath(t.path);this.limboKeysByTarget[n]=t,this.remoteStore.listen(new fn(r,n,gn.Listen)),this.limboTargetsByKey=this.limboTargetsByKey.insert(t,n)}},e.prototype.gcLimboDocuments=function(){var e=this;return this.limboCollector.collectGarbage(null).next(function(t){t.forEach(function(t){var n=e.limboTargetsByKey.get(t);null===n||(e.remoteStore.unlisten(n),e.limboTargetsByKey=e.limboTargetsByKey.remove(t),delete e.limboKeysByTarget[n])})}).toPromise()},e.prototype.currentLimboDocs=function(){return this.limboTargetsByKey},e.prototype.emitNewSnapsAndNotifyLocalStore=function(e,t){var n=this,r=[],o=[],i=[];return this.queryViewsByQuery.forEach(function(s,l){i.push(Promise.resolve().then(function(){var t=l.view.computeDocChanges(e);return t.needsRefill?n.localStore.executeQuery(l.query).then(function(e){return l.view.computeDocChanges(e,t)}):t}).then(function(e){var i=t&&t.targetChanges[l.targetId],s=l.view.applyChanges(e,i);return n.updateTrackedLimbos(l.targetId,s.limboChanges).then(function(){if(s.snapshot){r.push(s.snapshot);var e=wr.fromSnapshot(s.snapshot);o.push(e)}})}))}),Promise.all(i).then(function(){return n.viewHandler(r),n.localStore.notifyLocalViewChanges(o)}).then(function(){return n.localStore.collectGarbage()})},e.prototype.assertSubscribed=function(e){c(null!==this.viewHandler&&null!==this.errorHandler,"Trying to call "+e+" before calling subscribe().")},e.prototype.handleUserChange=function(e){var t=this;return this.currentUser=e,this.localStore.handleUserChange(e).then(function(e){return t.emitNewSnapsAndNotifyLocalStore(e)}).then(function(){return t.remoteStore.handleUserChange(e)})},e}(),Rr=-1,Pr=function(){function e(e,t,n){this.batchId=e,this.localWriteTime=t,this.mutations=n}return e.prototype.applyToRemoteDocument=function(e,t,n){t&&c(t.key.isEqual(e),"applyToRemoteDocument: key "+e+" should match maybeDoc key\n "+t.key);var r=n.mutationResults;c(r.length===this.mutations.length,"Mismatch between mutations length\n ("+this.mutations.length+") and mutation results length\n ("+r.length+").");for(var o=0,i;o<this.mutations.length;o++)if(i=this.mutations[o],i.key.isEqual(e)){var s=r[o];t=i.applyToRemoteDocument(t,s)}return t},e.prototype.applyToLocalView=function(e,t){t&&c(t.key.isEqual(e),"applyToLocalDocument: key "+e+" should match maybeDoc key\n "+t.key);for(var n=t,r=0,o;r<this.mutations.length;r++)o=this.mutations[r],o.key.isEqual(e)&&(t=o.applyToLocalView(t,n,this.localWriteTime));return t},e.prototype.keys=function(){for(var e=ie(),t=0,n=this.mutations,r;t<n.length;t++)r=n[t],e=e.add(r.key);return e},e.prototype.isEqual=function(e){return this.batchId===e.batchId&&q(this.mutations,e.mutations)},e.prototype.isTombstone=function(){return 0===this.mutations.length},e.prototype.toTombstone=function(){return new e(this.batchId,this.localWriteTime,[])},e}(),Br=function(){function e(e,t,n,r,o){this.batch=e,this.commitVersion=t,this.mutationResults=n,this.streamToken=r,this.docVersions=o}return e.from=function(t,n,r,o){c(t.mutations.length===r.length,"Mutations sent "+t.mutations.length+" must equal results received "+r.length);for(var s=ae(),l=t.mutations,d=0,i;d<l.length;d++)i=r[d].version,null===i&&(i=n),s=s.insert(l[d].key,i);return new e(t,n,r,o,s)},e}(),Fr="\x01",Ur="\x01",zr="\x10",jr="\x11",qr=2,Vr=function(){return function(e,t){this.seconds=e,this.nanoseconds=t}}(),Wr=function(){function e(e,t){this.ownerId=e,this.leaseTimestampMs=t}return e.store="owner",e}(),Hr=function(){function e(e,t,n){this.userId=e,this.lastAcknowledgedBatchId=t,this.lastStreamToken=n}return e.store="mutationQueues",e.keyPath="userId",e}(),Kr=function(){function e(e,t,n,r){this.userId=e,this.batchId=t,this.localWriteTimeMs=n,this.mutations=r}return e.store="mutations",e.keyPath=["userId","batchId"],e}(),Gr=function(){function e(){}return e.prefixForUser=function(e){return[e]},e.prefixForPath=function(e,t){return[e,me(t)]},e.key=function(e,t,n){return[e,me(t),n]},e.store="documentMutations",e.PLACEHOLDER=new e,e}(),Xr=function(){return function(e,t){this.path=e,this.readTime=t}}(),Qr=function(){function e(e,t){this.noDocument=e,this.document=t}return e.store="remoteDocuments",e}(),Yr=function(){function e(e,t,n,r,o,i){this.targetId=e,this.canonicalId=t,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=o,this.query=i}return e.store="targets",e.keyPath="targetId",e.queryTargetsIndexName="queryTargetsIndex",e.queryTargetsKeyPath=["canonicalId","targetId"],e}(),Jr=function(){function e(e,t){this.targetId=e,this.path=t}return e.store="targetDocuments",e.keyPath=["targetId","path"],e.documentTargetsIndex="documentTargetsIndex",e.documentTargetsKeyPath=["path","targetId"],e}(),$r=function(){function e(e,t,n,r){this.highestTargetId=e,this.highestListenSequenceNumber=t,this.lastRemoteSnapshotVersion=n,this.targetCount=r}return e.key="targetGlobalKey",e.store="targetGlobal",e}(),Zr=[Hr.store,Kr.store,Gr.store,Qr.store,Yr.store,Wr.store,$r.store,Jr.store],eo=function(){return function(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})}}(),to="SimpleDb",no=function(){function e(e){this.db=e}return e.openOrCreate=function(t,n,r){return c(e.isAvailable(),"IndexedDB not supported in current environment."),i(to,"Opening database:",t),new kr(function(o,s){var l=window.indexedDB.open(t,n);l.onsuccess=function(t){var n=t.target.result;o(new e(n))},l.onerror=function(e){s(e.target.error)},l.onupgradeneeded=function(e){i(to,"Database \""+t+"\" requires upgrade from version:",e.oldVersion);var n=e.target.result,o=new oo(l.transaction);r(n,o,e.oldVersion,qr).next(function(){i(to,"Database upgrade to version "+qr+" complete")})}}).toPromise()},e.delete=function(e){return i(to,"Removing database:",e),Te(window.indexedDB.deleteDatabase(e)).toPromise()},e.isAvailable=function(){if("undefined"==typeof window||null==window.indexedDB)return!1;if(void 0===window.navigator)return"YES"===process.env.USE_MOCK_PERSISTENCE;var e=window.navigator.userAgent;return 0<e.indexOf("MSIE ")||0<e.indexOf("Trident/")||0<e.indexOf("Edge/")?!1:!0},e.prototype.runTransaction=function(e,t,n){var r=oo.open(this.db,e,t),o=n(r).catch(function(e){r.abort(e)}).toPromise();return r.completionPromise.then(function(){return o})},e.prototype.close=function(){this.db.close()},e}(),ro=function(){function e(e){this.dbCursor=e,this.shouldStop=!1,this.nextKey=null}return Object.defineProperty(e.prototype,"isDone",{get:function(){return this.shouldStop},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skipToKey",{get:function(){return this.nextKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cursor",{set:function(e){this.dbCursor=e},enumerable:!0,configurable:!0}),e.prototype.done=function(){this.shouldStop=!0},e.prototype.skip=function(e){this.nextKey=e},e.prototype.delete=function(){return Te(this.dbCursor.delete())},e}(),oo=function(){function e(e){var t=this;this.transaction=e,this.aborted=!1,this.completionDeferred=new eo,this.transaction.oncomplete=function(){t.completionDeferred.resolve()},this.transaction.onabort=function(){e.error?t.completionDeferred.reject(e.error):t.completionDeferred.resolve()},this.transaction.onerror=function(e){t.completionDeferred.reject(e.target.error)}}return e.open=function(t,n,r){return new e(t.transaction(r,n))},Object.defineProperty(e.prototype,"completionPromise",{get:function(){return this.completionDeferred.promise},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){e&&this.completionDeferred.reject(e),this.aborted||(i(to,"Aborting transaction: %s",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},e.prototype.store=function(e){var t=this.transaction.objectStore(e);return c(!!t,"Object store not part of transaction: "+e),new ao(t)},e}(),ao=function(){function e(e){this.store=e}return e.prototype.put=function(e,t){var n;return void 0===t?(i(to,"PUT",this.store.name,"<auto-key>",e),n=this.store.put(e)):(i(to,"PUT",this.store.name,e,t),n=this.store.put(t,e)),Te(n)},e.prototype.get=function(e){var t=this,n=this.store.get(e);return Te(n).next(function(n){return void 0===n&&(n=null),i(to,"GET",t.store.name,e,n),n})},e.prototype.delete=function(e){i(to,"DELETE",this.store.name,e);var t=this.store.delete(e);return Te(t)},e.prototype.count=function(){i(to,"COUNT",this.store.name);var e=this.store.count();return Te(e)},e.prototype.loadAll=function(e,t){var n=this.cursor(this.options(e,t)),r=[];return this.iterateCursor(n,function(e,t){r.push(t)}).next(function(){return r})},e.prototype.deleteAll=function(e,t){i(to,"DELETE ALL",this.store.name);var n=this.options(e,t);n.keysOnly=!1;var r=this.cursor(n);return this.iterateCursor(r,function(e,t,n){return n.delete()})},e.prototype.iterate=function(e,t){var n;t?n=e:(n={},t=e);var r=this.cursor(n);return this.iterateCursor(r,t)},e.prototype.iterateCursor=function(e,t){var n=[];return new kr(function(r,o){e.onerror=function(e){o(e.target.error)},e.onsuccess=function(e){var o=e.target.result;if(!o)return void r();var i=new ro(o),s=t(o.primaryKey,o.value,i);s instanceof kr&&n.push(s),i.isDone?r():null===i.skipToKey?o.continue():o.continue(i.skipToKey)}}).next(function(){return kr.waitFor(n)})},e.prototype.options=function(e,t){var n;return void 0!==e&&("string"==typeof e?n=e:(c(void 0===t,"3rd argument must not be defined if 2nd is a range."),t=e)),{index:n,range:t}},e.prototype.cursor=function(e){var t="next";if(e.reverse&&(t="prev"),e.index){var n=this.store.index(e.index);return e.keysOnly?n.openKeyCursor(e.range,t):n.openCursor(e.range,t)}return this.store.openCursor(e.range,t)},e}(),io=function(){function e(e,t){this.userId=e,this.serializer=t,this.garbageCollector=null}return e.forUser=function(t,n){c(""!==t.uid,"UserID must not be an empty string.");var r=t.isAuthenticated()?t.uid:"";return new e(r,n)},e.prototype.start=function(t){var n=this;return e.loadNextBatchIdFromDb(t).next(function(e){return n.nextBatchId=e,Ie(t).get(n.userId)}).next(function(e){return e||(e=new Hr(n.userId,Rr,"")),n.metadata=e,n.metadata.lastAcknowledgedBatchId>=n.nextBatchId?n.checkEmpty(t).next(function(e){return c(e,"Reset nextBatchID is only possible when the queue is empty"),n.metadata.lastAcknowledgedBatchId=Rr,Ie(t).put(n.metadata)}):kr.resolve()})},e.loadNextBatchIdFromDb=function(e){var t=Rr;return Ee(e).iterate({reverse:!0},function(e,n,r){var o=e[0],i=e[1];if(i>t&&(t=n.batchId),""===o)r.done();else{var s=V(o);r.skip([s])}}).next(function(){return t+1})},e.prototype.checkEmpty=function(e){var t=!0,n=IDBKeyRange.bound(this.keyForBatchId(Number.NEGATIVE_INFINITY),this.keyForBatchId(Number.POSITIVE_INFINITY));return Ee(e).iterate({range:n},function(e,n,r){t=!1,r.done()}).next(function(){return t})},e.prototype.getNextBatchId=function(){return kr.resolve(this.nextBatchId)},e.prototype.getHighestAcknowledgedBatchId=function(){return kr.resolve(this.metadata.lastAcknowledgedBatchId)},e.prototype.acknowledgeBatch=function(e,t,n){var r=t.batchId;return c(r>this.metadata.lastAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order"),this.metadata.lastAcknowledgedBatchId=r,this.metadata.lastStreamToken=_e(n),Ie(e).put(this.metadata)},e.prototype.getLastStreamToken=function(){return kr.resolve(this.metadata.lastStreamToken)},e.prototype.setLastStreamToken=function(e,t){return this.metadata.lastStreamToken=_e(t),Ie(e).put(this.metadata)},e.prototype.addMutationBatch=function(e,t,n){var r=this,o=this.nextBatchId;this.nextBatchId++;var i=new Pr(o,t,n),s=this.serializer.toDbMutationBatch(this.userId,i);return Ee(e).put(s).next(function(){for(var t=[],i=0,s=n;i<s.length;i++){var l=s[i],d=Gr.key(r.userId,l.key.path,o);t.push(Ae(e).put(d,Gr.PLACEHOLDER))}return kr.waitFor(t)}).next(function(){return i})},e.prototype.lookupMutationBatch=function(e,t){var n=this;return Ee(e).get(this.keyForBatchId(t)).next(function(e){return e?n.serializer.fromDbMutationBatch(e):null})},e.prototype.getNextMutationBatchAfterBatchId=function(e,t){var n=this,r=at(t,this.metadata.lastAcknowledgedBatchId)+1,o=IDBKeyRange.lowerBound(this.keyForBatchId(r)),i=null;return Ee(e).iterate({range:o},function(e,t,o){t.userId===n.userId&&(c(t.batchId>=r,"Should have found mutation after "+r),i=n.serializer.fromDbMutationBatch(t)),o.done()}).next(function(){return i})},e.prototype.getAllMutationBatches=function(e){var t=this,n=IDBKeyRange.bound(this.keyForBatchId(Rr),this.keyForBatchId(Number.POSITIVE_INFINITY));return Ee(e).loadAll(n).next(function(e){return e.map(function(e){return t.serializer.fromDbMutationBatch(e)})})},e.prototype.getAllMutationBatchesThroughBatchId=function(e,t){var n=this,r=IDBKeyRange.bound(this.keyForBatchId(Rr),this.keyForBatchId(t));return Ee(e).loadAll(r).next(function(e){return e.map(function(e){return n.serializer.fromDbMutationBatch(e)})})},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,r=Gr.prefixForPath(this.userId,t.path),o=IDBKeyRange.lowerBound(r),i=[];return Ae(e).iterate({range:o},function(r,o,s){var l=r[0],p=r[1],c=r[2],u=ye(p);if(l!==n.userId||!t.path.isEqual(u))return void s.done();var h=n.keyForBatchId(c);return Ee(e).get(h).next(function(e){null===e&&d("Dangling document-mutation reference found: "+r+" which points to "+h),i.push(n.serializer.fromDbMutationBatch(e))})}).next(function(){return i})},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){var n=this;c(!t.isDocumentQuery(),"Document queries shouldn't go down this path");var r=t.path,o=r.length+1,i=Gr.prefixForPath(this.userId,r),s=IDBKeyRange.lowerBound(i),l=new In(z);return Ae(e).iterate({range:s},function(e,t,i){var s=e[0],d=e[1],p=e[2],c=ye(d);return s===n.userId&&r.isPrefixOf(c)?void(c.length!==o||(l=l.add(p))):void i.done()}).next(function(){var t=[],r=[];return l.forEach(function(o){var i=n.keyForBatchId(o);r.push(Ee(e).get(i).next(function(e){null===e&&d("Dangling document-mutation reference found, which points to "+i),t.push(n.serializer.fromDbMutationBatch(e))}))}),kr.waitFor(r).next(function(){return t})})},e.prototype.removeMutationBatches=function(e,t){for(var n=Ee(e),r=Ae(e),o=[],i=function(e){var t=IDBKeyRange.only(s.keyForBatchId(e.batchId)),i=0,l=n.iterate({range:t},function(e,t,n){return i++,n.delete()});o.push(l.next(function(){c(1==i,"Dangling document-mutation reference found: Missing batch "+e.batchId)}));for(var d=0,p=e.mutations;d<p.length;d++){var u=p[d],h=Gr.key(s.userId,u.key.path,e.batchId);o.push(r.delete(h)),null!==s.garbageCollector&&s.garbageCollector.addPotentialGarbageKey(u.key)}},s=this,l=0,d=t,p;l<d.length;l++)p=d[l],i(p);return kr.waitFor(o)},e.prototype.performConsistencyCheck=function(e){var t=this;return this.checkEmpty(e).next(function(n){if(!n)return kr.resolve();var r=IDBKeyRange.lowerBound(Gr.prefixForUser(t.userId)),o=[];return Ae(e).iterate({range:r},function(e,n,r){var i=e[0];if(i!==t.userId)return void r.done();var s=ye(e[1]);o.push(s)}).next(function(){c(0===o.length,"Document leak -- detected dangling mutation references when queue is empty. Dangling keys: "+o.map(function(e){return e.canonicalString()}))})})},e.prototype.setGarbageCollector=function(e){this.garbageCollector=e},e.prototype.containsKey=function(e,t){var n=this,r=Gr.prefixForPath(this.userId,t.path),o=r[1],i=IDBKeyRange.lowerBound(r),s=!1;return Ae(e).iterate({range:i,keysOnly:!0},function(e,t,r){var i=e[0],l=e[1],d=e[2];i===n.userId&&l===o&&(s=!0),r.done()}).next(function(){return s})},e.prototype.keyForBatchId=function(e){return[this.userId,e]},e}(),so=function(){function e(e){this.serializer=e,this.lastRemoteSnapshotVersion=mn.MIN,this.metadata=null,this.garbageCollector=null}return e.prototype.start=function(e){var t=this;return Oe(e).get($r.key).next(function(e){c(null!==e,"Missing metadata row that should be added by schema migration."),t.metadata=e;var n=e.lastRemoteSnapshotVersion;return t.lastRemoteSnapshotVersion=mn.fromTimestamp(new vt(n.seconds,n.nanoseconds)),kr.resolve()})},e.prototype.getHighestTargetId=function(){return this.metadata.highestTargetId},e.prototype.getLastRemoteSnapshotVersion=function(){return this.lastRemoteSnapshotVersion},e.prototype.setLastRemoteSnapshotVersion=function(e,t){return this.lastRemoteSnapshotVersion=t,this.metadata.lastRemoteSnapshotVersion=t.toTimestamp(),Oe(e).put($r.key,this.metadata)},e.prototype.addQueryData=function(e,t){var n=this;return this.saveQueryData(e,t).next(function(){return n.metadata.targetCount+=1,n.updateMetadataFromQueryData(t),n.saveMetadata(e)})},e.prototype.updateQueryData=function(e,t){var n=this;return this.saveQueryData(e,t).next(function(){return n.updateMetadataFromQueryData(t)?n.saveMetadata(e):kr.resolve()})},e.prototype.removeQueryData=function(e,t){var n=this;return c(0<this.metadata.targetCount,"Removing from an empty query cache"),this.removeMatchingKeysForTargetId(e,t.targetId).next(function(){return Le(e).delete(t.targetId)}).next(function(){return n.metadata.targetCount-=1,n.saveMetadata(e)})},e.prototype.saveMetadata=function(e){return Oe(e).put($r.key,this.metadata)},e.prototype.saveQueryData=function(e,t){return Le(e).put(this.serializer.toDbTarget(t))},e.prototype.updateMetadataFromQueryData=function(e){var t=!1;return e.targetId>this.metadata.highestTargetId&&(this.metadata.highestTargetId=e.targetId,t=!0),t},Object.defineProperty(e.prototype,"count",{get:function(){return this.metadata.targetCount},enumerable:!0,configurable:!0}),e.prototype.getQueryData=function(e,t){var n=this,r=t.canonicalId(),o=IDBKeyRange.bound([r,Number.NEGATIVE_INFINITY],[r,tt]),i=null;return Le(e).iterate({range:o,index:Yr.queryTargetsIndexName},function(e,r,o){var s=n.serializer.fromDbTarget(r);t.isEqual(s.query)&&(i=s,o.done())}).next(function(){return i})},e.prototype.addMatchingKeys=function(e,t,n){var r=[],o=Me(e);return t.forEach(function(e){var t=me(e.path);r.push(o.put(new Jr(n,t)))}),kr.waitFor(r)},e.prototype.removeMatchingKeys=function(e,t,n){var r=this,o=[],i=Me(e);return t.forEach(function(e){var t=me(e.path);o.push(i.delete([n,t])),null!==r.garbageCollector&&r.garbageCollector.addPotentialGarbageKey(e)}),kr.waitFor(o)},e.prototype.removeMatchingKeysForTargetId=function(e,t){var n=Me(e),r=IDBKeyRange.bound([t],[t+1],!1,!0);return this.notifyGCForRemovedKeys(e,r).next(function(){return n.delete(r)})},e.prototype.notifyGCForRemovedKeys=function(e,t){var n=this,r=Me(e);return null!==this.garbageCollector&&this.garbageCollector.isEager?r.iterate({range:t,keysOnly:!0},function(e){var t=ye(e[1]),r=new It(t);c(null!==n.garbageCollector,"GarbageCollector for query cache set to null during key removal."),n.garbageCollector.addPotentialGarbageKey(r)}):kr.resolve()},e.prototype.getMatchingKeysForTargetId=function(e,t){var n=IDBKeyRange.bound([t],[t+1],!1,!0),r=Me(e),o=ie();return r.iterate({range:n,keysOnly:!0},function(e){var t=ye(e[1]),n=new It(t);o=o.add(n)}).next(function(){return o})},e.prototype.setGarbageCollector=function(e){this.garbageCollector=e},e.prototype.containsKey=function(e,t){c(null!==e,"Persistence Transaction cannot be null for query cache containsKey");var n=me(t.path),r=IDBKeyRange.bound([n],[W(n)],!1,!0),o=0;return Me(e).iterate({index:Jr.documentTargetsIndex,keysOnly:!0,range:r},function(e,t,n){o++,n.done()}).next(function(){return 0<o})},e}(),lo=function(){function e(e){this.serializer=e}return e.prototype.addEntry=function(e,t){return Re(e).put(Pe(t.key),this.serializer.toDbRemoteDocument(t))},e.prototype.removeEntry=function(e,t){return Re(e).delete(Pe(t))},e.prototype.getEntry=function(e,t){var n=this;return Re(e).get(Pe(t)).next(function(e){return e?n.serializer.fromDbRemoteDocument(e):null})},e.prototype.getDocumentsMatchingQuery=function(e,t){var n=this,r=oe(),o=t.path.toArray(),i=IDBKeyRange.lowerBound(o);return Re(e).iterate({range:i},function(e,o,i){var s=n.serializer.fromDbRemoteDocument(o);t.path.isPrefixOf(s.key.path)?s instanceof Nt&&t.matches(s)&&(r=r.insert(s.key,s)):i.done()}).next(function(){return r})},e}(),po=function(){function e(e){this.remoteSerializer=e}return e.prototype.fromDbRemoteDocument=function(e){if(e.document)return this.remoteSerializer.fromDocument(e.document);if(e.noDocument){var t=It.fromSegments(e.noDocument.path),n=e.noDocument.readTime,r=new vt(n.seconds,n.nanoseconds);return new Lt(t,mn.fromTimestamp(r))}return d("Unexpected DbRemoteDocument")},e.prototype.toDbRemoteDocument=function(e){if(e instanceof Nt){var t=this.remoteSerializer.toDocument(e);return new Qr(null,t)}var n=e.key.path.toArray(),r=e.version.toTimestamp(),o=new Vr(r.seconds,r.nanoseconds);return new Qr(new Xr(n,o),null)},e.prototype.toDbMutationBatch=function(e,t){var n=this,r=t.mutations.map(function(e){return n.remoteSerializer.toMutation(e)});return new Kr(e,t.batchId,t.localWriteTime.toMillis(),r)},e.prototype.fromDbMutationBatch=function(e){var t=this,n=e.mutations.map(function(e){return t.remoteSerializer.fromMutation(e)}),r=vt.fromMillis(e.localWriteTimeMs);return new Pr(e.batchId,r,n)},e.prototype.fromDbTarget=function(e){var t=new vt(e.readTime.seconds,e.readTime.nanoseconds),n=mn.fromTimestamp(t),r;return r=Be(e.query)?this.remoteSerializer.fromDocumentsTarget(e.query):this.remoteSerializer.fromQueryTarget(e.query),new fn(r,e.targetId,gn.Listen,n,e.resumeToken)},e.prototype.toDbTarget=function(e){c(gn.Listen===e.purpose,"Only queries with purpose "+gn.Listen+" may be stored, got "+e.purpose);var t=e.snapshotVersion.toTimestamp(),n=new Vr(t.seconds,t.nanoseconds),r;r=e.query.isDocumentQuery()?this.remoteSerializer.toDocumentsTarget(e.query):this.remoteSerializer.toQueryTarget(e.query);var o;return e.resumeToken instanceof Uint8Array?(c("YES"===process.env.USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence ."),o=e.resumeToken.toString()):o=e.resumeToken,new Yr(e.targetId,e.query.canonicalId(),n,o,0,r)},e}(),co="IndexedDbPersistence",uo="There is another tab open with offline persistence enabled. Only one such tab is allowed at a time. The other tab must be closed or persistence must be disabled.",ho=function(){function e(t,n){this.ownerId=this.generateOwnerId(),this.dbName=t+e.MAIN_DATABASE,this.serializer=new po(n),this.localStoragePrefix=t}return e.prototype.start=function(){var t=this;return e.isAvailable()?(c(!this.started,"IndexedDbPersistence double-started!"),this.started=!0,no.openOrCreate(this.dbName,qr,be).then(function(e){t.simpleDb=e}).then(function(){return t.tryAcquireOwnerLease()}).then(function(){t.scheduleOwnerLeaseRefreshes(),t.attachWindowUnloadHook()})):(this.persistenceError=new gt(mt.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled."),Promise.reject(this.persistenceError))},e.prototype.shutdown=function(e){var t=this;return c(this.started,"IndexedDbPersistence shutdown without start!"),this.started=!1,this.detachWindowUnloadHook(),this.stopOwnerLeaseRefreshes(),this.releaseOwnerLease().then(function(){if(t.simpleDb.close(),e)return no.delete(t.dbName)})},e.prototype.getMutationQueue=function(e){return io.forUser(e,this.serializer)},e.prototype.getQueryCache=function(){return new so(this.serializer)},e.prototype.getRemoteDocumentCache=function(){return new lo(this.serializer)},e.prototype.runTransaction=function(e,t){var n=this;return this.persistenceError?Promise.reject(this.persistenceError):(i(co,"Starting transaction:",e),this.simpleDb.runTransaction("readwrite",Zr,function(e){return n.ensureOwnerLease(e).next(function(){return t(e)})}))},e.isAvailable=function(){return no.isAvailable()},e.buildStoragePrefix=function(e){var t=e.databaseId.projectId;return e.databaseId.isDefaultDatabase||(t+="."+e.databaseId.database),"firestore/"+e.persistenceKey+"/"+t+"/"},e.prototype.tryAcquireOwnerLease=function(){var e=this;return this.simpleDb.runTransaction("readwrite",[Wr.store],function(t){var n=t.store(Wr.store);return n.get("owner").next(function(t){if(!e.validOwner(t)){var r=new Wr(e.ownerId,Date.now());return i(co,"No valid owner. Acquiring owner lease. Current owner:",t,"New owner:",r),n.put("owner",r)}return i(co,"Valid owner already. Failing. Current owner:",t),e.persistenceError=new gt(mt.FAILED_PRECONDITION,uo),kr.reject(e.persistenceError)})})},e.prototype.releaseOwnerLease=function(){var e=this;return this.simpleDb.runTransaction("readwrite",[Wr.store],function(t){var n=t.store(Wr.store);return n.get("owner").next(function(t){return null!==t&&t.ownerId===e.ownerId?(i(co,"Releasing owner lease."),n.delete("owner")):kr.resolve()})})},e.prototype.ensureOwnerLease=function(e){var t=this,n=e.store(Wr.store);return n.get("owner").next(function(e){return null===e||e.ownerId!==t.ownerId?(t.persistenceError=new gt(mt.FAILED_PRECONDITION,uo),kr.reject(t.persistenceError)):kr.resolve()})},e.prototype.validOwner=function(e){var t=Date.now();return null!==e&&!(e.leaseTimestampMs<t-5e3)&&(e.leaseTimestampMs>t?(s("Persistence owner-lease is in the future. Discarding.",e),!1):e.ownerId!==this.getZombiedOwnerId())},e.prototype.scheduleOwnerLeaseRefreshes=function(){var e=this;this.ownerLeaseRefreshHandle=setInterval(function(){var t=e.runTransaction("Refresh owner timestamp",function(t){var n=t.store(Wr.store);return n.put("owner",new Wr(e.ownerId,Date.now()))});t.catch(function(t){s(t),e.stopOwnerLeaseRefreshes()})},4e3)},e.prototype.stopOwnerLeaseRefreshes=function(){this.ownerLeaseRefreshHandle&&(clearInterval(this.ownerLeaseRefreshHandle),this.ownerLeaseRefreshHandle=null)},e.prototype.attachWindowUnloadHook=function(){var e=this;"object"==typeof window&&"function"==typeof window.addEventListener&&(this.windowUnloadHandler=function(){e.setZombiedOwnerId(e.ownerId),e.shutdown()},window.addEventListener("unload",this.windowUnloadHandler))},e.prototype.detachWindowUnloadHook=function(){this.windowUnloadHandler&&(c("object"==typeof window&&"function"==typeof window.removeEventListener,"Expected 'window.removeEventListener' to be a function"),window.removeEventListener("unload",this.windowUnloadHandler),this.windowUnloadHandler=null)},e.prototype.getZombiedOwnerId=function(){try{var e=window.localStorage.getItem(this.zombiedOwnerLocalStorageKey());return i(co,"Zombied ownerID from LocalStorage:",e),e}catch(t){return s("Failed to get zombie owner id.",t),null}},e.prototype.setZombiedOwnerId=function(e){try{null===e?window.localStorage.removeItem(this.zombiedOwnerLocalStorageKey()):window.localStorage.setItem(this.zombiedOwnerLocalStorageKey(),e)}catch(t){s("Failed to set zombie owner id.",t)}},e.prototype.zombiedOwnerLocalStorageKey=function(){return this.localStoragePrefix+"zombiedOwnerId"},e.prototype.generateOwnerId=function(){return ft.newId()},e.MAIN_DATABASE="main",e}(),mo=function(){function e(e,t){this.remoteDocumentCache=e,this.mutationQueue=t}return e.prototype.getDocument=function(e,t){var n=this;return this.remoteDocumentCache.getEntry(e,t).next(function(r){return n.computeLocalDocument(e,t,r)})},e.prototype.getDocuments=function(e,t){var n=this,r=[],o=re();return t.forEach(function(t){r.push(n.getDocument(e,t).next(function(e){e||(e=new Lt(t,mn.forDeletedDoc())),o=o.insert(t,e)}))}),kr.waitFor(r).next(function(){return o})},e.prototype.getDocumentsMatchingQuery=function(e,t){return It.isDocumentKey(t.path)?this.getDocumentsMatchingDocumentQuery(e,t.path):this.getDocumentsMatchingCollectionQuery(e,t)},e.prototype.getDocumentsMatchingDocumentQuery=function(e,t){return this.getDocument(e,new It(t)).next(function(e){var t=oe();return e instanceof Nt&&(t=t.insert(e.key,e)),t})},e.prototype.getDocumentsMatchingCollectionQuery=function(e,t){var n=this,r;return this.remoteDocumentCache.getDocumentsMatchingQuery(e,t).next(function(t){return n.computeLocalDocuments(e,t)}).next(function(o){return r=o,n.mutationQueue.getAllMutationBatchesAffectingQuery(e,t)}).next(function(t){for(var o=ie(),i=0,s=t,l;i<s.length;i++){l=s[i];for(var d=0,p=l.mutations,c;d<p.length;d++)c=p[d],r.get(c.key)||(o=o.add(c.key))}var u=[];return o.forEach(function(t){u.push(n.getDocument(e,t).next(function(e){e instanceof Nt&&(r=r.insert(e.key,e))}))}),kr.waitFor(u)}).next(function(){return r.forEach(function(e,n){t.matches(n)||(r=r.remove(e))}),r})},e.prototype.computeLocalDocument=function(e,t,n){return this.mutationQueue.getAllMutationBatchesAffectingDocumentKey(e,t).next(function(e){for(var r=0,o=e,i;r<o.length;r++)i=o[r],n=i.applyToLocalView(t,n);return n})},e.prototype.computeLocalDocuments=function(e,t){var n=this,r=[];return t.forEach(function(o,i){r.push(n.computeLocalDocument(e,o,i).next(function(e){e instanceof Nt?t=t.insert(e.key,e):e instanceof Lt?t=t.remove(e.key):d("Unknown MaybeDocument: "+e)}))}),kr.waitFor(r).next(function(){return t})},e}(),go=function(){function e(e){this.remoteDocumentCache=e,this.changes=re()}return e.prototype.addEntry=function(e){var t=this.assertChanges();this.changes=t.insert(e.key,e)},e.prototype.getEntry=function(e,t){var n=this.assertChanges(),r=n.get(t);return r?kr.resolve(r):this.remoteDocumentCache.getEntry(e,t)},e.prototype.apply=function(e){var t=this,n=this.assertChanges(),r=[];return n.forEach(function(n,o){r.push(t.remoteDocumentCache.addEntry(e,o))}),this.changes=null,kr.waitFor(r)},e.prototype.assertChanges=function(){return c(null!==this.changes,"Changes have already been applied."),this.changes},e}(),fo=function(){function e(e,t,n){this.persistence=e,this.garbageCollector=n,this.localViewReferences=new Cr,this.targetIds={},this.targetIdGenerator=Ar.forLocalStore(),this.heldBatchResults=[],this.mutationQueue=e.getMutationQueue(t),this.remoteDocuments=e.getRemoteDocumentCache(),this.queryCache=e.getQueryCache(),this.localDocuments=new mo(this.remoteDocuments,this.mutationQueue),this.garbageCollector.addGarbageSource(this.localViewReferences),this.garbageCollector.addGarbageSource(this.queryCache),this.garbageCollector.addGarbageSource(this.mutationQueue)}return e.prototype.start=function(){var e=this;return this.persistence.runTransaction("Start LocalStore",function(t){return e.startMutationQueue(t).next(function(){return e.startQueryCache(t)})})},e.prototype.handleUserChange=function(e){var t=this;return this.persistence.runTransaction("Handle user change",function(n){var r;return t.mutationQueue.getAllMutationBatches(n).next(function(o){return r=o,t.garbageCollector.removeGarbageSource(t.mutationQueue),t.mutationQueue=t.persistence.getMutationQueue(e),t.garbageCollector.addGarbageSource(t.mutationQueue),t.startMutationQueue(n)}).next(function(){return t.localDocuments=new mo(t.remoteDocuments,t.mutationQueue),t.mutationQueue.getAllMutationBatches(n)}).next(function(e){for(var o=ie(),i=0,s=[r,e],l;i<s.length;i++){l=s[i];for(var d=0,p=l,c;d<p.length;d++){c=p[d];for(var u=0,h=c.mutations,m;u<h.length;u++)m=h[u],o=o.add(m.key)}}return t.localDocuments.getDocuments(n,o)})})},e.prototype.startQueryCache=function(e){var t=this;return this.queryCache.start(e).next(function(){var e=t.queryCache.getHighestTargetId();t.targetIdGenerator=Ar.forLocalStore(e)})},e.prototype.startMutationQueue=function(e){var t=this;return this.mutationQueue.start(e).next(function(){return t.heldBatchResults=[],t.mutationQueue.getHighestAcknowledgedBatchId(e)}).next(function(n){return n===Rr?kr.resolve([]):t.mutationQueue.getAllMutationBatchesThroughBatchId(e,n)}).next(function(n){return 0<n.length?t.mutationQueue.removeMutationBatches(e,n):kr.resolve()})},e.prototype.localWrite=function(e){var t=this;return this.persistence.runTransaction("Locally write mutations",function(n){var r=vt.now(),o;return t.mutationQueue.addMutationBatch(n,r,e).next(function(e){o=e;var r=o.keys();return t.localDocuments.getDocuments(n,r)}).next(function(e){return{batchId:o.batchId,changes:e}})})},e.prototype.acknowledgeBatch=function(e){var t=this;return this.persistence.runTransaction("Acknowledge batch",function(n){var r;return t.mutationQueue.acknowledgeBatch(n,e.batch,e.streamToken).next(function(){if(t.shouldHoldBatchResult(e.commitVersion))return t.heldBatchResults.push(e),r=ie(),kr.resolve();var o=new go(t.remoteDocuments);return t.releaseBatchResults(n,[e],o).next(function(e){return r=e,o.apply(n)})}).next(function(){return t.mutationQueue.performConsistencyCheck(n)}).next(function(){return t.localDocuments.getDocuments(n,r)})})},e.prototype.rejectBatch=function(e){var t=this;return this.persistence.runTransaction("Reject batch",function(n){var r,o;return t.mutationQueue.lookupMutationBatch(n,e).next(function(o){return c(null!=o,"Attempt to reject nonexistent batch!"),r=o,t.mutationQueue.getHighestAcknowledgedBatchId(n).next(function(t){return c(e>t,"Acknowledged batches can't be rejected."),r})}).next(function(){return t.removeMutationBatch(n,r)}).next(function(e){return o=e,t.mutationQueue.performConsistencyCheck(n)}).next(function(){return t.localDocuments.getDocuments(n,o)})})},e.prototype.getLastStreamToken=function(){var e=this;return this.persistence.runTransaction("Get last stream token",function(t){return e.mutationQueue.getLastStreamToken(t)})},e.prototype.setLastStreamToken=function(e){var t=this;return this.persistence.runTransaction("Set last stream token",function(n){return t.mutationQueue.setLastStreamToken(n,e)})},e.prototype.getLastRemoteSnapshotVersion=function(){return this.queryCache.getLastRemoteSnapshotVersion()},e.prototype.applyRemoteEvent=function(e){var t=this,n=new go(this.remoteDocuments);return this.persistence.runTransaction("Apply remote event",function(r){var o=[];g(e.targetChanges,function(e,n){var i=t.targetIds[e];if(i){var s=n.mapping;if(s)if(s instanceof Bn)o.push(t.queryCache.removeMatchingKeysForTargetId(r,e).next(function(){return t.queryCache.addMatchingKeys(r,s.documents,e)}));else if(s instanceof Fn)o.push(t.queryCache.removeMatchingKeys(r,s.removedDocuments,e).next(function(){return t.queryCache.addMatchingKeys(r,s.addedDocuments,e)}));else return d("Unknown mapping type: "+JSON.stringify(s));var l=n.resumeToken;0<l.length&&(i=i.update({resumeToken:l,snapshotVersion:n.snapshotVersion}),t.targetIds[e]=i,o.push(t.queryCache.updateQueryData(r,i)))}});var s=ie();e.documentUpdates.forEach(function(e,l){s=s.add(e),o.push(n.getEntry(r,e).next(function(r){null==r||l.version.isEqual(mn.MIN)||0<=l.version.compareTo(r.version)?n.addEntry(l):i("LocalStore","Ignoring outdated watch update for ",e,". Current version:",r.version," Watch version:",l.version),t.garbageCollector.addPotentialGarbageKey(e)}))});var l=t.queryCache.getLastRemoteSnapshotVersion(),p=e.snapshotVersion;p.isEqual(mn.MIN)||(c(0<=p.compareTo(l),"Watch stream reverted to previous snapshot?? "+p+" < "+l),o.push(t.queryCache.setLastRemoteSnapshotVersion(r,p)));var u;return kr.waitFor(o).next(function(){return t.releaseHeldBatchResults(r,n)}).next(function(e){return u=e,n.apply(r)}).next(function(){return t.localDocuments.getDocuments(r,s.unionWith(u))})})},e.prototype.notifyLocalViewChanges=function(e){var t=this;return this.persistence.runTransaction("Notify local view changes",function(n){for(var r=[],o=function(e){r.push(t.queryCache.getQueryData(n,e.query).next(function(n){c(null!==n,"Local view changes contain unallocated query.");var r=n.targetId;t.localViewReferences.addReferences(e.addedKeys,r),t.localViewReferences.removeReferences(e.removedKeys,r)}))},i=0,s=e,l;i<s.length;i++)l=s[i],o(l);return kr.waitFor(r)})},e.prototype.nextMutationBatch=function(e){var t=this;return this.persistence.runTransaction("Get next mutation batch",function(n){return void 0===e&&(e=Rr),t.mutationQueue.getNextMutationBatchAfterBatchId(n,e)})},e.prototype.readDocument=function(e){var t=this;return this.persistence.runTransaction("read document",function(n){return t.localDocuments.getDocument(n,e)})},e.prototype.allocateQuery=function(e){var t=this;return this.persistence.runTransaction("Allocate query",function(n){var r;return t.queryCache.getQueryData(n,e).next(function(o){if(o)return r=o,kr.resolve();var i=t.targetIdGenerator.next();return r=new fn(e,i,gn.Listen),t.queryCache.addQueryData(n,r)}).next(function(){return c(!t.targetIds[r.targetId],"Tried to allocate an already allocated query: "+e),t.targetIds[r.targetId]=r,r})})},e.prototype.releaseQuery=function(e){var t=this;return this.persistence.runTransaction("Release query",function(n){return t.queryCache.getQueryData(n,e).next(function(r){return c(null!=r,"Tried to release nonexistent query: "+e),t.localViewReferences.removeReferencesForId(r.targetId),delete t.targetIds[r.targetId],t.garbageCollector.isEager?t.queryCache.removeQueryData(n,r):kr.resolve()}).next(function(){if(y(t.targetIds)){var e=new go(t.remoteDocuments);return t.releaseHeldBatchResults(n,e).next(function(){e.apply(n)})}return kr.resolve()})})},e.prototype.executeQuery=function(e){var t=this;return this.persistence.runTransaction("Execute query",function(n){return t.localDocuments.getDocumentsMatchingQuery(n,e)})},e.prototype.remoteDocumentKeys=function(e){var t=this;return this.persistence.runTransaction("Remote document keys",function(n){return t.queryCache.getMatchingKeysForTargetId(n,e)})},e.prototype.collectGarbage=function(){var e=this;return this.persistence.runTransaction("Garbage collection",function(t){return e.garbageCollector.collectGarbage(t).next(function(n){var r=[];return n.forEach(function(n){r.push(e.remoteDocuments.removeEntry(t,n))}),kr.waitFor(r)})})},e.prototype.releaseHeldBatchResults=function(e,t){for(var n=[],r=0,o=this.heldBatchResults,i;r<o.length&&(i=o[r],!!this.isRemoteUpToVersion(i.commitVersion));r++)n.push(i);return 0===n.length?kr.resolve(ie()):(this.heldBatchResults.splice(0,n.length),this.releaseBatchResults(e,n,t))},e.prototype.isRemoteUpToVersion=function(e){var t=this.queryCache.getLastRemoteSnapshotVersion();return 0>=e.compareTo(t)||y(this.targetIds)},e.prototype.shouldHoldBatchResult=function(e){return!this.isRemoteUpToVersion(e)||0<this.heldBatchResults.length},e.prototype.releaseBatchResults=function(e,t,n){for(var r=this,o=kr.resolve(),i=function(t){o=o.next(function(){return r.applyWriteToRemoteDocuments(e,t,n)})},s=0,l=t,d;s<l.length;s++)d=l[s],i(d);return o.next(function(){return r.removeMutationBatches(e,t.map(function(e){return e.batch}))})},e.prototype.removeMutationBatch=function(e,t){return this.removeMutationBatches(e,[t])},e.prototype.removeMutationBatches=function(e,t){for(var n=ie(),r=0,o=t,i;r<o.length;r++){i=o[r];for(var s=0,l=i.mutations;s<l.length;s++){var d=l[s],p=d.key;n=n.add(p)}}return this.mutationQueue.removeMutationBatches(e,t).next(function(){return n})},e.prototype.applyWriteToRemoteDocuments=function(e,t,n){var r=t.batch,o=r.keys(),i=kr.resolve();return o.forEach(function(o){i=i.next(function(){return n.getEntry(e,o)}).next(function(e){var i=e,s=t.docVersions.get(o);c(null!==s,"ackVersions should contain every doc in the write."),(!i||0>i.version.compareTo(s))&&(i=r.applyToRemoteDocument(o,i,t),i?n.addEntry(i):c(!e,"Mutation batch "+r+" applied to document "+e+" resulted in null"))})}),i},e}(),yo=function(){function e(){this.mutationQueue=[],this.nextBatchId=1,this.highestAcknowledgedBatchId=Rr,this.lastStreamToken=p(),this.garbageCollector=null,this.batchesByDocumentKey=new In(Tr.compareByKey)}return e.prototype.start=function(){return 0===this.mutationQueue.length&&(this.nextBatchId=1,this.highestAcknowledgedBatchId=Rr),c(this.highestAcknowledgedBatchId<this.nextBatchId,"highestAcknowledgedBatchId must be less than the nextBatchId"),kr.resolve()},e.prototype.checkEmpty=function(){return kr.resolve(0===this.mutationQueue.length)},e.prototype.getNextBatchId=function(){return kr.resolve(this.nextBatchId)},e.prototype.getHighestAcknowledgedBatchId=function(){return kr.resolve(this.highestAcknowledgedBatchId)},e.prototype.acknowledgeBatch=function(e,t,n){var r=t.batchId;c(r>this.highestAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order");var o=this.indexOfExistingBatchId(r,"acknowledged"),i=this.mutationQueue[o];return c(r===i.batchId,"Queue ordering failure: expected batch "+r+", got batch "+i.batchId),c(!i.isTombstone(),"Can't acknowledge a previously removed batch"),this.highestAcknowledgedBatchId=r,this.lastStreamToken=n,kr.resolve()},e.prototype.getLastStreamToken=function(){return kr.resolve(this.lastStreamToken)},e.prototype.setLastStreamToken=function(e,t){return this.lastStreamToken=t,kr.resolve()},e.prototype.addMutationBatch=function(e,t,n){c(0!==n.length,"Mutation batches should not be empty");var r=this.nextBatchId;if(this.nextBatchId++,0<this.mutationQueue.length){var o=this.mutationQueue[this.mutationQueue.length-1];c(o.batchId<r,"Mutation batchIDs must be monotonically increasing order")}var i=new Pr(r,t,n);this.mutationQueue.push(i);for(var s=0,l=n,d;s<l.length;s++)d=l[s],this.batchesByDocumentKey=this.batchesByDocumentKey.add(new Tr(d.key,r));return kr.resolve(i)},e.prototype.lookupMutationBatch=function(e,t){return kr.resolve(this.findMutationBatch(t))},e.prototype.getNextMutationBatchAfterBatchId=function(e,t){for(var n=this.mutationQueue.length,r=at(t,this.highestAcknowledgedBatchId)+1,o=this.indexOfBatchId(r),i=0>o?0:o,s;i<n;i++)if(s=this.mutationQueue[i],!s.isTombstone())return kr.resolve(s);return kr.resolve(null)},e.prototype.getAllMutationBatches=function(){return kr.resolve(this.getAllLiveMutationBatchesBeforeIndex(this.mutationQueue.length))},e.prototype.getAllMutationBatchesThroughBatchId=function(e,t){var n=this.mutationQueue.length,r=this.indexOfBatchId(t);return 0>r?r=0:r>=n?r=n:r++,kr.resolve(this.getAllLiveMutationBatchesBeforeIndex(r))},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,r=new Tr(t,0),o=new Tr(t,tt),i=[];return this.batchesByDocumentKey.forEachInRange([r,o],function(e){c(t.isEqual(e.key),"Should only iterate over a single key's batches");var r=n.findMutationBatch(e.targetOrBatchId);c(null!==r,"Batches in the index must exist in the main table"),i.push(r)}),kr.resolve(i)},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){var n=this,r=t.path,o=r.length+1,i=r;It.isDocumentKey(i)||(i=i.child(""));var s=new Tr(new It(i),0),l=new In(z);this.batchesByDocumentKey.forEachWhile(function(e){var t=e.key.path;return!!r.isPrefixOf(t)&&(t.length===o&&(l=l.add(e.targetOrBatchId)),!0)},s);var d=[];return l.forEach(function(e){var t=n.findMutationBatch(e);null!==t&&d.push(t)}),kr.resolve(d)},e.prototype.removeMutationBatches=function(e,t){var n=t.length;c(0<n,"Should not remove mutations when none exist.");var r=t[0].batchId,o=this.mutationQueue.length,s=this.indexOfExistingBatchId(r,"removed");c(this.mutationQueue[s].batchId===r,"Removed batches must exist in the queue");for(var l=1,d=s+1,p;l<n&&d<o;){if(p=this.mutationQueue[d],p.isTombstone()){d++;continue}c(p.batchId===t[l].batchId,"Removed batches must be contiguous in the queue"),l++,d++}if(0===s){for(;d<o;d++){var p=this.mutationQueue[d];if(!p.isTombstone())break}var u=d-s;this.mutationQueue.splice(s,u)}else for(var h=s;h<d;h++)this.mutationQueue[h]=this.mutationQueue[h].toTombstone();for(var i=this.batchesByDocumentKey,m=0,g=t;m<g.length;m++)for(var p=g[m],f=p.batchId,y=0,b=p.mutations;y<b.length;y++){var x=b[y],v=x.key;null!==this.garbageCollector&&this.garbageCollector.addPotentialGarbageKey(v);var k=new Tr(v,f);i=i.delete(k)}return this.batchesByDocumentKey=i,kr.resolve()},e.prototype.setGarbageCollector=function(e){this.garbageCollector=e},e.prototype.containsKey=function(e,t){var n=new Tr(t,0),r=this.batchesByDocumentKey.firstAfterOrEqual(n);return kr.resolve(t.isEqual(r&&r.key))},e.prototype.performConsistencyCheck=function(){return 0===this.mutationQueue.length&&c(this.batchesByDocumentKey.isEmpty(),"Document leak -- detected dangling mutation references when queue is empty."),kr.resolve()},e.prototype.getAllLiveMutationBatchesBeforeIndex=function(e){for(var t=[],n=0,r;n<e;n++)r=this.mutationQueue[n],r.isTombstone()||t.push(r);return t},e.prototype.indexOfExistingBatchId=function(e,t){var n=this.indexOfBatchId(e);return c(0<=n&&n<this.mutationQueue.length,"Batches must exist to be "+t),n},e.prototype.indexOfBatchId=function(e){if(0===this.mutationQueue.length)return 0;var t=this.mutationQueue[0].batchId;return e-t},e.prototype.findMutationBatch=function(e){var t=this.indexOfBatchId(e);if(0>t||t>=this.mutationQueue.length)return null;var n=this.mutationQueue[t];return c(n.batchId===e,"If found batch must match"),n.isTombstone()?null:n},e}(),bo=function(){function e(){this.queries=new yr(function(e){return e.canonicalId()}),this.lastRemoteSnapshotVersion=mn.MIN,this.highestTargetId=0,this.references=new Cr,this.targetCount=0}return e.prototype.start=function(){return kr.resolve()},e.prototype.getLastRemoteSnapshotVersion=function(){return this.lastRemoteSnapshotVersion},e.prototype.getHighestTargetId=function(){return this.highestTargetId},e.prototype.setLastRemoteSnapshotVersion=function(e,t){return this.lastRemoteSnapshotVersion=t,kr.resolve()},e.prototype.saveQueryData=function(e){this.queries.set(e.query,e);var t=e.targetId;t>this.highestTargetId&&(this.highestTargetId=t)},e.prototype.addQueryData=function(e,t){return c(!this.queries.has(t.query),"Adding a query that already exists"),this.saveQueryData(t),this.targetCount+=1,kr.resolve()},e.prototype.updateQueryData=function(e,t){return c(this.queries.has(t.query),"Updating a non-existent query"),this.saveQueryData(t),kr.resolve()},e.prototype.removeQueryData=function(e,t){return c(0<this.targetCount,"Removing a target from an empty cache"),c(this.queries.has(t.query),"Removing a non-existent target from the cache"),this.queries.delete(t.query),this.references.removeReferencesForId(t.targetId),this.targetCount-=1,kr.resolve()},Object.defineProperty(e.prototype,"count",{get:function(){return this.targetCount},enumerable:!0,configurable:!0}),e.prototype.getQueryData=function(e,t){var n=this.queries.get(t)||null;return kr.resolve(n)},e.prototype.addMatchingKeys=function(e,t,n){return this.references.addReferences(t,n),kr.resolve()},e.prototype.removeMatchingKeys=function(e,t,n){return this.references.removeReferences(t,n),kr.resolve()},e.prototype.removeMatchingKeysForTargetId=function(e,t){return this.references.removeReferencesForId(t),kr.resolve()},e.prototype.getMatchingKeysForTargetId=function(e,t){var n=this.references.referencesForId(t);return kr.resolve(n)},e.prototype.setGarbageCollector=function(e){this.references.setGarbageCollector(e)},e.prototype.containsKey=function(e,t){return this.references.containsKey(e,t)},e}(),xo=function(){function e(){this.docs=re()}return e.prototype.addEntry=function(e,t){return this.docs=this.docs.insert(t.key,t),kr.resolve()},e.prototype.removeEntry=function(e,t){return this.docs=this.docs.remove(t),kr.resolve()},e.prototype.getEntry=function(e,t){return kr.resolve(this.docs.get(t))},e.prototype.getDocumentsMatchingQuery=function(e,t){for(var n=oe(),r=new It(t.path.child("")),o=this.docs.getIteratorFrom(r);o.hasNext();){var i=o.getNext(),s=i.key,l=i.value;if(!t.path.isPrefixOf(s.path))break;l instanceof Nt&&t.matches(l)&&(n=n.insert(l.key,l))}return kr.resolve(n)},e}(),vo=function(){function e(){this.mutationQueues={},this.remoteDocumentCache=new xo,this.queryCache=new bo,this.started=!1}return e.prototype.start=function(){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return c(!this.started,"MemoryPersistence double-started!"),this.started=!0,[2]})})},e.prototype.shutdown=function(){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return c(this.started,"MemoryPersistence shutdown without start!"),this.started=!1,[2]})})},e.prototype.getMutationQueue=function(e){var t=this.mutationQueues[e.toKey()];return t||(t=new yo,this.mutationQueues[e.toKey()]=t),t},e.prototype.getQueryCache=function(){return this.queryCache},e.prototype.getRemoteDocumentCache=function(){return this.remoteDocumentCache},e.prototype.runTransaction=function(e,t){return i("MemoryPersistence","Starting transaction:",e),t(new ko).toPromise()},e}(),ko=function(){return function(){}}(),So=function(){function e(){this.isEager=!1}return e.prototype.addGarbageSource=function(){},e.prototype.removeGarbageSource=function(){},e.prototype.addPotentialGarbageKey=function(){},e.prototype.collectGarbage=function(){return kr.resolve(ie())},e}(),wo;(function(e){e.All="all",e.ListenStreamIdle="listen_stream_idle",e.ListenStreamConnectionBackoff="listen_stream_connection_backoff",e.WriteStreamIdle="write_stream_idle",e.WriteStreamConnectionBackoff="write_stream_connection_backoff",e.OnlineStateTimeout="online_state_timeout"})(wo||(wo={}));var Co=function(){function e(e,t,n,r,o){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=o,this.deferred=new eo,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.catch=this.deferred.promise.catch.bind(this.deferred.promise),this.deferred.promise.catch(function(){})}return e.createAndSchedule=function(t,n,r,o,i){var s=Date.now()+r,l=new e(t,n,s,o,i);return l.start(r),l},e.prototype.start=function(e){var t=this;this.timerHandle=setTimeout(function(){return t.handleDelayElapsed()},e)},e.prototype.skipDelay=function(){return this.handleDelayElapsed()},e.prototype.cancel=function(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new gt(mt.CANCELLED,"Operation cancelled"+(e?": "+e:""))))},e.prototype.handleDelayElapsed=function(){var e=this;this.asyncQueue.enqueue(function(){return null===e.timerHandle?Promise.resolve():(e.clearTimeout(),e.op().then(function(t){return e.deferred.resolve(t)}))})},e.prototype.clearTimeout=function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)},e}(),To=function(){function e(){this.tail=Promise.resolve(),this.delayedOperations=[],this.operationInProgress=!1}return e.prototype.enqueue=function(e){var t=this;this.verifyNotFailed();var n=this.tail.then(function(){return t.operationInProgress=!0,e().catch(function(e){t.failure=e,t.operationInProgress=!1;var n=e.stack||e.message||"";throw s("INTERNAL UNHANDLED ERROR: ",n),0>n.indexOf("Firestore Test Simulated Error")&&setTimeout(function(){throw e},0),e}).then(function(e){return t.operationInProgress=!1,e})});return this.tail=n,n},e.prototype.enqueueAfterDelay=function(e,t,n){var r=this;this.verifyNotFailed(),c(!this.containsDelayedOperation(e),"Attempted to schedule multiple operations with timer id "+e+".");var o=Co.createAndSchedule(this,e,t,n,function(e){return r.removeDelayedOperation(e)});return this.delayedOperations.push(o),o},e.prototype.verifyNotFailed=function(){this.failure&&d("AsyncQueue is already failed: "+(this.failure.stack||this.failure.message))},e.prototype.verifyOperationInProgress=function(){c(this.operationInProgress,"verifyOpInProgress() called when no op in progress on this queue.")},e.prototype.drain=function(){return this.enqueue(function(){return Promise.resolve()})},e.prototype.containsDelayedOperation=function(e){return 0<=this.delayedOperations.findIndex(function(t){return t.timerId===e})},e.prototype.runDelayedOperationsEarly=function(e){var t=this;return this.drain().then(function(){c(e===wo.All||t.containsDelayedOperation(e),"Attempted to drain to missing operation "+e),t.delayedOperations.sort(function(e,t){return e.targetTimeMs-t.targetTimeMs});for(var n=0,r=t.delayedOperations,o;n<r.length&&(o=r[n],o.skipDelay(),e===wo.All||o.timerId!==e);n++);return t.drain()})},e.prototype.removeDelayedOperation=function(e){var t=this.delayedOperations.indexOf(e);c(0<=t,"Delayed operation not found."),this.delayedOperations.splice(t,1)},e}(),_o=function(){function e(e,t,n,r,o){this.queue=e,this.timerId=t,this.initialDelayMs=n,this.backoffFactor=r,this.maxDelayMs=o,this.timerPromise=null,this.reset()}return e.prototype.reset=function(){this.currentBaseMs=0},e.prototype.resetToMax=function(){this.currentBaseMs=this.maxDelayMs},e.prototype.backoffAndRun=function(e){this.cancel();var t=this.currentBaseMs+this.jitterDelayMs();0<this.currentBaseMs&&i("ExponentialBackoff","Backing off for "+t+" ms "+("(base delay: "+this.currentBaseMs+" ms)")),this.timerPromise=this.queue.enqueueAfterDelay(this.timerId,t,e),this.currentBaseMs*=this.backoffFactor,this.currentBaseMs<this.initialDelayMs&&(this.currentBaseMs=this.initialDelayMs),this.currentBaseMs>this.maxDelayMs&&(this.currentBaseMs=this.maxDelayMs)},e.prototype.cancel=function(){null!==this.timerPromise&&(this.timerPromise.cancel(),this.timerPromise=null)},e.prototype.jitterDelayMs=function(){return(Math.random()-0.5)*this.currentBaseMs},e}(),Eo;(function(e){e[e.Initial=0]="Initial",e[e.Auth=1]="Auth",e[e.Open=2]="Open",e[e.Error=3]="Error",e[e.Backoff=4]="Backoff",e[e.Stopped=5]="Stopped"})(Eo||(Eo={}));var Ao=function(){function e(e,t,n,r,o){this.queue=e,this.idleTimerId=n,this.connection=r,this.credentialsProvider=o,this.inactivityTimerPromise=null,this.stream=null,this.listener=null,this.backoff=new _o(e,t,1e3,1.5,60000),this.state=Eo.Initial}return e.prototype.isStarted=function(){return this.state===Eo.Backoff||this.state===Eo.Auth||this.state===Eo.Open},e.prototype.isOpen=function(){return this.state===Eo.Open},e.prototype.start=function(e){return this.state===Eo.Error?void this.performBackoff(e):void(c(this.state===Eo.Initial,"Already started"),this.listener=e,this.auth())},e.prototype.stop=function(){this.isStarted()&&this.close(Eo.Stopped)},e.prototype.inhibitBackoff=function(){c(!this.isStarted(),"Can only inhibit backoff in a stopped state"),this.state=Eo.Initial,this.backoff.reset()},e.prototype.markIdle=function(){var e=this;this.isOpen()&&null===this.inactivityTimerPromise&&(this.inactivityTimerPromise=this.queue.enqueueAfterDelay(this.idleTimerId,60000,function(){return e.handleIdleCloseTimer()}))},e.prototype.sendRequest=function(e){this.cancelIdleCheck(),this.stream.send(e)},e.prototype.handleIdleCloseTimer=function(){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return this.isOpen()?[2,this.close(Eo.Initial)]:[2]})})},e.prototype.cancelIdleCheck=function(){this.inactivityTimerPromise&&(this.inactivityTimerPromise.cancel(),this.inactivityTimerPromise=null)},e.prototype.close=function(e,t){return lt.__awaiter(this,void 0,void 0,function(){var n;return lt.__generator(this,function(){return c(e===Eo.Error||Q(t),"Can't provide an error when not in an error state."),this.cancelIdleCheck(),this.backoff.cancel(),e===Eo.Error?t&&t.code===mt.RESOURCE_EXHAUSTED&&(s(t.toString()),s("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=e,n=this.listener,this.listener=null,e===Eo.Stopped?[2]:[2,n.onClose(t)]})})},e.prototype.tearDown=function(){},e.prototype.auth=function(){var e=this;c(this.state===Eo.Initial,"Must be in initial state to auth"),this.state=Eo.Auth,this.credentialsProvider.getToken(!1).then(function(t){e.startStream(t)},function(t){e.queue.enqueue(function(){return lt.__awaiter(e,void 0,void 0,function(){var e;return lt.__generator(this,function(){return this.state===Eo.Stopped?[2]:(e=new gt(mt.UNKNOWN,"Fetching auth token failed: "+t.message),[2,this.handleStreamClose(e)])})})})})},e.prototype.startStream=function(e){var t=this;if(this.state!==Eo.Stopped){c(this.state===Eo.Auth,"Trying to start stream in a non-auth state");var n=function(e,n){t.queue.enqueue(function(){return lt.__awaiter(t,void 0,void 0,function(){return lt.__generator(this,function(){return this.stream===e?[2,n()]:[2]})})})};if(null!==this.listener){var r=this.startRpc(e);this.stream=r,this.stream.onOpen(function(){n(r,function(){return c(t.state===Eo.Auth,"Expected stream to be in state auth, but was "+t.state),t.state=Eo.Open,t.listener.onOpen()})}),this.stream.onClose(function(e){n(r,function(){return t.handleStreamClose(e)})}),this.stream.onMessage(function(e){n(r,function(){return t.onMessage(e)})})}}},e.prototype.performBackoff=function(e){var t=this;c(this.state===Eo.Error,"Should only perform backoff in an error case"),this.state=Eo.Backoff,this.backoff.backoffAndRun(function(){return lt.__awaiter(t,void 0,void 0,function(){return lt.__generator(this,function(){return this.state===Eo.Stopped?[2]:(this.state=Eo.Initial,this.start(e),c(this.isStarted(),"PersistentStream should have started"),[2])})})})},e.prototype.handleStreamClose=function(e){return c(this.isStarted(),"Can't handle server close on non-started stream"),i("PersistentStream","close with error: "+e),this.stream=null,this.close(Eo.Error,e)},e}(),Io=function(e){function t(t,n,r,o){var i=e.call(this,t,wo.ListenStreamConnectionBackoff,wo.ListenStreamIdle,n,r)||this;return i.serializer=o,i}return lt.__extends(t,e),t.prototype.startRpc=function(e){return this.connection.openStream("Listen",e)},t.prototype.onMessage=function(e){this.backoff.reset();var t=this.serializer.fromWatchChange(e),n=this.serializer.versionFromListenResponse(e);return this.listener.onWatchChange(t,n)},t.prototype.watch=function(e){var t={database:this.serializer.encodedDatabaseId,addTarget:this.serializer.toTarget(e)},n=this.serializer.toListenRequestLabels(e);n&&(t.labels=n),this.sendRequest(t)},t.prototype.unwatch=function(e){var t={};t.database=this.serializer.encodedDatabaseId,t.removeTarget=e,this.sendRequest(t)},t}(Ao),No=function(e){function t(t,n,r,o){var i=e.call(this,t,wo.WriteStreamConnectionBackoff,wo.WriteStreamIdle,n,r)||this;return i.serializer=o,i.handshakeComplete_=!1,i}return lt.__extends(t,e),Object.defineProperty(t.prototype,"handshakeComplete",{get:function(){return this.handshakeComplete_},enumerable:!0,configurable:!0}),t.prototype.start=function(t){this.handshakeComplete_=!1,e.prototype.start.call(this,t)},t.prototype.tearDown=function(){this.handshakeComplete_&&this.writeMutations([])},t.prototype.startRpc=function(e){return this.connection.openStream("Write",e)},t.prototype.onMessage=function(e){if(c(!!e.streamToken,"Got a write response without a stream token"),this.lastStreamToken=e.streamToken,!this.handshakeComplete_)return c(!e.writeResults||0===e.writeResults.length,"Got mutation results for handshake"),this.handshakeComplete_=!0,this.listener.onHandshakeComplete();this.backoff.reset();var t=this.serializer.fromWriteResults(e.writeResults),n=this.serializer.fromVersion(e.commitTime);return this.listener.onMutationResult(n,t)},t.prototype.writeHandshake=function(){c(this.isOpen(),"Writing handshake requires an opened stream"),c(!this.handshakeComplete_,"Handshake already completed");var e={};e.database=this.serializer.encodedDatabaseId,this.sendRequest(e)},t.prototype.writeMutations=function(e){var t=this;c(this.isOpen(),"Writing mutations requires an opened stream"),c(this.handshakeComplete_,"Handshake must be complete before writing mutations"),c(0<this.lastStreamToken.length,"Trying to write mutation without a token");var n={streamToken:this.lastStreamToken,writes:e.map(function(e){return t.serializer.toMutation(e)})};this.sendRequest(n)},t}(Ao),Lo=function(){function e(e,t,n,r){this.queue=e,this.connection=t,this.credentials=n,this.serializer=r}return e.prototype.newPersistentWriteStream=function(){return new No(this.queue,this.connection,this.credentials,this.serializer)},e.prototype.newPersistentWatchStream=function(){return new Io(this.queue,this.connection,this.credentials,this.serializer)},e.prototype.commit=function(e){var t=this,n={database:this.serializer.encodedDatabaseId,writes:e.map(function(e){return t.serializer.toMutation(e)})};return this.invokeRPC("Commit",n).then(function(e){return t.serializer.fromWriteResults(e.writeResults)})},e.prototype.lookup=function(e){var t=this,n={database:this.serializer.encodedDatabaseId,documents:e.map(function(e){return t.serializer.toName(e)})};return this.invokeStreamingRPC("BatchGetDocuments",n).then(function(n){var r=re();n.forEach(function(e){var n=t.serializer.fromMaybeDocument(e);r=r.insert(n.key,n)});var o=[];return e.forEach(function(e){var t=r.get(e);c(!!t,"Missing entity in write response for "+e),o.push(t)}),o})},e.prototype.invokeRPC=function(e,t){var n=this;return this.credentials.getToken(!1).then(function(r){return n.connection.invokeRPC(e,t,r)})},e.prototype.invokeStreamingRPC=function(e,t){var n=this;return this.credentials.getToken(!1).then(function(r){return n.connection.invokeStreamingRPC(e,t,r)})},e}(),Oo=function(){function e(e){this.datastore=e,this.readVersions=ae(),this.mutations=[],this.committed=!1}return e.prototype.recordVersion=function(e){var t=e.version;e instanceof Lt&&(t=mn.forDeletedDoc());var n=this.readVersions.get(e.key);if(null===n)this.readVersions=this.readVersions.insert(e.key,t);else if(!t.isEqual(n))throw new gt(mt.ABORTED,"Document version changed between two reads.")},e.prototype.lookup=function(e){var t=this;return this.committed?Promise.reject("Transaction has already completed."):0<this.mutations.length?Promise.reject("Transactions lookups are invalid after writes."):this.datastore.lookup(e).then(function(e){return e.forEach(function(e){return t.recordVersion(e)}),e})},e.prototype.write=function(e){if(this.committed)throw new gt(mt.FAILED_PRECONDITION,"Transaction has already completed.");this.mutations=this.mutations.concat(e)},e.prototype.precondition=function(e){var t=this.readVersions.get(e);return t?kn.updateTime(t):kn.NONE},e.prototype.preconditionForUpdate=function(e){var t=this.readVersions.get(e);if(t&&t.isEqual(mn.forDeletedDoc()))throw new gt(mt.FAILED_PRECONDITION,"Can't update a document that doesn't exist.");else return t?kn.updateTime(t):kn.exists(!0)},e.prototype.set=function(e,t){this.write(t.toMutations(e,this.precondition(e)))},e.prototype.update=function(e,t){this.write(t.toMutations(e,this.preconditionForUpdate(e)))},e.prototype.delete=function(e){this.write([new _n(e,this.precondition(e))]),this.readVersions=this.readVersions.insert(e,mn.forDeletedDoc())},e.prototype.commit=function(){var e=this,t=this.readVersions;return this.mutations.forEach(function(e){t=t.remove(e.key)}),t.isEmpty()?this.datastore.commit(this.mutations).then(function(){e.committed=!0}):Promise.reject(Error("Every document read in a transaction must also be written."))},e}(),Mo=2,Do=10000,Ro=function(){function e(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state=cr.Unknown,this.watchStreamFailures=0,this.onlineStateTimer=null,this.shouldWarnClientIsOffline=!0}return e.prototype.handleWatchStreamStart=function(){var e=this;0===this.watchStreamFailures&&(this.setAndBroadcast(cr.Unknown),c(null===this.onlineStateTimer,"onlineStateTimer shouldn't be started yet"),this.onlineStateTimer=this.asyncQueue.enqueueAfterDelay(wo.OnlineStateTimeout,Do,function(){return e.onlineStateTimer=null,c(e.state===cr.Unknown,"Timer should be canceled if we transitioned to a different state."),e.logClientOfflineWarningIfNecessary("Backend didn't respond within "+Do/1e3+" seconds."),e.setAndBroadcast(cr.Offline),Promise.resolve()}))},e.prototype.handleWatchStreamFailure=function(e){this.state===cr.Online?(this.setAndBroadcast(cr.Unknown),c(0===this.watchStreamFailures,"watchStreamFailures must be 0"),c(null===this.onlineStateTimer,"onlineStateTimer must be null")):(this.watchStreamFailures++,this.watchStreamFailures>=Mo&&(this.clearOnlineStateTimer(),this.logClientOfflineWarningIfNecessary("Connection failed "+Mo+" "+("times. Most recent error: "+e.toString())),this.setAndBroadcast(cr.Offline)))},e.prototype.set=function(e){this.clearOnlineStateTimer(),this.watchStreamFailures=0,e===cr.Online&&(this.shouldWarnClientIsOffline=!1),this.setAndBroadcast(e)},e.prototype.setAndBroadcast=function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))},e.prototype.logClientOfflineWarningIfNecessary=function(e){var t="Could not reach Cloud Firestore backend. "+e+"\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?(s(t),this.shouldWarnClientIsOffline=!1):i("OnlineStateTracker",t)},e.prototype.clearOnlineStateTimer=function(){null!==this.onlineStateTimer&&(this.onlineStateTimer.cancel(),this.onlineStateTimer=null)},e}(),Po="RemoteStore",Bo=function(){function e(e,t,n,r){this.localStore=e,this.datastore=t,this.pendingWrites=[],this.lastBatchSeen=Rr,this.listenTargets={},this.pendingTargetResponses={},this.accumulatedWatchChanges=[],this.watchStream=null,this.writeStream=null,this.onlineStateTracker=new Ro(n,r)}return e.prototype.start=function(){return this.enableNetwork()},e.prototype.isNetworkEnabled=function(){return c(null==this.watchStream==(null==this.writeStream),"WatchStream and WriteStream should both be null or non-null"),null!=this.watchStream},e.prototype.enableNetwork=function(){var e=this;return this.isNetworkEnabled()?Promise.resolve():(this.watchStream=this.datastore.newPersistentWatchStream(),this.writeStream=this.datastore.newPersistentWriteStream(),this.localStore.getLastStreamToken().then(function(t){return e.writeStream.lastStreamToken=t,e.shouldStartWatchStream()?e.startWatchStream():e.onlineStateTracker.set(cr.Unknown),e.fillWritePipeline()}))},e.prototype.disableNetwork=function(){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return this.disableNetworkInternal(),this.onlineStateTracker.set(cr.Offline),[2]})})},e.prototype.disableNetworkInternal=function(){this.isNetworkEnabled()&&(this.watchStream.stop(),this.writeStream.stop(),this.cleanUpWatchStreamState(),this.cleanUpWriteStreamState(),this.writeStream=null,this.watchStream=null)},e.prototype.shutdown=function(){return i(Po,"RemoteStore shutting down."),this.disableNetworkInternal(),this.onlineStateTracker.set(cr.Unknown),Promise.resolve()},e.prototype.listen=function(e){c(!h(this.listenTargets,e.targetId),"listen called with duplicate targetId!"),this.listenTargets[e.targetId]=e,this.shouldStartWatchStream()?this.startWatchStream():this.isNetworkEnabled()&&this.watchStream.isOpen()&&this.sendWatchRequest(e)},e.prototype.unlisten=function(e){c(h(this.listenTargets,e),"unlisten called without assigned target ID!"),delete this.listenTargets[e],this.isNetworkEnabled()&&this.watchStream.isOpen()&&(this.sendUnwatchRequest(e),y(this.listenTargets)&&this.watchStream.markIdle())},e.prototype.sendWatchRequest=function(e){this.recordPendingTargetRequest(e.targetId),this.watchStream.watch(e)},e.prototype.sendUnwatchRequest=function(e){this.recordPendingTargetRequest(e),this.watchStream.unwatch(e)},e.prototype.recordPendingTargetRequest=function(e){this.pendingTargetResponses[e]=(this.pendingTargetResponses[e]||0)+1},e.prototype.startWatchStream=function(){c(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()},e.prototype.shouldStartWatchStream=function(){return this.isNetworkEnabled()&&!this.watchStream.isStarted()&&!y(this.listenTargets)},e.prototype.cleanUpWatchStreamState=function(){this.accumulatedWatchChanges=[],this.pendingTargetResponses={}},e.prototype.onWatchStreamOpen=function(){return lt.__awaiter(this,void 0,void 0,function(){var e=this;return lt.__generator(this,function(){return g(this.listenTargets,function(t,n){e.sendWatchRequest(n)}),[2]})})},e.prototype.onWatchStreamClose=function(e){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return c(this.isNetworkEnabled(),"onWatchStreamClose() should only be called when the network is enabled"),this.cleanUpWatchStreamState(),this.shouldStartWatchStream()?(e&&this.onlineStateTracker.handleWatchStreamFailure(e),this.startWatchStream()):this.onlineStateTracker.set(cr.Unknown),[2]})})},e.prototype.onWatchStreamChange=function(e,t){return lt.__awaiter(this,void 0,void 0,function(){var n;return lt.__generator(this,function(){return(this.onlineStateTracker.set(cr.Online),e instanceof qn&&e.state===jn.Removed&&e.cause)?[2,this.handleTargetError(e)]:(this.accumulatedWatchChanges.push(e),!t.isEqual(mn.MIN)&&0<=t.compareTo(this.localStore.getLastRemoteSnapshotVersion())?(n=this.accumulatedWatchChanges,this.accumulatedWatchChanges=[],[2,this.handleWatchChangeBatch(t,n)]):[2])})})},e.prototype.handleWatchChangeBatch=function(e,t){var n=this,r=new Vn(e,this.listenTargets,this.pendingTargetResponses);r.addChanges(t);var o=r.createRemoteEvent();this.pendingTargetResponses=r.pendingTargetResponses;var i=[];return g(r.existenceFilters,function(t,r){var s=n.listenTargets[t];if(s){var l=s.query;if(!l.isDocumentQuery()){var d=n.localStore.remoteDocumentKeys(t).then(function(e){if(o.targetChanges[t]){var i=o.targetChanges[t].mapping;null!==i&&(i instanceof Fn?e=i.applyToKeySet(e):(c(i instanceof Bn,"Expected either reset or update mapping but got something else: "+i),e=i.documents))}if(e.size!==r.count){o.handleExistenceFilterMismatch(t);var d=new fn(l,t,s.purpose);n.listenTargets[t]=d,n.sendUnwatchRequest(t);var p=new fn(l,t,gn.ExistenceFilterMismatch);n.sendWatchRequest(p)}});i.push(d)}else if(0===r.count){var p=new It(l.path),u=new Lt(p,e);o.addDocumentUpdate(u)}else c(1===r.count,"Single document existence filter with count: "+r.count)}}),Promise.all(i).then(function(){return g(o.targetChanges,function(e,t){if(0<t.resumeToken.length){var r=n.listenTargets[e];r&&(n.listenTargets[e]=r.update({resumeToken:t.resumeToken,snapshotVersion:t.snapshotVersion}))}}),n.syncEngine.applyRemoteEvent(o)})},e.prototype.handleTargetError=function(e){var t=this;c(!!e.cause,"Handling target error without a cause");var n=e.cause,r=Promise.resolve();return e.targetIds.forEach(function(e){r=r.then(function(){return lt.__awaiter(t,void 0,void 0,function(){return lt.__generator(this,function(){return h(this.listenTargets,e)?(delete this.listenTargets[e],[2,this.syncEngine.rejectListen(e,n)]):[2]})})})}),r},e.prototype.cleanUpWriteStreamState=function(){this.lastBatchSeen=Rr,i(Po,"Stopping write stream with "+this.pendingWrites.length+" pending writes"),this.pendingWrites=[]},e.prototype.fillWritePipeline=function(){return lt.__awaiter(this,void 0,void 0,function(){var e=this;return lt.__generator(this,function(){return this.canWriteMutations()?[2,this.localStore.nextMutationBatch(this.lastBatchSeen).then(function(t){return null===t?void(0===e.pendingWrites.length&&e.writeStream.markIdle()):(e.commit(t),e.fillWritePipeline())})]:[2]})})},e.prototype.canWriteMutations=function(){return this.isNetworkEnabled()&&this.pendingWrites.length<10},e.prototype.outstandingWrites=function(){return this.pendingWrites.length},e.prototype.commit=function(e){c(this.canWriteMutations(),"commit called when batches can't be written"),this.lastBatchSeen=e.batchId,this.pendingWrites.push(e),this.shouldStartWriteStream()?this.startWriteStream():this.isNetworkEnabled()&&this.writeStream.handshakeComplete&&this.writeStream.writeMutations(e.mutations)},e.prototype.shouldStartWriteStream=function(){return this.isNetworkEnabled()&&!this.writeStream.isStarted()&&0<this.pendingWrites.length},e.prototype.startWriteStream=function(){c(this.shouldStartWriteStream(),"startWriteStream() called when shouldStartWriteStream() is false."),this.writeStream.start({onOpen:this.onWriteStreamOpen.bind(this),onClose:this.onWriteStreamClose.bind(this),onHandshakeComplete:this.onWriteHandshakeComplete.bind(this),onMutationResult:this.onMutationResult.bind(this)})},e.prototype.onWriteStreamOpen=function(){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return this.writeStream.writeHandshake(),[2]})})},e.prototype.onWriteHandshakeComplete=function(){var e=this;return this.localStore.setLastStreamToken(this.writeStream.lastStreamToken).then(function(){for(var t=0,n=e.pendingWrites,r;t<n.length;t++)r=n[t],e.writeStream.writeMutations(r.mutations)})},e.prototype.onMutationResult=function(e,t){var n=this;c(0<this.pendingWrites.length,"Got result for empty pending writes");var r=this.pendingWrites.shift(),o=Br.from(r,e,t,this.writeStream.lastStreamToken);return this.syncEngine.applySuccessfulWrite(o).then(function(){return n.fillWritePipeline()})},e.prototype.onWriteStreamClose=function(e){return lt.__awaiter(this,void 0,void 0,function(){var t=this,n;return lt.__generator(this,function(){return c(this.isNetworkEnabled(),"onWriteStreamClose() should only be called when the network is enabled"),e&&0<this.pendingWrites.length?(c(!!e,"We have pending writes, but the write stream closed without an error"),n=void 0,n=this.writeStream.handshakeComplete?this.handleWriteError(e):this.handleHandshakeError(e),[2,n.then(function(){t.shouldStartWriteStream()&&t.startWriteStream()})]):[2]})})},e.prototype.handleHandshakeError=function(e){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return $(e.code)||e.code===mt.ABORTED?(i(Po,"RemoteStore error before completed handshake; resetting stream token: ",this.writeStream.lastStreamToken),this.writeStream.lastStreamToken=p(),[2,this.localStore.setLastStreamToken(p())]):[2]})})},e.prototype.handleWriteError=function(e){return lt.__awaiter(this,void 0,void 0,function(){var t=this,n;return lt.__generator(this,function(){return $(e.code)?(n=this.pendingWrites.shift(),this.writeStream.inhibitBackoff(),[2,this.syncEngine.rejectFailedWrite(n.batchId,e).then(function(){return t.fillWritePipeline()})]):[2]})})},e.prototype.createTransaction=function(){return new Oo(this.datastore)},e.prototype.handleUserChange=function(e){if(i(Po,"RemoteStore changing users: uid=",e.uid),this.isNetworkEnabled())return this.disableNetworkInternal(),this.onlineStateTracker.set(cr.Unknown),this.enableNetwork()},e}(),Fo=function(){function e(e,t,n,r){this.platform=e,this.databaseInfo=t,this.credentials=n,this.asyncQueue=r}return e.prototype.start=function(e){var t=this,n=new eo,r=new eo,o=!1;return this.credentials.setUserChangeListener(function(i){o?t.asyncQueue.enqueue(function(){return t.handleUserChange(i)}):(o=!0,t.initializePersistence(e,r).then(function(){return t.initializeRest(i)}).then(n.resolve,n.reject))}),this.asyncQueue.enqueue(function(){return n.promise}),r.promise},e.prototype.enableNetwork=function(){var e=this;return this.asyncQueue.enqueue(function(){return e.remoteStore.enableNetwork()})},e.prototype.initializePersistence=function(e,t){var n=this;return e?this.startIndexedDbPersistence().then(t.resolve).catch(function(e){return(t.reject(e),!n.canFallback(e))?Promise.reject(e):(console.warn("Error enabling offline storage. Falling back to storage disabled: "+e),n.startMemoryPersistence())}):(t.resolve(),this.startMemoryPersistence())},e.prototype.canFallback=function(e){return e instanceof gt?e.code===mt.FAILED_PRECONDITION||e.code===mt.UNIMPLEMENTED:"undefined"!=typeof DOMException&&e instanceof DOMException?e.code===22||e.code===20:!0},e.prototype.startIndexedDbPersistence=function(){this.garbageCollector=new So;var e=ho.buildStoragePrefix(this.databaseInfo),t=new Yn(this.databaseInfo.databaseId,{useProto3Json:!0});return this.persistence=new ho(e,t),this.persistence.start()},e.prototype.startMemoryPersistence=function(){return this.garbageCollector=new Sr,this.persistence=new vo,this.persistence.start()},e.prototype.initializeRest=function(e){var t=this;return this.platform.loadConnection(this.databaseInfo).then(function(n){t.localStore=new fo(t.persistence,e,t.garbageCollector);var r=t.platform.newSerializer(t.databaseInfo.databaseId),o=new Lo(t.asyncQueue,n,t.credentials,r);return t.remoteStore=new Bo(t.localStore,o,t.asyncQueue,function(e){t.syncEngine.applyOnlineStateChange(e),t.eventMgr.applyOnlineStateChange(e)}),t.syncEngine=new Dr(t.localStore,t.remoteStore,e),t.remoteStore.syncEngine=t.syncEngine,t.eventMgr=new xr(t.syncEngine),t.localStore.start()}).then(function(){return t.remoteStore.start()})},e.prototype.handleUserChange=function(e){return this.asyncQueue.verifyOperationInProgress(),i("FirestoreClient","User Changed: "+e.uid),this.syncEngine.handleUserChange(e)},e.prototype.disableNetwork=function(){var e=this;return this.asyncQueue.enqueue(function(){return e.remoteStore.disableNetwork()})},e.prototype.shutdown=function(e){var t=this;return this.asyncQueue.enqueue(function(){return t.credentials.removeUserChangeListener(),t.remoteStore.shutdown()}).then(function(){return t.persistence.shutdown(e&&e.purgePersistenceWithDataLoss)})},e.prototype.listen=function(e,t,n){var r=this,o=new vr(e,t,n);return this.asyncQueue.enqueue(function(){return r.eventMgr.listen(o)}),o},e.prototype.unlisten=function(e){var t=this;this.asyncQueue.enqueue(function(){return t.eventMgr.unlisten(e)})},e.prototype.getDocumentFromLocalCache=function(e){var t=this;return this.asyncQueue.enqueue(function(){return t.localStore.readDocument(e)}).then(function(e){if(e instanceof Nt)return e;throw new gt(mt.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)")})},e.prototype.getDocumentsFromLocalCache=function(e){var t=this;return this.asyncQueue.enqueue(function(){return t.localStore.executeQuery(e)}).then(function(t){var n=ie(),r=new Lr(e,n),o=r.computeDocChanges(t);return r.applyChanges(o).snapshot})},e.prototype.write=function(e){var t=this,n=new eo;return this.asyncQueue.enqueue(function(){return t.syncEngine.write(e,n)}),n.promise},e.prototype.databaseId=function(){return this.databaseInfo.databaseId},e.prototype.transaction=function(e){var t=this;return this.asyncQueue.enqueue(function(){return lt.__awaiter(t,void 0,void 0,function(){return lt.__generator(this,function(){return[2]})})}).then(function(){return t.syncEngine.runTransaction(e)})},e}(),Uo=function(){function e(e){this.observer=e,this.muted=!1}return e.prototype.next=function(e){this.scheduleEvent(this.observer.next,e)},e.prototype.error=function(e){this.scheduleEvent(this.observer.error,e)},e.prototype.mute=function(){this.muted=!0},e.prototype.scheduleEvent=function(e,t){var n=this;this.muted||setTimeout(function(){n.muted||e(t)},0)},e}(),zo=function(){function e(e){this.uid=e}return e.prototype.isAuthenticated=function(){return null!=this.uid},e.prototype.toKey=function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"},e.prototype.isEqual=function(e){return e.uid===this.uid},e.UNAUTHENTICATED=new e(null),e.GOOGLE_CREDENTIALS=new e("google-credentials-uid"),e.FIRST_PARTY=new e("first-party-uid"),e}(),jo=function(){return function(e,t){this.user=t,this.type="OAuth",this.authHeaders={Authorization:"Bearer "+e}}}(),qo=function(){function e(){this.userListener=null}return e.prototype.getToken=function(){return Promise.resolve(null)},e.prototype.setUserChangeListener=function(e){c(!this.userListener,"Can only call setUserChangeListener() once."),this.userListener=e,e(zo.UNAUTHENTICATED)},e.prototype.removeUserChangeListener=function(){c(null!==this.userListener,"removeUserChangeListener() when no listener registered"),this.userListener=null},e}(),Vo=function(){function e(e){var t=this;this.app=e,this.tokenListener=null,this.userCounter=0,this.userListener=null,this.tokenListener=function(){var e=t.getUser();t.currentUser&&e.isEqual(t.currentUser)||(t.currentUser=e,t.userCounter++,t.userListener&&t.userListener(t.currentUser))},this.userCounter=0,this.app.INTERNAL.addAuthTokenListener(this.tokenListener)}return e.prototype.getToken=function(e){var t=this;c(null!=this.tokenListener,"getToken cannot be called after listener removed.");var n=this.userCounter;return this.app.INTERNAL.getToken(e).then(function(e){if(t.userCounter!==n)throw new gt(mt.ABORTED,"getToken aborted due to uid change.");else return e?(c("string"==typeof e.accessToken,"Invalid tokenData returned from getToken():"+e),new jo(e.accessToken,t.currentUser)):null})},e.prototype.setUserChangeListener=function(e){c(!this.userListener,"Can only call setUserChangeListener() once."),this.userListener=e,this.currentUser&&e(this.currentUser)},e.prototype.removeUserChangeListener=function(){c(null!=this.tokenListener,"removeUserChangeListener() called twice"),c(null!==this.userListener,"removeUserChangeListener() called when no listener registered"),this.app.INTERNAL.removeAuthTokenListener(this.tokenListener),this.tokenListener=null,this.userListener=null},e.prototype.getUser=function(){"function"!=typeof this.app.INTERNAL.getUid&&d("This version of the Firestore SDK requires at least version 3.7.0 of firebase.js.");var e=this.app.INTERNAL.getUid();return c(null===e||"string"==typeof e,"Received invalid UID: "+e),new zo(e)},e}(),Wo=function(){function e(e,t){this.gapi=e,this.sessionIndex=t,this.type="FirstParty",this.user=zo.FIRST_PARTY,c(this.gapi&&this.gapi.auth&&this.gapi.auth.getAuthHeaderValueForFirstParty,"unexpected gapi interface")}return Object.defineProperty(e.prototype,"authHeaders",{get:function(){return{Authorization:this.gapi.auth.getAuthHeaderValueForFirstParty([]),"X-Goog-AuthUser":this.sessionIndex}},enumerable:!0,configurable:!0}),e}(),Ho=function(){function e(e,t){this.gapi=e,this.sessionIndex=t,c(this.gapi&&this.gapi.auth&&this.gapi.auth.getAuthHeaderValueForFirstParty,"unexpected gapi interface")}return e.prototype.getToken=function(){return Promise.resolve(new Wo(this.gapi,this.sessionIndex))},e.prototype.setUserChangeListener=function(e){e(zo.FIRST_PARTY)},e.prototype.removeUserChangeListener=function(){},e}(),Ko=function(){function e(e){this.methodName=e}return e.delete=function(){return Go.instance},e.serverTimestamp=function(){return Xo.instance},e._arrayUnion=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v("FieldValue.arrayUnion",arguments,1),new Qo(e)},e._arrayRemove=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v("FieldValue.arrayRemove",arguments,1),new Yo(e)},e.prototype.isEqual=function(e){return this===e},e}(),Go=function(e){function t(){return e.call(this,"FieldValue.delete")||this}return lt.__extends(t,e),t.instance=new t,t}(Ko),Xo=function(e){function t(){return e.call(this,"FieldValue.serverTimestamp")||this}return lt.__extends(t,e),t.instance=new t,t}(Ko),Qo=function(e){function t(t){var n=e.call(this,"FieldValue.arrayUnion")||this;return n._elements=t,n}return lt.__extends(t,e),t}(Ko),Yo=function(e){function t(t){var n=e.call(this,"FieldValue.arrayRemove")||this;return n._elements=t,n}return lt.__extends(t,e),t}(Ko),Jo=u(Ko,"Use FieldValue.<field>() instead."),$o=/^__.*__$/,Zo=function(){function e(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}return e.prototype.toMutations=function(e,t){var n=[];return null===this.fieldMask?n.push(new wn(e,this.data,t)):n.push(new Cn(e,this.data,this.fieldMask,t)),0<this.fieldTransforms.length&&n.push(new Tn(e,this.fieldTransforms)),n},e}(),ea=function(){function e(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}return e.prototype.toMutations=function(e,t){var n=[new Cn(e,this.data,this.fieldMask,t)];return 0<this.fieldTransforms.length&&n.push(new Tn(e,this.fieldTransforms)),n},e}(),ta;(function(e){e[e.Set=0]="Set",e[e.Update=1]="Update",e[e.MergeSet=2]="MergeSet",e[e.Argument=3]="Argument"})(ta||(ta={}));var na=function(){function e(e,t,n,r,o,i){this.dataSource=e,this.methodName=t,this.path=n,this.arrayElement=r,void 0===o&&this.validatePath(),this.arrayElement=void 0!==r&&r,this.fieldTransforms=o||[],this.fieldMask=i||[]}return e.prototype.childContextForField=function(t){var n=null==this.path?null:this.path.child(t),r=new e(this.dataSource,this.methodName,n,!1,this.fieldTransforms,this.fieldMask);return r.validatePathSegment(t),r},e.prototype.childContextForFieldPath=function(t){var n=null==this.path?null:this.path.child(t),r=new e(this.dataSource,this.methodName,n,!1,this.fieldTransforms,this.fieldMask);return r.validatePath(),r},e.prototype.childContextForArray=function(){return new e(this.dataSource,this.methodName,null,!0,this.fieldTransforms,this.fieldMask)},e.prototype.createError=function(e){var t=null===this.path||this.path.isEmpty()?"":" (found in field "+this.path.toString()+")";return new gt(mt.INVALID_ARGUMENT,"Function "+this.methodName+"() called with invalid data. "+e+t)},e.prototype.validatePath=function(){if(null!==this.path)for(var e=0;e<this.path.length;e++)this.validatePathSegment(this.path.get(e))},e.prototype.validatePathSegment=function(e){if(je(this.dataSource)&&$o.test(e))throw this.createError("Document fields cannot begin and end with __")},e}(),ra=function(){return function(e,t){this.databaseId=e,this.key=t}}(),oa=function(){function e(e){this.preConverter=e}return e.prototype.parseSetData=function(e,t){var n=new na(ta.Set,e,At.EMPTY_PATH);Ve("Data must be an object, but it was:",n,t);var r=this.parseData(t,n);return new Zo(r,null,n.fieldTransforms)},e.prototype.parseMergeData=function(e,t,n){var r=new na(ta.MergeSet,e,At.EMPTY_PATH);Ve("Data must be an object, but it was:",r,t);var o=this.parseData(t,r),i,s;if(!n)i=new yn(r.fieldMask),s=r.fieldTransforms;else{for(var l=[],p=0,c=n;p<c.length;p++){var u=c[p],h=void 0;if(u instanceof dr?h=u:"string"==typeof u?h=He(e,u):d("Expected stringOrFieldPath to be a string or a FieldPath"),!o.contains(h))throw new gt(mt.INVALID_ARGUMENT,"Field '"+h+"' is specified in your field mask but missing from your input data.");l.push(h)}i=new yn(l),s=r.fieldTransforms.filter(function(e){return i.covers(e.field)})}return new Zo(o,i,s)},e.prototype.parseUpdateData=function(e,t){var n=this,r=new na(ta.Update,e,At.EMPTY_PATH);Ve("Data must be an object, but it was:",r,t);var o=[],i=Jt.EMPTY;f(t,function(t,s){var l=He(e,t),d=r.childContextForFieldPath(l);if(s=n.runPreConverter(s,d),s instanceof Go)o.push(l);else{var p=n.parseData(s,d);null!=p&&(o.push(l),i=i.set(l,p))}});var s=new yn(o);return new ea(i,s,r.fieldTransforms)},e.prototype.parseUpdateVarargs=function(e,t,n,r){var o=new na(ta.Update,e,At.EMPTY_PATH),s=[We(e,t)],l=[n];if(0!=r.length%2)throw new gt(mt.INVALID_ARGUMENT,"Function "+e+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var d=0;d<r.length;d+=2)s.push(We(e,r[d])),l.push(r[d+1]);for(var i=[],p=Jt.EMPTY,d=0;d<s.length;++d){var c=s[d],u=o.childContextForFieldPath(c),h=this.runPreConverter(l[d],u);if(h instanceof Go)i.push(c);else{var m=this.parseData(h,u);null!=m&&(i.push(c),p=p.set(c,m))}}var g=new yn(i);return new ea(p,g,o.fieldTransforms)},e.prototype.parseQueryValue=function(e,t){var n=new na(ta.Argument,e,At.EMPTY_PATH),r=this.parseData(t,n);return c(null!=r,"Parsed data should not be null."),c(0===n.fieldTransforms.length,"Field transforms should have been disallowed."),r},e.prototype.runPreConverter=function(e,t){try{return this.preConverter(e)}catch(r){var n=Ke(r);throw t.createError(n)}},e.prototype.parseData=function(e,t){if(e=this.runPreConverter(e,t),qe(e))return Ve("Unsupported field value:",t,e),this.parseObject(e,t);if(e instanceof Ko)return this.parseSentinelFieldValue(e,t),null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.arrayElement)throw t.createError("Nested arrays are not supported");return this.parseArray(e,t)}return this.parseScalarValue(e,t)},e.prototype.parseObject=function(e,t){var n=this,r=new Ot(z);return f(e,function(e,o){var i=n.parseData(o,t.childContextForField(e));null!=i&&(r=r.insert(e,i))}),new Jt(r)},e.prototype.parseArray=function(e,t){for(var n=[],r=0,o=0,i=e;o<i.length;o++){var s=i[o],l=this.parseData(s,t.childContextForArray(r));null==l&&(l=zt.INSTANCE),n.push(l),r++}return new $t(n)},e.prototype.parseSentinelFieldValue=function(e,t){if(!je(t.dataSource))throw t.createError(e.methodName+"() can only be used with update() and set()");if(null===t.path)throw t.createError(e.methodName+"() is not currently supported inside arrays");if(e instanceof Go){if(t.dataSource===ta.MergeSet)t.fieldMask.push(t.path);else if(t.dataSource===ta.Update)throw c(0<t.path.length,"FieldValue.delete() at the top level should have already been handled."),t.createError("FieldValue.delete() can only appear at the top level of your update data");else throw t.createError("FieldValue.delete() cannot be used with set() unless you pass {merge:true}");}else if(e instanceof Xo)t.fieldTransforms.push(new bn(t.path,Wn.instance));else if(e instanceof Qo){var n=this.parseArrayTransformElements(e.methodName,e._elements),r=new Hn(n);t.fieldTransforms.push(new bn(t.path,r))}else if(e instanceof Yo){var n=this.parseArrayTransformElements(e.methodName,e._elements),o=new Kn(n);t.fieldTransforms.push(new bn(t.path,o))}else d("Unknown FieldValue type: "+e)},e.prototype.parseScalarValue=function(e,t){if(null===e)return zt.INSTANCE;if("number"==typeof e)return Y(e)?new Vt(e):new Wt(e);if("boolean"==typeof e)return jt.of(e);if("string"==typeof e)return new Ht(e);if(e instanceof Date)return new Kt(vt.fromDate(e));if(e instanceof vt)return new Kt(new vt(e.seconds,1e3*nt(e.nanoseconds/1e3)));if(e instanceof xt)return new Yt(e);if(e instanceof yt)return new Xt(e);if(e instanceof ra)return new Qt(e.databaseId,e.key);throw t.createError("Unsupported field value: "+M(e))},e.prototype.parseArrayTransformElements=function(e,t){var n=this;return t.map(function(t,r){var o=new na(ta.Argument,e,At.EMPTY_PATH);return n.parseData(t,o.childContextForArray(r))})},e}(),aa=!0,ia=function(){function e(e){if(void 0===e.host){if(void 0!==e.ssl)throw new gt(mt.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=aa}else T("settings","string","host",e.host),this.host=e.host,_("settings","boolean","ssl",e.ssl),this.ssl=m(e.ssl,aa);P("settings",e,["host","ssl","credentials","timestampsInSnapshots"]),_("settings","object","credentials",e.credentials),this.credentials=e.credentials,_("settings","boolean","timestampsInSnapshots",e.timestampsInSnapshots),this.timestampsInSnapshots=m(e.timestampsInSnapshots,!1)}return e.prototype.isEqual=function(e){return this.host===e.host&&this.ssl===e.ssl&&this.timestampsInSnapshots===e.timestampsInSnapshots&&this.credentials===e.credentials},e}(),sa=function(){return function(){}}(),la=function(){function e(t){var n=this;this._queue=new To,this.INTERNAL={delete:function(e){return lt.__awaiter(n,void 0,void 0,function(){return lt.__generator(this,function(){return this._firestoreClient?[2,this._firestoreClient.shutdown(e)]:[2]})})}};var r=new sa;if("object"==typeof t.options){var o=t;r.firebaseApp=o,r.databaseId=e.databaseIdFromApp(o),r.persistenceKey=r.firebaseApp.name,r.credentials=new Vo(o)}else{var i=t;if(!i.projectId)throw new gt(mt.INVALID_ARGUMENT,"Must provide projectId");r.databaseId=new wt(i.projectId,i.database),r.persistenceKey="[DEFAULT]",r.credentials=new qo}r.settings=new ia({}),this._config=r,this._databaseId=r.databaseId}return e.prototype.settings=function(e){if(x("Firestore.settings",arguments,1),w("Firestore.settings","object",1,e),h(e,"persistence"))throw new gt(mt.INVALID_ARGUMENT,"\"persistence\" is now specified with a separate call to firestore.enablePersistence().");var t=new ia(e);if(this._firestoreClient&&!this._config.settings.isEqual(t))throw new gt(mt.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only call settings() before calling any other methods on a Firestore object.");this._config.settings=t,void 0!==t.credentials&&(this._config.credentials=Fe(t.credentials))},e.prototype.enableNetwork=function(){return this.ensureClientConfigured(),this._firestoreClient.enableNetwork()},e.prototype.disableNetwork=function(){return this.ensureClientConfigured(),this._firestoreClient.disableNetwork()},e.prototype.enablePersistence=function(){if(this._firestoreClient)throw new gt(mt.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only call enablePersistence() before calling any other methods on a Firestore object.");return this.configureClient(!0)},e.prototype.ensureClientConfigured=function(){return this._firestoreClient||this.configureClient(!1),this._firestoreClient},e.prototype.configureClient=function(e){var t=this;c(!!this._config.settings.host,"FirestoreSettings.host cannot be falsey"),this._config.settings.timestampsInSnapshots||s("\nThe behavior for Date objects stored in Firestore is going to change\nAND YOUR APP MAY BREAK.\nTo hide this warning and ensure your app does not break, you need to add the\nfollowing code to your app before calling any other Cloud Firestore methods:\n\n const firestore = firebase.firestore();\n const settings = {/* your settings... */ timestampsInSnapshots: true};\n firestore.settings(settings);\n\nWith this change, timestamps stored in Cloud Firestore will be read back as\nFirebase Timestamp objects instead of as system Date objects. So you will also\nneed to update code expecting a Date to instead expect a Timestamp. For example:\n\n // Old:\n const date = snapshot.get('created_at');\n // New:\n const timestamp = snapshot.get('created_at');\n const date = timestamp.toDate();\n\nPlease audit all existing usages of Date when you enable the new behavior. In a\nfuture release, the behavior will change to the new behavior, so if you do not\nfollow these steps, YOUR APP MAY BREAK."),c(!this._firestoreClient,"configureClient() called multiple times");var n=new kt(this._config.databaseId,this._config.persistenceKey,this._config.settings.host,this._config.settings.ssl);return this._dataConverter=new oa(function(e){if(e instanceof ca){var n=t._config.databaseId,r=e.firestore._config.databaseId;if(!r.isEqual(n))throw new gt(mt.INVALID_ARGUMENT,"Document reference is for database "+(r.projectId+"/"+r.database+" but should be ")+("for database "+n.projectId+"/"+n.database));return new ra(t._config.databaseId,e._key)}return e}),this._firestoreClient=new Fo(ht.getPlatform(),n,this._config.credentials,this._queue),this._firestoreClient.start(e)},e.databaseIdFromApp=function(e){var t=e.options;if(!h(t,"projectId")){if(h(t,"firestoreId"))throw new gt(mt.INVALID_ARGUMENT,"\"firestoreId\" is now specified as \"projectId\" in firebase.initializeApp.");throw new gt(mt.INVALID_ARGUMENT,"\"projectId\" not provided in firebase.initializeApp.")}if(h(t,"firestoreOptions"))throw new gt(mt.INVALID_ARGUMENT,"\"firestoreOptions\" values are now specified with Firestore.settings()");var n=t.projectId;if(!n||"string"!=typeof n)throw new gt(mt.INVALID_ARGUMENT,"projectId must be a string in FirebaseApp.options");return new wt(n)},Object.defineProperty(e.prototype,"app",{get:function(){if(!this._config.firebaseApp)throw new gt(mt.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._config.firebaseApp},enumerable:!0,configurable:!0}),e.prototype.collection=function(e){if(x("Firestore.collection",arguments,1),w("Firestore.collection","string",1,e),!e)throw new gt(mt.INVALID_ARGUMENT,"Must provide a non-empty collection path to collection()");return this.ensureClientConfigured(),new ba(_t.fromString(e),this)},e.prototype.doc=function(e){if(x("Firestore.doc",arguments,1),w("Firestore.doc","string",1,e),!e)throw new gt(mt.INVALID_ARGUMENT,"Must provide a non-empty document path to doc()");return this.ensureClientConfigured(),ca.forPath(_t.fromString(e),this)},e.prototype.runTransaction=function(e){var t=this;return x("Firestore.runTransaction",arguments,1),w("Firestore.runTransaction","function",1,e),this.ensureClientConfigured().transaction(function(n){return e(new da(t,n))})},e.prototype.batch=function(){return this.ensureClientConfigured(),new pa(this)},Object.defineProperty(e,"logLevel",{get:function(){switch(r()){case ut.DEBUG:return"debug";case ut.ERROR:return"error";case ut.SILENT:return"silent";default:return d("Unknown log level: "+r());}},enumerable:!0,configurable:!0}),e.setLogLevel=function(e){switch(x("Firestore.setLogLevel",arguments,1),w("Firestore.setLogLevel","string",1,e),e){case"debug":o(ut.DEBUG);break;case"error":o(ut.ERROR);break;case"silent":o(ut.SILENT);break;default:throw new gt(mt.INVALID_ARGUMENT,"Invalid log level: "+e);}},e.prototype._areTimestampsInSnapshotsEnabled=function(){return this._config.settings.timestampsInSnapshots},e}(),da=function(){function e(e,t){this._firestore=e,this._transaction=t}return e.prototype.get=function(e){var t=this;x("Transaction.get",arguments,1);var n=Ye("Transaction.get",e,this._firestore);return this._transaction.lookup([n._key]).then(function(e){if(!e||1!==e.length)return d("Mismatch in docs returned from document lookup.");var r=e[0];return r instanceof Lt?new ha(t._firestore,n._key,null,!1):new ha(t._firestore,n._key,r,!1)})},e.prototype.set=function(e,t,n){k("Transaction.set",arguments,2,3);var r=Ye("Transaction.set",e,this._firestore);n=Xe("Transaction.set",n);var o=n.merge||n.mergeFields?this._firestore._dataConverter.parseMergeData("Transaction.set",t,n.mergeFields):this._firestore._dataConverter.parseSetData("Transaction.set",t);return this._transaction.set(r._key,o),this},e.prototype.update=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i,s;return"string"==typeof t||t instanceof dr?(v("Transaction.update",arguments,3),i=Ye("Transaction.update",e,this._firestore),s=this._firestore._dataConverter.parseUpdateVarargs("Transaction.update",t,n,r)):(x("Transaction.update",arguments,2),i=Ye("Transaction.update",e,this._firestore),s=this._firestore._dataConverter.parseUpdateData("Transaction.update",t)),this._transaction.update(i._key,s),this},e.prototype.delete=function(e){x("Transaction.delete",arguments,1);var t=Ye("Transaction.delete",e,this._firestore);return this._transaction.delete(t._key),this},e}(),pa=function(){function e(e){this._firestore=e,this._mutations=[],this._committed=!1}return e.prototype.set=function(e,t,n){k("WriteBatch.set",arguments,2,3),this.verifyNotCommitted();var r=Ye("WriteBatch.set",e,this._firestore);n=Xe("WriteBatch.set",n);var o=n.merge||n.mergeFields?this._firestore._dataConverter.parseMergeData("WriteBatch.set",t,n.mergeFields):this._firestore._dataConverter.parseSetData("WriteBatch.set",t);return this._mutations=this._mutations.concat(o.toMutations(r._key,kn.NONE)),this},e.prototype.update=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];this.verifyNotCommitted();var i,s;return"string"==typeof t||t instanceof dr?(v("WriteBatch.update",arguments,3),i=Ye("WriteBatch.update",e,this._firestore),s=this._firestore._dataConverter.parseUpdateVarargs("WriteBatch.update",t,n,r)):(x("WriteBatch.update",arguments,2),i=Ye("WriteBatch.update",e,this._firestore),s=this._firestore._dataConverter.parseUpdateData("WriteBatch.update",t)),this._mutations=this._mutations.concat(s.toMutations(i._key,kn.exists(!0))),this},e.prototype.delete=function(e){x("WriteBatch.delete",arguments,1),this.verifyNotCommitted();var t=Ye("WriteBatch.delete",e,this._firestore);return this._mutations=this._mutations.concat(new _n(t._key,kn.NONE)),this},e.prototype.commit=function(){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return this.verifyNotCommitted(),this._committed=!0,0<this._mutations.length?[2,this._firestore.ensureClientConfigured().write(this._mutations)]:[2]})})},e.prototype.verifyNotCommitted=function(){if(this._committed)throw new gt(mt.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},e}(),ca=function(){function e(e,t){this._key=e,this.firestore=t,this._firestoreClient=this.firestore.ensureClientConfigured()}return e.forPath=function(t,n){if(0!=t.length%2)throw new gt(mt.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+(t.canonicalString()+" has "+t.length));return new e(new It(t),n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new ba(this._key.path.popLast(),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._key.path.canonicalString()},enumerable:!0,configurable:!0}),e.prototype.collection=function(e){if(x("DocumentReference.collection",arguments,1),w("DocumentReference.collection","string",1,e),!e)throw new gt(mt.INVALID_ARGUMENT,"Must provide a non-empty collection name to collection()");var t=_t.fromString(e);return new ba(this._key.path.child(t),this.firestore)},e.prototype.isEqual=function(t){if(!(t instanceof e))throw B("isEqual","DocumentReference",1,t);return this.firestore===t.firestore&&this._key.isEqual(t._key)},e.prototype.set=function(e,t){k("DocumentReference.set",arguments,1,2),t=Xe("DocumentReference.set",t);var n=t.merge||t.mergeFields?this.firestore._dataConverter.parseMergeData("DocumentReference.set",e,t.mergeFields):this.firestore._dataConverter.parseSetData("DocumentReference.set",e);return this._firestoreClient.write(n.toMutations(this._key,kn.NONE))},e.prototype.update=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o;return"string"==typeof e||e instanceof dr?(v("DocumentReference.update",arguments,2),o=this.firestore._dataConverter.parseUpdateVarargs("DocumentReference.update",e,t,n)):(x("DocumentReference.update",arguments,1),o=this.firestore._dataConverter.parseUpdateData("DocumentReference.update",e)),this._firestoreClient.write(o.toMutations(this._key,kn.exists(!0)))},e.prototype.delete=function(){return x("DocumentReference.delete",arguments,0),this._firestoreClient.write([new _n(this._key,kn.NONE)])},e.prototype.onSnapshot=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];k("DocumentReference.onSnapshot",arguments,1,4);var n={includeMetadataChanges:!1},r=0,o;"object"!=typeof e[r]||Ue(e[r])||(n=e[r],P("DocumentReference.onSnapshot",n,["includeMetadataChanges"]),_("DocumentReference.onSnapshot","boolean","includeMetadataChanges",n.includeMetadataChanges),r++);var i={includeMetadataChanges:n.includeMetadataChanges};return Ue(e[r])?o=e[r]:(w("DocumentReference.onSnapshot","function",r,e[r]),C("DocumentReference.onSnapshot","function",r+1,e[r+1]),C("DocumentReference.onSnapshot","function",r+2,e[r+2]),o={next:e[r],error:e[r+1],complete:e[r+2]}),this.onSnapshotInternal(i,o)},e.prototype.onSnapshotInternal=function(e,t){var n=this,r=function(e){console.error("Uncaught Error in onSnapshot:",e)};t.error&&(r=t.error.bind(t));var o=new Uo({next:function(e){if(t.next){c(1>=e.docs.size,"Too many documents returned on a document query");var r=e.docs.get(n._key);t.next(new ha(n.firestore,n._key,r,e.fromCache))}},error:r}),i=this._firestoreClient.listen(rn.atPath(this._key.path),o,e);return function(){o.mute(),n._firestoreClient.unlisten(i)}},e.prototype.get=function(e){var t=this;return P("DocumentReference.get",e,["source"]),e&&N("DocumentReference.get","options","source",e.source,["default","server","cache"]),new Promise(function(n,r){e&&"cache"===e.source?t.firestore.ensureClientConfigured().getDocumentFromLocalCache(t._key).then(function(e){n(new ha(t.firestore,t._key,e,!0))},r):t.getViaSnapshotListener(n,r,e)})},e.prototype.getViaSnapshotListener=function(e,t,n){var r=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(o){r(),!o.exists&&o.metadata.fromCache?t(new gt(mt.UNAVAILABLE,"Failed to get document because the client is offline.")):o.exists&&o.metadata.fromCache&&n&&"server"===n.source?t(new gt(mt.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.)")):e(o)},error:t})},e}(),ua=function(){function e(e,t){this.hasPendingWrites=e,this.fromCache=t}return e.prototype.isEqual=function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache},e}(),ha=function(){function e(e,t,n,r){this._firestore=e,this._key=t,this._document=n,this._fromCache=r}return e.prototype.data=function(e){return k("DocumentSnapshot.data",arguments,0,1),e=Qe("DocumentSnapshot.data",e),this._document?this.convertObject(this._document.data,Ft.fromSnapshotOptions(e,this._firestore._areTimestampsInSnapshotsEnabled())):void 0},e.prototype.get=function(e,t){if(k("DocumentSnapshot.get",arguments,1,2),t=Qe("DocumentSnapshot.get",t),this._document){var n=this._document.data.field(We("DocumentSnapshot.get",e));if(void 0!==n)return this.convertValue(n,Ft.fromSnapshotOptions(t,this._firestore._areTimestampsInSnapshotsEnabled()))}},Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return new ca(this._key,this._firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"exists",{get:function(){return null!==this._document},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return new ua(null!==this._document&&this._document.hasLocalMutations,this._fromCache)},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){if(!(t instanceof e))throw B("isEqual","DocumentSnapshot",1,t);return this._firestore===t._firestore&&this._fromCache===t._fromCache&&this._key.isEqual(t._key)&&(null===this._document?null===t._document:this._document.isEqual(t._document))},e.prototype.convertObject=function(e,t){var n=this,r={};return e.forEach(function(e,o){r[e]=n.convertValue(o,t)}),r},e.prototype.convertValue=function(e,t){if(e instanceof Jt)return this.convertObject(e,t);if(e instanceof $t)return this.convertArray(e,t);if(e instanceof Qt){var n=e.value(t),r=this._firestore.ensureClientConfigured().databaseId();return e.databaseId.isEqual(r)||s("Document "+this._key.path+" contains a document reference within a different database ("+(e.databaseId.projectId+"/"+e.databaseId.database+") which is not supported. It will be treated as a reference in the current ")+("database ("+r.projectId+"/"+r.database+") instead.")),new ca(n,this._firestore)}return e.value(t)},e.prototype.convertArray=function(e,t){var n=this;return e.internalValue.map(function(e){return n.convertValue(e,t)})},e}(),ma=function(e){function t(t,n,r,o){return e.call(this,t,n,r,o)||this}return lt.__extends(t,e),t.prototype.data=function(t){var n=e.prototype.data.call(this,t);return c("object"==typeof n,"Document in a QueryDocumentSnapshot should exist"),n},t}(ha),ga=function(){function e(e,t){this._query=e,this.firestore=t}return e.prototype.where=function(t,n,r){x("Query.where",arguments,3),w("Query.where","string",2,n),R("Query.where",3,r);var o=We("Query.where",t),i=on.fromString(n),s;if(o.isKeyField()){if(i===on.ARRAY_CONTAINS)throw new gt(mt.INVALID_ARGUMENT,"Invalid Query. You can't perform array-contains queries on FieldPath.documentId() since document IDs are not arrays.");if("string"==typeof r){if(-1!==r.indexOf("/"))throw new gt(mt.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(""===r)throw new gt(mt.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 l=this._query.path.child(new _t([r]));c(0==l.length%2,"Path should be a document key"),s=new Qt(this.firestore._databaseId,new It(l))}else if(r instanceof ca){s=new Qt(this.firestore._databaseId,r._key)}else throw new gt(mt.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: "+(M(r)+"."))}else s=this.firestore._dataConverter.parseQueryValue("Query.where",r);var d=J(o,i,s);return this.validateNewFilter(d),new e(this._query.addFilter(d),this.firestore)},e.prototype.orderBy=function(t,n){k("Query.orderBy",arguments,1,2),C("Query.orderBy","string",2,n);var r;if(void 0===n||"asc"===n)r=dn.ASCENDING;else if("desc"===n)r=dn.DESCENDING;else throw new gt(mt.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+n+"', expected 'asc' or 'desc'.");if(null!==this._query.startAt)throw new gt(mt.INVALID_ARGUMENT,"Invalid query. You must not call Query.startAt() or Query.startAfter() before calling Query.orderBy().");if(null!==this._query.endAt)throw new gt(mt.INVALID_ARGUMENT,"Invalid query. You must not call Query.endAt() or Query.endBefore() before calling Query.orderBy().");var o=We("Query.orderBy",t),i=new cn(o,r);return this.validateNewOrderBy(i),new e(this._query.addOrderBy(i),this.firestore)},e.prototype.limit=function(t){if(x("Query.limit",arguments,1),w("Query.limit","number",1,t),0>=t)throw new gt(mt.INVALID_ARGUMENT,"Invalid Query. Query limit ("+t+") is invalid. Limit must be positive.");return new e(this._query.withLimit(t),this.firestore)},e.prototype.startAt=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];v("Query.startAt",arguments,1);var o=this.boundFromDocOrFields("Query.startAt",t,n,!0);return new e(this._query.withStartAt(o),this.firestore)},e.prototype.startAfter=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];v("Query.startAfter",arguments,1);var o=this.boundFromDocOrFields("Query.startAfter",t,n,!1);return new e(this._query.withStartAt(o),this.firestore)},e.prototype.endBefore=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];v("Query.endBefore",arguments,1);var o=this.boundFromDocOrFields("Query.endBefore",t,n,!0);return new e(this._query.withEndAt(o),this.firestore)},e.prototype.endAt=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];v("Query.endAt",arguments,1);var o=this.boundFromDocOrFields("Query.endAt",t,n,!1);return new e(this._query.withEndAt(o),this.firestore)},e.prototype.isEqual=function(t){if(!(t instanceof e))throw B("isEqual","Query",1,t);return this.firestore===t.firestore&&this._query.isEqual(t._query)},e.prototype.boundFromDocOrFields=function(e,t,n,r){if(R(e,1,t),t instanceof ha){if(0<n.length)throw new gt(mt.INVALID_ARGUMENT,"Too many arguments provided to "+e+"().");var o=t;if(!o.exists)throw new gt(mt.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+(e+"()."));return this.boundFromDocument(e,o._document,r)}var i=[t].concat(n);return this.boundFromFields(e,i,r)},e.prototype.boundFromDocument=function(e,t,n){for(var r=[],o=0,i=this._query.orderBy,s;o<i.length;o++)if(s=i[o],s.field.isKeyField())r.push(new Qt(this.firestore._databaseId,t.key));else{var l=t.field(s.field);if(void 0!==l)r.push(l);else{var d=s.field.canonicalString();throw new gt(mt.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+d+"' (used as the orderBy) does not exist.")}}return new pn(r,n)},e.prototype.boundFromFields=function(e,t,n){var r=this._query.explicitOrderBy;if(t.length>r.length)throw new gt(mt.INVALID_ARGUMENT,"Too many arguments provided to "+e+"(). The number of arguments must be less than or equal to the number of Query.orderBy() clauses");for(var o=[],s=0;s<t.length;s++){var i=t[s],l=r[s];if(l.field.isKeyField()){if("string"!=typeof i)throw new gt(mt.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+(e+"(), but got a "+typeof i));if(-1!==i.indexOf("/"))throw new gt(mt.INVALID_ARGUMENT,"Invalid query. Document ID '"+i+"' contains a slash in "+(e+"()"));var d=new It(this._query.path.child(i));o.push(new Qt(this.firestore._databaseId,d))}else{var p=this.firestore._dataConverter.parseQueryValue(e,i);o.push(p)}}return new pn(o,n)},e.prototype.onSnapshot=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];k("Query.onSnapshot",arguments,1,4);var n={},r=0,o;return"object"!=typeof e[r]||Ue(e[r])||(n=e[r],P("Query.onSnapshot",n,["includeMetadataChanges"]),_("Query.onSnapshot","boolean","includeMetadataChanges",n.includeMetadataChanges),r++),Ue(e[r])?o=e[r]:(w("Query.onSnapshot","function",r,e[r]),C("Query.onSnapshot","function",r+1,e[r+1]),C("Query.onSnapshot","function",r+2,e[r+2]),o={next:e[r],error:e[r+1],complete:e[r+2]}),this.onSnapshotInternal(n,o)},e.prototype.onSnapshotInternal=function(e,t){var n=this,r=function(e){console.error("Uncaught Error in onSnapshot:",e)};t.error&&(r=t.error.bind(t));var o=new Uo({next:function(e){t.next&&t.next(new fa(n.firestore,n._query,e))},error:r}),i=this.firestore.ensureClientConfigured(),s=i.listen(this._query,o,e);return function(){o.mute(),i.unlisten(s)}},e.prototype.get=function(e){var t=this;return k("Query.get",arguments,0,1),new Promise(function(n,r){e&&"cache"===e.source?t.firestore.ensureClientConfigured().getDocumentsFromLocalCache(t._query).then(function(e){n(new fa(t.firestore,t._query,e))},r):t.getViaSnapshotListener(n,r,e)})},e.prototype.getViaSnapshotListener=function(e,t,n){var r=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(o){r(),o.metadata.fromCache&&n&&"server"===n.source?t(new gt(mt.UNAVAILABLE,"Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to \"server\" to retrieve the cached documents.)")):e(o)},error:t})},e.prototype.validateNewFilter=function(e){if(e instanceof an)if(e.isInequality()){var t=this._query.getInequalityFilterField();if(null!==t&&!t.isEqual(e.field))throw new gt(mt.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, >, or >=) must be on the same field. But you have inequality filters on '"+t.toString()+"'"+(" and '"+e.field.toString()+"'"));var n=this._query.getFirstOrderByField();null!==n&&this.validateOrderByAndInequalityMatch(e.field,n)}else if(e.op===on.ARRAY_CONTAINS&&this._query.hasArrayContainsFilter())throw new gt(mt.INVALID_ARGUMENT,"Invalid query. Queries only support a single array-contains filter.")},e.prototype.validateNewOrderBy=function(e){if(null===this._query.getFirstOrderByField()){var t=this._query.getInequalityFilterField();null!==t&&this.validateOrderByAndInequalityMatch(t,e.field)}},e.prototype.validateOrderByAndInequalityMatch=function(e,t){if(!t.isEqual(e))throw new gt(mt.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+e.toString()+"' "+("and so you must also use '"+e.toString()+"' as your first Query.orderBy(), but your first Query.orderBy() ")+("is on field '"+t.toString()+"' instead."))},e}(),fa=function(){function e(e,t,n){this._firestore=e,this._originalQuery=t,this._snapshot=n,this._cachedChanges=null,this._cachedChangesIncludeMetadataChanges=null,this.metadata=new ua(n.hasPendingWrites,n.fromCache)}return Object.defineProperty(e.prototype,"docs",{get:function(){var e=[];return this.forEach(function(t){return e.push(t)}),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this._snapshot.docs.isEmpty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e,t){var n=this;k("QuerySnapshot.forEach",arguments,1,2),w("QuerySnapshot.forEach","function",1,e),this._snapshot.docs.forEach(function(r){e.call(t,n.convertToDocumentImpl(r))})},Object.defineProperty(e.prototype,"query",{get:function(){return new ga(this._originalQuery,this._firestore)},enumerable:!0,configurable:!0}),e.prototype.docChanges=function(e){P("QuerySnapshot.docChanges",e,["includeMetadataChanges"]),e&&_("QuerySnapshot.docChanges","boolean","includeMetadataChanges",e.includeMetadataChanges);var t=e&&e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new gt(mt.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=Je(this._firestore,t,this._snapshot),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges},e.prototype.isEqual=function(t){if(!(t instanceof e))throw B("isEqual","QuerySnapshot",1,t);return this._firestore===t._firestore&&this._originalQuery.isEqual(t._originalQuery)&&this._snapshot.isEqual(t._snapshot)},e.prototype.convertToDocumentImpl=function(e){return new ma(this._firestore,e.key,e,this.metadata.fromCache)},e}(),ya=["length","forEach","map"].concat("undefined"==typeof Symbol?[]:[Symbol.iterator]);ya.forEach(function(e){try{Object.defineProperty(fa.prototype.docChanges,e,{get:function(){return Ge()}})}catch(e){}});var ba=function(e){function t(t,n){var r=e.call(this,rn.atPath(t),n)||this;if(1!=t.length%2)throw new gt(mt.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+(t.canonicalString()+" has "+t.length));return r}return lt.__extends(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this._query.path.popLast();return e.isEmpty()?null:new ca(new It(e),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!0,configurable:!0}),t.prototype.doc=function(e){if(k("CollectionReference.doc",arguments,0,1),0===arguments.length&&(e=ft.newId()),w("CollectionReference.doc","string",1,e),""===e)throw new gt(mt.INVALID_ARGUMENT,"Document path must be a non-empty string");var t=_t.fromString(e);return ca.forPath(this._query.path.child(t),this.firestore)},t.prototype.add=function(e){x("CollectionReference.add",arguments,1),w("CollectionReference.add","object",1,e);var t=this.doc();return t.set(e).then(function(){return t})},t}(ga),xa=u(la,"Use firebase.firestore() instead."),va=u(da,"Use firebase.firestore().runTransaction() instead."),ka=u(pa,"Use firebase.firestore().batch() instead."),Sa=u(ca,"Use firebase.firestore().doc() instead."),wa=u(ha),Ca=u(ma),Ta=u(ga),_a=u(fa),Ea=u(ba,"Use firebase.firestore().collection() instead."),Aa={Firestore:xa,GeoPoint:xt,Timestamp:vt,Blob:bt,Transaction:va,WriteBatch:ka,DocumentReference:Sa,DocumentSnapshot:wa,Query:Ta,QueryDocumentSnapshot:Ca,QuerySnapshot:_a,CollectionReference:Ea,FieldPath:dr,FieldValue:Jo,setLogLevel:la.setLogLevel};et(it),t.registerFirestore=et},"ew/s":function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("4e7A"))})(function(e){function t(e,t,n,r,o){e.openDialog?e.openDialog(t,o,{value:r,selectValueOnOpen:!0}):o(prompt(n,r))}function n(e,t){var n=+t;return /^[-+]/.test(t)?e.getCursor().line+n:n-1}e.commands.jumpToLine=function(e){var r=e.getCursor();t(e,"Jump to line: <input type=\"text\" style=\"width: 10em\" class=\"CodeMirror-search-field\"/> <span style=\"color: #888\" class=\"CodeMirror-search-hint\">(Use line:column or scroll% syntax)</span>","Jump to line:",r.line+1+":"+r.ch,function(t){if(t){var o;if(o=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(n(e,o[1]),+o[2]);else if(o=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var i=Math.round(e.lineCount()*+o[1]/100);/^[-+]/.test(o[1])&&(i=r.line+i+1),e.setCursor(i-1,r.ch)}else(o=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(n(e,o[1]),r.ch)}})},e.keyMap["default"]["Alt-G"]="jumpToLine"})},f4vO:function(e,t,n){"use strict";var r=n("tbG5").assign,o=n("nFS2"),i=n("faQk"),s=n("xUUw"),l={};r(l,o,i,s),e.exports=l},fOjT:function(e,t,n){"use strict";e.exports=n("fnRj")},faQk:function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&16>t.windowBits&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),0<=t.windowBits&&16>t.windowBits&&!(e&&e.windowBits)&&(t.windowBits+=32),15<t.windowBits&&48>t.windowBits&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,t.windowBits);if(n!==d.Z_OK)throw new Error(p[n]);this.header=new u,i.inflateGetHeader(this.strm,this.header)}function o(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||p[n.err];return n.result}var i=n("GIDK"),s=n("tbG5"),l=n("34Q3"),d=n("xUUw"),p=n("gMAY"),c=n("bdtv"),u=n("/+WI"),h=Object.prototype.toString;r.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,o=this.options.dictionary,p=!1,c,u,m,g,f,y;if(this.ended)return!1;u=t===~~t?t:!0===t?d.Z_FINISH:d.Z_NO_FLUSH,n.input="string"==typeof e?l.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length;do{if(0===n.avail_out&&(n.output=new s.Buf8(r),n.next_out=0,n.avail_out=r),c=i.inflate(n,d.Z_NO_FLUSH),c===d.Z_NEED_DICT&&o&&(y="string"==typeof o?l.string2buf(o):"[object ArrayBuffer]"===h.call(o)?new Uint8Array(o):o,c=i.inflateSetDictionary(this.strm,y)),c===d.Z_BUF_ERROR&&!0==p&&(c=d.Z_OK,p=!1),c!==d.Z_STREAM_END&&c!==d.Z_OK)return this.onEnd(c),this.ended=!0,!1;n.next_out&&(0===n.avail_out||c===d.Z_STREAM_END||0===n.avail_in&&(u===d.Z_FINISH||u===d.Z_SYNC_FLUSH))&&("string"===this.options.to?(m=l.utf8border(n.output,n.next_out),g=n.next_out-m,f=l.buf2string(n.output,m),n.next_out=g,n.avail_out=r-g,g&&s.arraySet(n.output,n.output,m,g,0),this.onData(f)):this.onData(s.shrinkBuf(n.output,n.next_out))),0===n.avail_in&&0===n.avail_out&&(p=!0)}while((0<n.avail_in||0===n.avail_out)&&c!==d.Z_STREAM_END);return c===d.Z_STREAM_END&&(u=d.Z_FINISH),u===d.Z_FINISH?(c=i.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===d.Z_OK):u!==d.Z_SYNC_FLUSH||(this.onEnd(d.Z_OK),n.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){e===d.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=r,t.inflate=o,t.inflateRaw=function(e,t){return t=t||{},t.raw=!0,o(e,t)},t.ungzip=o},fnRj:function(e,t,n){"use strict";function r(){o.call(this)}e.exports=r;var o=n("FRpO").EventEmitter,i=n("4Bm0");i(r,o),r.Readable=n("tzeh"),r.Writable=n("LnjZ"),r.Duplex=n("kT1X"),r.Transform=n("A9/K"),r.PassThrough=n("C6nS"),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&p.pause&&p.pause()}function r(){p.readable&&p.resume&&p.resume()}function i(){c||(c=!0,e.end())}function s(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(d(),0===o.listenerCount(this,"error"))throw e}function d(){p.removeListener("data",n),e.removeListener("drain",r),p.removeListener("end",i),p.removeListener("close",s),p.removeListener("error",l),e.removeListener("error",l),p.removeListener("end",d),p.removeListener("close",d),e.removeListener("close",d)}var p=this;p.on("data",n),e.on("drain",r),e._isStdio||t&&!1===t.end||(p.on("end",i),p.on("close",s));var c=!1;return p.on("error",l),e.on("error",l),p.on("end",d),p.on("close",d),e.on("close",d),e.emit("pipe",p),e}},gMAY:function(e){"use strict";e.exports={0:"",1:"stream end",2:"need dictionary","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},gPKv:function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){function t(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",s),e.removeLineClass(e.state.activeLines[t],"background",l),e.removeLineClass(e.state.activeLines[t],"gutter",d)}function n(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function r(e,r){for(var o=[],p=0;p<r.length;p++){var i=r[p],c=e.getOption("styleActiveLine");if("object"==typeof c&&c.nonEmpty?i.anchor.line==i.head.line:!!i.empty()){var u=e.getLineHandleVisualStart(i.head.line);o[o.length-1]!=u&&o.push(u)}}n(e.state.activeLines,o)||e.operation(function(){t(e);for(var n=0;n<o.length;n++)e.addLineClass(o[n],"wrap",s),e.addLineClass(o[n],"background",l),e.addLineClass(o[n],"gutter",d);e.state.activeLines=o})}function o(e,t){r(e,t.ranges)}var s="CodeMirror-activeline",l="CodeMirror-activeline-background",d="CodeMirror-activeline-gutter";e.defineOption("styleActiveLine",!1,function(n,i,s){var l=s!=e.Init&&s;i==l||(l&&(n.off("beforeSelectionChange",o),t(n),delete n.state.activeLines),i&&(n.state.activeLines=[],r(n,n.listSelections()),n.on("beforeSelectionChange",o)))})})},"geN+":function(e,t,n){"use strict";var r=n("2P9T"),o=n("ABU1"),s=n("Sm7/"),l=n("PO9O"),d=n("ZKdc"),p=function(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}};p.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");n=e.toLowerCase();var o="string"===n||"text"===n;("binarystring"===n||"text"===n)&&(n="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!o&&(t=t.pipe(new s.Utf8EncodeWorker)),!i&&o&&(t=t.pipe(new s.Utf8DecodeWorker))}catch(n){t=new d("error"),t.error(n)}return new r(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof l&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new s.Utf8EncodeWorker)),l.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof l?this._data.getContentWorker():this._data instanceof d?this._data:new o(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],u=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<c.length;h++)p.prototype[c[h]]=u;e.exports=p},gfUn:function(e,t,n){"use strict";(function(e){function r(e,n){var r={seen:[],stylize:i};return 3<=arguments.length&&(r.depth=arguments[2]),4<=arguments.length&&(r.colors=arguments[3]),g(n)?r.showHidden=n:n&&t._extend(r,n),x(r.showHidden)&&(r.showHidden=!1),x(r.depth)&&(r.depth=2),x(r.colors)&&(r.colors=!1),x(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),l(r,e,r.depth)}function o(e,t){var n=r.styles[t];return n?"\x1B["+r.colors[n][0]+"m"+e+"\x1B["+r.colors[n][1]+"m":e}function i(e){return e}function s(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function l(e,r,o){if(e.customInspect&&r&&C(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var i=r.inspect(o,e);return b(i)||(i=l(e,i,o)),i}var g=d(e,r);if(g)return g;var f=Object.keys(r),y=s(f);if(e.showHidden&&(f=Object.getOwnPropertyNames(r)),w(r)&&(0<=f.indexOf("message")||0<=f.indexOf("description")))return p(r);if(0===f.length){if(C(r)){var x=r.name?": "+r.name:"";return e.stylize("[Function"+x+"]","special")}if(v(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(w(r))return p(r)}var k="",T=!1,_=["{","}"];if(m(r)&&(T=!0,_=["[","]"]),C(r)){var E=r.name?": "+r.name:"";k=" [Function"+E+"]"}if(v(r)&&(k=" "+RegExp.prototype.toString.call(r)),S(r)&&(k=" "+Date.prototype.toUTCString.call(r)),w(r)&&(k=" "+p(r)),0===f.length&&(!T||0==r.length))return _[0]+k+_[1];if(0>o)return v(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var n;return n=T?c(e,r,o,y,f):f.map(function(t){return u(e,r,o,y,t,T)}),e.seen.pop(),h(n,k,_)}function d(e,t){if(x(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\"")+"'";return e.stylize(n,"string")}return f(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,n,r,o){for(var s=[],d=0,i=t.length;d<i;++d)A(t,d+"")?s.push(u(e,t,n,r,d+"",!0)):s.push("");return o.forEach(function(o){o.match(/^\d+$/)||s.push(u(e,t,n,r,o,!0))}),s}function u(e,t,n,r,o,i){var s,d,p;if(p=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]},p.get?p.set?d=e.stylize("[Getter/Setter]","special"):d=e.stylize("[Getter]","special"):p.set&&(d=e.stylize("[Setter]","special")),A(r,o)||(s="["+o+"]"),d||(0>e.seen.indexOf(p.value)?(d=y(n)?l(e,p.value,null):l(e,p.value,n-1),-1<d.indexOf("\n")&&(i?d=d.split("\n").map(function(e){return" "+e}).join("\n").substr(2):d="\n"+d.split("\n").map(function(e){return" "+e}).join("\n"))):d=e.stylize("[Circular]","special")),x(s)){if(i&&o.match(/^\d+$/))return d;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,"\"").replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+d}function h(e,t,n){var r=0,o=e.reduce(function(e,t){return r++,0<=t.indexOf("\n")&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return 60<o?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function y(e){return null===e}function f(e){return"number"==typeof e}function b(e){return"string"==typeof e}function x(e){return void 0===e}function v(e){return k(e)&&"[object RegExp]"===T(e)}function k(e){return"object"==typeof e&&null!==e}function S(e){return k(e)&&"[object Date]"===T(e)}function w(t){return k(t)&&("[object Error]"===T(t)||t instanceof Error)}function C(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function _(e){return 10>e?"0"+e.toString(10):e.toString(10)}function E(){var e=new Date,t=[_(e.getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":");return[e.getDate(),O[e.getMonth()],t].join(" ")}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var I=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(r(arguments[n]));return t.join(" ")}for(var n=1,o=arguments,i=o.length,s=(e+"").replace(I,function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return o[n++]+"";case"%d":return+o[n++];case"%j":try{return JSON.stringify(o[n++])}catch(e){return"[Circular]"}default:return e;}}),l=o[n];n<i;l=o[++n])s+=y(l)||!k(l)?" "+l:" "+r(l);return s},t.deprecate=function(n,r){if(x(e.process))return function(){return t.deprecate(n,r).apply(this,arguments)};if(!0===process.noDeprecation)return n;var o=!1;return function(){if(!o){if(process.throwDeprecation)throw new Error(r);else process.traceDeprecation?console.trace(r):console.error(r);o=!0}return n.apply(this,arguments)}};var N={},L;t.debuglog=function(e){if(x(L)&&(L=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!N[e])if(new RegExp("\\b"+e+"\\b","i").test(L)){var n=process.pid;N[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else N[e]=function(){};return N[e]},t.inspect=r,r.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},r.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=m,t.isBoolean=g,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=f,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=x,t.isRegExp=v,t.isObject=k,t.isDate=S,t.isError=w,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e},t.isBuffer=n("vexR");var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",E(),t.format.apply(t,arguments))},t.inherits=n("4Bm0"),t._extend=function(e,t){if(!t||!k(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(t,n("h6ac"))},ggoL:function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}function n(e,t){for(var n=!1,r;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,n){function r(e,t){return L=t,e}function o(e,t){var n=e.next();if(f[n]){var o=f[n](e,t);if(!1!==o)return o}if("@"==n)return e.eatWhile(/[\w\\\-]/),r("def",e.current());if("="==n||("~"==n||"|"==n)&&e.eat("="))return r(null,"compare");if("\""==n||"'"==n)return t.tokenize=i(n),t.tokenize(e,t);if("#"==n)return e.eatWhile(/[\w\\\-]/),r("atom","hash");if("!"==n)return e.match(/^\s*\w*/),r("keyword","important");if(/\d/.test(n)||"."==n&&e.eat(/\d/))return e.eatWhile(/[\w.%]/),r("number","unit");if("-"===n){if(/[\d.]/.test(e.peek()))return e.eatWhile(/[\w.%]/),r("number","unit");if(e.match(/^-[\w\\\-]+/))return e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?r("variable-2","variable-definition"):r("variable-2","variable");if(e.match(/^\w+-/))return r("meta","meta")}else return /[,+>*\/]/.test(n)?r(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?r("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?r(null,n):("u"==n||"U"==n)&&e.match(/rl(-prefix)?\(/i)||("d"==n||"D"==n)&&e.match("omain(",!0,!0)||("r"==n||"R"==n)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=s,r("property","word")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),r("property","word")):r(null,null)}function i(e){return function(t,n){for(var o=!1,i;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return i!=e&&(o||")"==e)||(n.tokenize=null),r("string","string")}}function s(e,t){return e.next(),t.tokenize=e.match(/\s*[\"\')]/,!1)?null:i(")"),r(null,"(")}function l(e,t,n){this.type=e,this.indent=t,this.prev=n}function d(e,t,n,r){return e.context=new l(n,t.indentation()+(!1===r?0:g),e.context),n}function p(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function c(e,t,n){return N[n.context.type](e,t,n)}function u(e,t,r,o){for(var n=o||1;0<n;n--)r.context=r.context.prev;return c(e,t,r)}function h(e){var t=e.current().toLowerCase();O=_.hasOwnProperty(t)?"atom":T.hasOwnProperty(t)?"keyword":"variable"}var m=n.inline;n.propertyKeywords||(n=e.resolveMode("text/css"));var g=t.indentUnit,f=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},v=n.mediaValueKeywords||{},k=n.propertyKeywords||{},S=n.nonStandardPropertyKeywords||{},w=n.fontProperties||{},C=n.counterDescriptors||{},T=n.colorKeywords||{},_=n.valueKeywords||{},E=n.allowNested,A=n.lineComment,I=!0===n.supportsAtComponent,N={},L,O;return N.top=function(e,t,n){if("{"==e)return d(n,t,"block");if("}"==e&&n.context.prev)return p(n);if(I&&/@component/i.test(e))return d(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return d(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return d(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return d(n,t,"at");if("hash"==e)O="builtin";else if("word"==e)O="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return d(n,t,"interpolation");if(":"==e)return"pseudo";if(E&&"("==e)return d(n,t,"parens")}return n.context.type},N.block=function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return k.hasOwnProperty(r)?(O="property","maybeprop"):S.hasOwnProperty(r)?(O="string-2","maybeprop"):E?(O=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(O+=" error","maybeprop")}return"meta"==e?"block":E||"hash"!=e&&"qualifier"!=e?N.top(e,t,n):(O="error","block")},N.maybeprop=function(e,t,n){return":"==e?d(n,t,"prop"):c(e,t,n)},N.prop=function(e,t,n){if(";"==e)return p(n);if("{"==e&&E)return d(n,t,"propBlock");if("}"==e||"{"==e)return u(e,t,n);if("("==e)return d(n,t,"parens");if("hash"==e&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current()))O+=" error";else if("word"==e)h(t);else if("interpolation"==e)return d(n,t,"interpolation");return"prop"},N.propBlock=function(e,t,n){return"}"==e?p(n):"word"==e?(O="property","maybeprop"):n.context.type},N.parens=function(e,t,n){return"{"==e||"}"==e?u(e,t,n):")"==e?p(n):"("==e?d(n,t,"parens"):"interpolation"==e?d(n,t,"interpolation"):("word"==e&&h(t),"parens")},N.pseudo=function(e,t,n){return"meta"==e?"pseudo":"word"==e?(O="variable-3",n.context.type):c(e,t,n)},N.documentTypes=function(e,t,n){return"word"==e&&y.hasOwnProperty(t.current())?(O="tag",n.context.type):N.atBlock(e,t,n)},N.atBlock=function(e,t,n){if("("==e)return d(n,t,"atBlock_parens");if("}"==e||";"==e)return u(e,t,n);if("{"==e)return p(n)&&d(n,t,E?"block":"top");if("interpolation"==e)return d(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();O="only"==r||"not"==r||"and"==r||"or"==r?"keyword":b.hasOwnProperty(r)?"attribute":x.hasOwnProperty(r)?"property":v.hasOwnProperty(r)?"keyword":k.hasOwnProperty(r)?"property":S.hasOwnProperty(r)?"string-2":_.hasOwnProperty(r)?"atom":T.hasOwnProperty(r)?"keyword":"error"}return n.context.type},N.atComponentBlock=function(e,t,n){return"}"==e?u(e,t,n):"{"==e?p(n)&&d(n,t,E?"block":"top",!1):("word"==e&&(O="error"),n.context.type)},N.atBlock_parens=function(e,t,n){return")"==e?p(n):"{"==e||"}"==e?u(e,t,n,2):N.atBlock(e,t,n)},N.restricted_atBlock_before=function(e,t,n){return"{"==e?d(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(O="variable","restricted_atBlock_before"):c(e,t,n)},N.restricted_atBlock=function(e,t,n){return"}"==e?(n.stateArg=null,p(n)):"word"==e?(O=("@font-face"!=n.stateArg||w.hasOwnProperty(t.current().toLowerCase()))&&("@counter-style"!=n.stateArg||C.hasOwnProperty(t.current().toLowerCase()))?"property":"error","maybeprop"):"restricted_atBlock"},N.keyframes=function(e,t,n){return"word"==e?(O="variable","keyframes"):"{"==e?d(n,t,"top"):c(e,t,n)},N.at=function(e,t,n){return";"==e?p(n):"{"==e||"}"==e?u(e,t,n):("word"==e?O="tag":"hash"==e&&(O="builtin"),"at")},N.interpolation=function(e,t,n){return"}"==e?p(n):"{"==e||";"==e?u(e,t,n):("word"==e?O="variable":"variable"!=e&&"("!=e&&")"!=e&&(O="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||o)(e,t);return n&&"object"==typeof n&&(L=n[1],n=n[0]),O=n,"comment"!=L&&(t.state=N[t.state](L,e,t)),O},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),o=n.indent;return"prop"==n.type&&("}"==r||")"==r)&&(n=n.prev),n.prev&&("}"==r&&("block"==n.type||"top"==n.type||"interpolation"==n.type||"restricted_atBlock"==n.type)?(n=n.prev,o=n.indent):(")"==r&&("parens"==n.type||"atBlock_parens"==n.type)||"{"==r&&("at"==n.type||"atBlock"==n.type))&&(o=Math.max(0,n.indent-g))),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:A,fold:"brace"}});var r=["domain","regexp","url","url-prefix"],o=t(r),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=t(i),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],d=t(l),p=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],c=t(p),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],h=t(u),m=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],g=t(m),f=t(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),y=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],x=t(b),v=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],k=t(v),S=r.concat(i).concat(l).concat(p).concat(u).concat(m).concat(b).concat(v);e.registerHelper("hintWords","css",S),e.defineMIME("text/css",{documentTypes:o,mediaTypes:s,mediaFeatures:d,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:g,fontProperties:f,counterDescriptors:y,colorKeywords:x,valueKeywords:k,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=n,n(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:d,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:g,colorKeywords:x,valueKeywords:k,fontProperties:f,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:s,mediaFeatures:d,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:g,colorKeywords:x,valueKeywords:k,fontProperties:f,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:s,mediaFeatures:d,propertyKeywords:h,nonStandardPropertyKeywords:g,fontProperties:f,counterDescriptors:y,colorKeywords:x,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=n,n(e,t))}},name:"css",helperType:"gss"})})},gpbE:function(e,t,n){"use strict";function r(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}var o=n("ZKdc"),i=n("cvyR"),s=n("dvMn");s.inherits(r,o),r.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=r},h6ac:function(e){"use strict";var t=function(){return this}();try{t=t||Function("return this")()||(1,eval)("this")}catch(n){"object"==typeof window&&(t=window)}e.exports=t},hIGV:function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(e=e.toLowerCase(),t=t.toLowerCase(),e===t)return 1;if(!t||e.charCodeAt(0)!==t.charCodeAt(0))return 0;for(var n=e.length,r=t.length,s=1,i=1,l=r,d=void 0,p=void 0,c=void 0,u=void 0;s<n;){for(d=e.charCodeAt(s),c=!1,u=!1;i<r;){if(p=t.charCodeAt(i),d===p){c=!0,l+=(r-i)*(u?2:1);break}u=p===_,i++}if(!c)break;s++}return l&&l*(s/n)/o(r)}function o(e){return e*(e+1)/2}function i(e){return s(e.map(function(e){return new I(e.key,e.value)}))}function s(e){e=e.sort(l);for(var t=[],n=0,r,o;n<e.length;n++)if(r=e[n],!!r.property){for(;t.length;){if(o=t[t.length-1],0===r.property.indexOf(o.property)&&r.property.charCodeAt(o.property.length)===A){o.addDependency(r),t.push(r);break}t.pop()}t.length||t.push(r)}return e}function l(e,t){return e.key===t.key?0:e.key<t.key?-1:1}function d(e){return /^\s*[\w-]+/.test(e)}function p(e){return(e+"").split("|")}function c(e){return i(e.all({type:"string"}))}function u(e,t,n){if(n.property)return g(e,t.find(function(e){return e.property===n.property}),n);var r=y(e.name,t,"key",n.fuzzySearchMinScore);return r?r.property?h(e,r,n):m(e,r):"!"===e.name?f(e,"!important"):e}function h(e,t,n){var r=e.name;if(e.name=t.property,e.value&&"object"==typeof e.value){var o=t.keywords();if(!e.value.size){var s=y(x(r,t.key),o);s||(s=t.defaultValue,s&&-1===s.indexOf("${")&&(s="${1:"+s+"}")),s&&e.value.add(s)}else for(var l=0,i;l<e.value.value.length;l++)i=e.value.value[l],"!"===i?i=(l?"":"${1} ")+"!important":v(i)?i=y(i.value,o)||y(i.value,N)||i:k(i)&&(i=w(e.name,i,n)),e.value.value[l]=i}return e}function m(e,t){return f(e,t.value)}function g(e,t,n){var r=N.slice();t&&(r=r.concat(t.keywords()));var o=[e.name].concat(e.value.value).filter(Boolean).map(function(e){return"string"==typeof e||"keyword"===e.type?(e+="",y(e,r,null,n.fuzzySearchMinScore)||e):e});return e.name=null,e.value.value=o,e}function f(e,t){return e.name=null,e.value=t,e}function y(e,t,n,o){if(!e)return null;var s=null,l=0;o=o||0;for(var d=0,i;d<t.length;d++){i=t[d];var p=r(e,b(i,n));if(1===p)return i;p&&p>=l&&(l=p,s=i)}return l>=o?s:null}function b(e,t){var n=e&&"object"==typeof e?e[t]:e,r=(n||"").match(/^[\w-@]+/);return r?r[0]:n}function x(e,t){for(var n=0,r=0;n<e.length;n++){if(r=t.indexOf(e[n],r),-1===r)return e.slice(n);r++}return""}function v(e){return S(e,"keyword")}function k(e){return S(e,"numeric")}function S(e,t){return e&&"object"==typeof e&&e.type===t}function w(e,t,n){return t.unit?t.unit=n.unitAliases[t.unit]||t.unit:0!==t.value&&-1===L.indexOf(e)&&(t.unit=t.value===(0|t.value)?n.intUnit:n.floatUnit),t}t.__esModule=!0;var C=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},T=function(){function e(e,t){for(var n=0,r;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=45,E=/^([a-z-]+)(?:\s*:\s*([^\n\r]+))?$/,A=45,I=function(){function e(t,r){n(this,e),this.key=t,this.value=r,this.property=null;var o=r&&r.match(E);o&&(this.property=o[1],this.value=o[2]),this.dependencies=[]}return e.prototype.addDependency=function(e){this.dependencies.push(e)},e.prototype.keywords=function(){var e=[],t=new Set,n=0,r=void 0,o=void 0;for(this.property&&e.push(this);n<e.length;)if(r=e[n++],r.value){o=p(r.value).filter(d);for(var i=0;i<o.length;i++)t.add(o[i].trim());for(var s=0,l=r.dependencies;s<l.length;s++)-1===e.indexOf(l[s])&&e.push(l[s])}return Array.from(t)},T(e,[{key:"defaultValue",get:function(){return null==this.value?null:p(this.value)[0]}}]),e}(),N=["auto","inherit","unset"],L=["z-index","line-height","opacity","font-weight","zoom","flex","flex-grow","flex-shrink"],O={intUnit:"px",floatUnit:"em",unitAliases:{e:"em",p:"%",x:"ex",r:"rem"},fuzzySearchMinScore:0};t.default=function(e,t,n){n=C({},O,n),n.unitAliases=C({},O.unitAliases,n&&n.unitAliases);var r=c(t);return e.walk(function(e){return u(e,r,n)}),e},t.convertToCSSSnippets=c,t.stringScore=r,t.cssSnippets=i},iOMi:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return(e||"").split(/\r\n|\r|\n/g)}function i(e,t,n){return e.map(function(e){var r=t(new u(e,n));return r?r.toString(i(e.children,t,n)):""}).join("")}function s(e,t){var n="object"==typeof e?e:(0,p.default)(e),r=-1;return n.fields.forEach(function(e){e.index+=t.index,e.index>r&&(r=e.index)}),-1!==r&&(t.index=r+1),n}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},d=n("R0uB"),p=function(e){return e&&e.__esModule?e:{default:e}}(d),c=function(e){return e},u=function(){function e(t,n,o){r(this,e),"object"==typeof n&&(o=n,n=null),this.node=t,this._fieldsRenderer=n||c,this.open=null,this.beforeOpen="",this.afterOpen="",this.close=null,this.beforeClose="",this.afterClose="",this.text=null,this.beforeText="",this.afterText="",this.indent="",this.newline="",o&&l(this,o)}return e.prototype.clone=function(){return new this.constructor(this.node,this)},e.prototype.indentText=function(e){var t=this,n=o(e);if(1===n.length)return e;var r=this.newline||this.indent?this.newline:" ";return n.map(function(e,n){return n?t.indent+e:e}).join(r)},e.prototype.renderFields=function(e){return this._fieldsRenderer(e)},e.prototype.toString=function(e){var t=this._wrap(this.open,this.beforeOpen,this.afterOpen),n=this._wrap(this.close,this.beforeClose,this.afterClose),r=this._wrap(this.text,this.beforeText,this.afterText);return t+r+(null==e?"":e)+n},e.prototype._wrap=function(e,t,n){return t=null==t?"":t,n=null==n?"":n,null==e?"":(e=t?e.replace(/^\s+/,""):e,e=n?e.replace(/\s+$/,""):e,t+this.indentText(e)+n)},e}(),h=function(e,t){return t||""};t.default=function(e,t,n){"undefined"==typeof n&&(n=t,t=null),t=t||h;var r={index:1};return i(e.children,n,function(e){return null==e?t(r.index++):s(e,r).mark(t)})}},iktq:function(e,t,n){"use strict";var r=n("qdP6");e.exports=function(e,t,n){return(r(e),void 0===t)?e:1===n?function(n){return e.call(t,n)}:2===n?function(n,r){return e.call(t,n,r)}:3===n?function(n,r,o){return e.call(t,n,r,o)}:function(){return e.apply(t,arguments)}}},"k/hd":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return t=f({},t),"string"==typeof e&&(e=i(e,t)),(0,_.default)(e,t.profile,t.syntax,t)}function i(e,t){return(0,b.default)(e).use(v.default,t.snippets).use(C.default,t.variables).use(S.default,t.text,t.options)}function s(e,t){return t=t||{},"string"==typeof e&&(e=l(e,t)),(0,O.default)(e,t.profile,t.syntax,t)}function l(e,t){return"string"==typeof e&&(e=(0,A.default)(e)),e.use(N.default,t.snippets,t.options)}function d(e,t,n){var r=[];"markup"===e?r.push(D.default.html):"stylesheet"===e&&r.push(D.default.css),t in D.default&&-1===r.indexOf(D.default[t])&&r.push(D.default[t]),Array.isArray(n)?n.forEach(function(e){r.push("string"==typeof e?D.default[e]:e)}):"object"==typeof n&&r.push(n);var o=new F.default(r.filter(Boolean));return"stylesheet"!==e&&o.get(0).set(j,p),o}function p(e){var t={},n=e.name.match(j);return n[1]&&(t.lang=n[1]),n[2]&&(t.wordCount=+n[2]),(0,P.default)(e,t)}function c(e,t,n){return e&&"markup"!==e&&"stylesheet"!==e&&(n=t,t=e,e="markup"),n instanceof F.default?n:d(e,t,n)}function u(e){return"string"==typeof e&&(e={syntax:e}),e=f({},W,e),null==e.type&&e.syntax&&(e.type=h(e.syntax)?"stylesheet":"markup"),e.format=f({field:e.field},e.format),e.profile=m(e),e.variables=f({},q,e.variables),e.snippets=c(e.type,e.syntax,e.snippets),e}function h(e){return-1!==V.indexOf(e)}function m(e){return e.profile instanceof z.default?e.profile:new z.default(e.profile)}function g(e,t){return e?"stylesheet"===e?"stylesheet":"markup":h(t)?"stylesheet":"markup"}t.__esModule=!0,t.createProfile=t.isStylesheet=t.createOptions=t.createSnippetsRegistry=t.parse=t.expand=void 0;var f=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},y=n("A9O4"),b=r(y),x=n("/rE2"),v=r(x),k=n("lXap"),S=r(k),w=n("Ipt8"),C=r(w),T=n("Znrd"),_=r(T),E=n("FFEI"),A=r(E),I=n("hIGV"),N=r(I),L=n("Dxv2"),O=r(L),M=n("B9y7"),D=r(M),R=n("e5FP"),P=r(R),B=n("5E0L"),F=r(B),U=n("EJg2"),z=r(U),j=/^lorem([a-z]*)(\d*)$/i,q={lang:"en",locale:"en-US",charset:"UTF-8"},V=["css","sass","scss","less","stylus","sss"],W={type:null,syntax:"html",field:function(e,t){return t||""},text:null,profile:null,variables:{},snippets:{},options:null,format:null};t.expand=function(e,t){return t=u(t),"stylesheet"===g(t.type,t.syntax)?s(e,t):o(e,t)},t.parse=function(e,t){return t=u(t),"stylesheet"===g(t.type,t.syntax)?l(e,t):i(e,t)},t.createSnippetsRegistry=c,t.createOptions=u,t.isStylesheet=h,t.createProfile=m},k0dc:function(e,t){"use strict";function n(e,t){var n=t.type,r=t.syntax,s=t.project;return{syntax:r,type:n,project:s,format:o(e,"format",n,r,s),profile:o(e,"profile",n,r,s),options:o(e,"options",n,r,s),variables:o(e,"variables",n,r,s),snippets:i(e,"snippets",n,r,s).filter(Boolean)}}function r(e,t){var n=t.type,r=t.syntax;return n||r?!n&&r?-1===p.markup.indexOf(r)?-1===p.stylesheet.indexOf(r)?n=s(e,["syntax",r,"type"])||s(e,["project",t.project,"syntax",r,"type"]):n="stylesheet":n="markup":!r&&(r=d[n]):(n="markup",r=d[n]),l({},t,{type:n,syntax:r})}function o(e,t,n,r,o){return i(e,t,n,r,o).reduce(function(e,t){return l({},e,t)},{})}function i(e,t,n,r,o){return[s(e,["globals",n,t]),s(e,["project",o,"globals",n,t]),s(e,["syntax",r,t]),s(e,["project",o,"syntax",r,t])].filter(Boolean)}function s(e,t,n){for(var r=e,o=0;o<t.length&&null!=r;o++)r=r[t[o]];return null==r?n:r}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},d={markup:"html",stylesheet:"css"},p={markup:["html","xml","xsl","jsx","js","pug","slim","haml"],stylesheet:["css","sass","scss","less","sss","stylus"]};t.default=function(e,t){t=r(e,t||{});var o=n(e,t),i=["globals","syntax","project"];for(var s in e)-1===i.indexOf(s)&&(o[s]=e[s]);return o}},k0gZ:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){var n=e.pos;return e.eatWhile(t)?new A(e,n,e.pos):void(e.pos=n)}function i(e){return N(e)||E(e,l)}function s(e){var t=e.pos;if((0,T.eatQuoted)(e)){var n=e.pos,r=void 0,o=void 0;e.pos=t,e.next(),r=e.start=e.pos,e.pos=n,e.backUp(1),o=e.pos;var i=E(e,r,o);return e.pos=n,i}return N(e)||p(e)}function l(e){return e!==O&&!d(e)&&!(0,T.isSpace)(e)}function d(e){return e===M||e===L}function p(e){return E(e,c)}function c(e){return!isNaN(e)&&!(0,T.isQuote)(e)&&!(0,T.isSpace)(e)&&!d(e)}function u(e){return E(e,h)}function h(e){return(0,T.isAlphaNumeric)(e)||e===F||e===P||e===R||e===U}function m(e,t){for(var n=e.pos,r=0;r<t.length;r++)if(!e.eat(t[r]))return e.pos=n,!1;return e.start=n,!0}function g(e,t,n,r){var o=e.pos;if(m(e,t)){for(;!e.eof();){if(m(e,n))return!0;e.next()}return!!r||(e.pos=o,!1)}return e.pos=o,null}function f(e){return e.split("").map(function(e){return e.charCodeAt(0)})}function y(e){if(60===e.peek())return V(e)||K(e)||z(e)}function b(e,t){for(var n=e.pos;!e.eof();){if(m(e,t))return e.pos=e.start,z(e);e.next()}return e.pos=n,null}function x(e){return e.name?e.name.value.toLowerCase():"#"+e.type}function v(e){return e[e.length-1]}t.__esModule=!0,t.match=t.defaultOptions=void 0;var k=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},S=function(){function e(e,t){for(var n=0,r;n<t.length;n++)r=t[n],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),w=n("Lu2N"),C=function(e){return e&&e.__esModule?e:{default:e}}(w),T=n("rc1b"),_=function(){function e(t,n,o,i){r(this,e),this.stream=t,this.type=n,this.open=o,this.close=i,this.children=[],this.parent=null}return e.prototype.getIndex=function(){return this.parent?this.parent.children.indexOf(this):-1},e.prototype.addChild=function(e){return this.removeChild(e),this.children.push(e),e.parent=this,this},e.prototype.removeChild=function(e){var t=this.children.indexOf(e);return-1!==t&&(this.children.splice(t,1),e.parent=null),this},S(e,[{key:"name",get:function(){return"tag"===this.type&&this.open?this.open&&this.open.name&&this.open.name.value:"#"+this.type}},{key:"attributes",get:function(){return this.open&&this.open.attributes}},{key:"start",get:function(){return this.open&&this.open.start}},{key:"end",get:function(){return this.close?this.close.end:this.open&&this.open.end}},{key:"firstChild",get:function(){return this.children[0]}},{key:"nextSibling",get:function(){var e=this.getIndex();return-1===e?null:this.parent.children[e+1]}},{key:"previousSibling",get:function(){var e=this.getIndex();return-1===e?null:this.parent.children[e-1]}}]),e}(),E=function(e,t,n){return"function"==typeof t?o(e,t):new A(e,t,n)},A=function(){function e(t,n,o){r(this,e),this.stream=t,this.start=null==n?t.start:n,this.end=null==o?t.pos:o,this._value=null}return e.prototype.toString=function(){return this.value},e.prototype.valueOf=function(){return this.value+" ["+this.start+"; "+this.end+"]"},S(e,[{key:"value",get:function(){if(null===this._value){var e=this.stream.start,t=this.stream.pos;this.stream.start=this.start,this.stream.pos=this.end,this._value=this.stream.current(),this.stream.start=e,this.stream.pos=t}return this._value}}]),e}(),I={throws:!0},N=function(e){var t=e.pos,n=(0,T.eatPair)(e,60,62,I)||(0,T.eatPair)(e,91,93,I)||(0,T.eatPair)(e,40,41,I)||(0,T.eatPair)(e,123,125,I);if(n)return E(e,t)},L=47,O=61,M=62,D=function(e){for(var t=[],n=void 0;!e.eof();)if(e.eatWhile(T.isSpace),n={start:e.pos},n.name=i(e))e.eat(O)?n.value=s(e):n.boolean=!0,n.end=e.pos,t.push(n);else if(d(e.peek()))break;else e.next();return t},R=45,P=46,B=47,F=58,U=95,z=function(e){var t=e.pos;if(e.eat(60)){var n={type:e.eat(B)?"close":"open"};if((n.name=u(e))&&("close"!==n.type&&(n.attributes=D(e),e.eatWhile(T.isSpace),n.selfClosing=e.eat(B)),e.eat(62)))return k(E(e,t),n)}return e.pos=t,null},j=f("<!--"),q=f("-->"),V=function(e){var t=e.pos;if(g(e,j,q,!0)){var n=E(e,t);return n.type="comment",n}return null},W=f("<![CDATA["),H=f("]]>"),K=function(e){var t=e.pos;if(g(e,W,H,!0)){var n=E(e,t);return n.type="cdata",n}return null},G={xml:!1,special:["script","style"],empty:["img","meta","link","br","base","hr","area","wbr","col","embed","input","param","source","track"]};t.defaultOptions=G,t.match=y,t.default=function(e,t){t=k({},G,t);for(var n="string"==typeof e?new C.default(e):e,r=new _(n,"root"),o=new Set(t.empty),s=t.special.reduce(function(e,t){return e.set(t,f("</"+t+">"))},new Map),l=function(e,n){return e.selfClosing||!t.xml&&o.has(n)},d=void 0,p=void 0,c=void 0,u=[r];!n.eof();)if(!(d=y(n)))n.next();else if(c=x(d),"open"===d.type)p=new _(n,"tag",d),v(u).addChild(p),s.has(c)?p.close=b(n,s.get(c)):!l(d,c)&&u.push(p);else if("close"===d.type){for(var h=u.length-1;0<h;h--)if(u[h].name.toLowerCase()===c){u[h].close=d,u=u.slice(0,h);break}}else v(u).addChild(new _(n,d.type,d));return r}},kT1X:function(e,t,n){"use strict";e.exports=n("Hba+")},kdYR:function(e,t,n){"use strict";var r=n("0gyT"),o=n("3Vd+").document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},lUr3:function(e,t){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},lXap:function(e,t,n){"use strict";function r(e,t){for(var n=new Set,r=t.length,o=0;-1!==(o=e.indexOf(t,o));)n.add(o),o+=r;if(n.size)for(var s=0,l=e.length;s<l;)"\\"===e[s++]&&n.delete(s++);return Array.from(n).map(function(e){return i(e,r)})}function o(e,t,n){for(var o=t.length-1;0<=o;o--){var i=t[o],r=0,s=0,l=!1;if("@"===e.substr(i[0]+i[1],1)){"-"===e.substr(i[0]+i[1]+1,1)&&(l=!0);var d=e.substr(i[0]+i[1]+1+ +l).match(/^(\d+)/);d?(s=d[1].length+1+ +l,r=parseInt(d[1])-1):s=2}e=e.substring(0,i[0])+("function"==typeof n?n(e.substr(i[0],i[1]),r,l):n)+e.substring(i[0]+i[1]+s)}return e}function i(e,t){return[e,t]}function s(e){var t=l(e);if(t&&null!=t.value){var n=t.value,r=t.count;e.name=d(e.name,n,r),e.value=d(e.value,n,r),e.attributes.forEach(function(t){var o=e.getAttribute(t.name).clone();o.name=d(t.name,n,r),o.value=d(t.value,n,r),e.replaceAttribute(t.name,o)})}return e}function l(e){for(;e;){if(e.repeat)return e.repeat;e=e.parent}}function d(e,t,n){if("string"==typeof e){var r=p(e);return c(e,r,t,n)}return e}function p(e){return r(e||"",N).reduce(function(t,n){if(!/[#{]/.test(e[n[0]+1]||"")){var r=t[t.length-1];r&&r[0]+r[1]===n[0]?r[1]+=n[1]:t.push(n)}return t},[])}function c(e,t,n,r){var i=o(e,t,function(e,t,o){for(var i=o?t+r-n+1+"":n+t+"";i.length<e.length;)i="0"+i;return i});return u(i)}function u(e){for(var t=0,n="",r=e.length,o;t<r;)o=e[t++],n+="\\"===o?e[t++]||"":o;return n}function h(e,t){return t=t||1,e.walk(function(e){if(e.repeat&&null===e.repeat.count){for(var n=0,r;n<t;n++)r=e.clone(!0),r.repeat.implicit=!0,r.repeat.count=t,r.repeat.value=n+1,r.repeat.index=n,e.parent.insertBefore(r,e);e.remove()}}),e}function m(e,t){if(Array.isArray(t)&&t.length){var n=!1;e.walk(function(e){e.repeat&&e.repeat.implicit&&(n=!0,g(e,t[e.repeat.index]))}),n||x(b(e),t.join("\n"))}return e}function g(e,t){var n=f(e,t);return e.walk(function(e){return n|=f(e,t)}),n||x(b(e),t),e}function f(e,t){var n={replaced:!1};return e.value=y(e.value,t,n),e.attributes.forEach(function(r){r.value&&e.setAttribute(r.name,y(r.value,t,n))}),n.replaced}function y(e,t,n){if("string"==typeof e){var i=r(e,O);i.length&&(n&&(n.replaced=!0),e=o(e,i,t))}return e}function b(e){for(;e.children.length;)e=e.children[e.children.length-1];return e}function x(e,t){if(e.value){var n=r(e.value,M);if(n.length)return void(e.value=o(e.value,n,t))}("a"===e.name.toLowerCase()||e.hasAttribute("href"))&&(D.test(t)?e.setAttribute("href",(P.test(t)?"":"http://")+t):R.test(t)&&e.setAttribute("href","mailto:"+t)),e.value=t}function v(e){var t=e.classList.reduce(function(e,t){var n=t.indexOf("_");return 0<n&&!t.startsWith("-")?(e.add(t.slice(0,n)),e.add(t.slice(n)),e):e.add(t)},new Set);t.size&&e.setAttribute("class",Array.from(t).join(" "))}function k(e,t,n){var r=e.classList.reduce(function(r,o){var i=void 0,s=void 0,l=o;return(s=o.match(F))&&(i=w(e,t,s[1])+n.element+s[2],r.add(i),o=o.slice(s[0].length)),(s=o.match(U))&&(!i&&(i=w(e,t,s[1]),r.add(i)),r.add(""+i+n.modifier+s[2]),o=o.slice(s[0].length)),o===l&&r.add(l),r},new Set),o=Array.from(r).filter(Boolean);o.length&&e.setAttribute("class",o.join(" "))}function S(e){var t=new Map;return e.walk(function(e){var n=e.classList;n.length&&t.set(e,C(n,z)||C(n,j)||t.get(e.parent))}),t}function w(e,t,n){for(var r=1<n.length?n.length:0;e.parent&&e.parent.parent&&r--;)e=e.parent;return t.get(e)||""}function C(e,t){for(var n=0;n<e.length&&!(F.test(e[n])||U.test(e[n]));n++)if(t(e[n]))return e[n]}function T(e,t,n){var r=e.getAttribute(t);r&&(r.name=n)}t.__esModule=!0;var _=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},E=n("7EAy"),A=function(e){return e&&e.__esModule?e:{default:e}}(E),I=function(e){return e.walk(function(e){null==e.name&&e.attributes.length&&(e.name=(0,A.default)(e.parent.name))}),e},N="$",L=function(e){return e.walk(s),e},O="$#",M="|",D=/^((?:https?|ftp|file):\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/,R=/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/,P=/^([a-z]+:)?\/\//i,B={element:"__",modifier:"_"},F=/^(-+)([a-z0-9]+[a-z0-9-]*)/i,U=/^(_+)([a-z0-9]+[a-z0-9-_]*)/i,z=function(e){return /^[a-z]\-/i.test(e)},j=function(e){return /^[a-z]/i.test(e)},q=/^xsl:(variable|with\-param)$/i,V={bem:function(e,t){t=_({},B,t),e.walk(function(e){return v(e,t)});var n=S(e);return e.walk(function(e){return k(e,n,t)}),e},jsx:function(e){return e.walk(function(e){T(e,"class","className"),T(e,"for","htmlFor")}),e},xsl:function(e){return e.walk(function(e){q.test(e.name||"")&&(e.children.length||e.value)&&e.removeAttribute("select")}),e}},W=function(e,t){return Object.keys(t||{}).forEach(function(n){if(n in V){var r="object"==typeof t[n]?t[n]:null;e=e.use(V[n],r)}}),e};t.default=function(e,t,n){return"string"==typeof t?t=[t]:t&&"object"==typeof t&&!Array.isArray(t)&&(n=t,t=null),e.use(I).use(h,Array.isArray(t)?t.length:null).use(L).use(m,t).use(W,n)}},"m+Gh":function(e,t,n){"use strict";(function(e){e.Promise||(e.Promise=n("BtxX")),e.fetch||(e.fetch=n("VS7n"))}).call(t,n("h6ac"))},mSND:function(e){"use strict";(function(t,n){e.exports=n()})(void 0,function(){var t=window,e=t.document,n="addEventListener",r="removeEventListener",o="getBoundingClientRect",i=function(){return!1},s=0.1,l=t.attachEvent&&!t[n],d=["","-webkit-","-moz-","-o-"].filter(function(t){var n=e.createElement("div");return n.style.cssText="width:"+t+"calc(9px)",!!n.style.length}).shift()+"calc",p=function(t){return"string"==typeof t||t instanceof String?e.querySelector(t):t};return function(c,u){function h(e,t,n){var r=O(D,t,n);Object.keys(r).forEach(function(t){return e.style[t]=r[t]})}function m(e,t){var n=M(D,t);Object.keys(n).forEach(function(t){return e.style[t]=n[t]})}function g(e){h(this.a,e/this.size*this.percentage-s,this.aGutterSize),h(this.b,this.percentage-e/this.size*this.percentage-s,this.bGutterSize)}function f(t){var e;this.dragging&&(e="touches"in t?t.touches[0][P]-this.start:t[P]-this.start,e<=this.aMin+A+this.aGutterSize?e=this.aMin+this.aGutterSize:e>=this.size-(this.bMin+A+this.bGutterSize)&&(e=this.size-(this.bMin+this.bGutterSize)),g.call(this,e),u.onDrag&&u.onDrag())}function y(){var e=t.getComputedStyle(this.parent),n=this.parent[R]-parseFloat(e[F]||0)-parseFloat(e[U]||0);this.size=this.a[o]()[D]+this.b[o]()[D]+this.aGutterSize+this.bGutterSize,this.percentage=Math.min(100*(this.size/n),100),this.start=this.a[o]()[B]}function x(){var e=this,n=e.a,o=e.b;e.dragging&&u.onDragEnd&&u.onDragEnd(),e.dragging=!1,t[r]("mouseup",e.stop),t[r]("touchend",e.stop),t[r]("touchcancel",e.stop),e.parent[r]("mousemove",e.move),e.parent[r]("touchmove",e.move),delete e.stop,delete e.move,n[r]("selectstart",i),n[r]("dragstart",i),o[r]("selectstart",i),o[r]("dragstart",i),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",o.style.userSelect="",o.style.webkitUserSelect="",o.style.MozUserSelect="",o.style.pointerEvents="",e.gutter.style.cursor="",e.parent.style.cursor=""}function b(r){var e=this,o=e.a,s=e.b;!e.dragging&&u.onDragStart&&u.onDragStart(),r.preventDefault(),e.dragging=!0,e.move=f.bind(e),e.stop=x.bind(e),t[n]("mouseup",e.stop),t[n]("touchend",e.stop),t[n]("touchcancel",e.stop),e.parent[n]("mousemove",e.move),e.parent[n]("touchmove",e.move),o[n]("selectstart",i),o[n]("dragstart",i),s[n]("selectstart",i),s[n]("dragstart",i),o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",s.style.userSelect="none",s.style.webkitUserSelect="none",s.style.MozUserSelect="none",s.style.pointerEvents="none",e.gutter.style.cursor=N,e.parent.style.cursor=N,y.call(e)}function v(e){e.forEach(function(t,n){if(0<n){var r=z[n-1];h(r.a,e[n-1],r.aGutterSize),h(r.b,t,r.bGutterSize)}})}function k(){z.forEach(function(e){e.parent.removeChild(e.gutter),e.a.style[D]="",e.b.style[D]=""})}void 0===u&&(u={});var S=p(c[0]).parentNode,w=t.getComputedStyle(S).flexDirection,C=u.sizes||c.map(function(){return 100/c.length}),T=void 0===u.minSize?100:u.minSize,_=Array.isArray(T)?T:c.map(function(){return T}),E=void 0===u.gutterSize?10:u.gutterSize,A=void 0===u.snapOffset?30:u.snapOffset,I=u.direction||"horizontal",N=u.cursor||("horizontal"===I?"ew-resize":"ns-resize"),L=u.gutter||function(t,n){var r=e.createElement("div");return r.className="gutter gutter-"+n,r},O=u.elementStyle||function(e,t,n){var r={};return r[e]="string"==typeof t||t instanceof String?t:l?t+"%":d+"("+t+"% - "+n+"px)",r},M=u.gutterStyle||function(e,t){return n={},n[e]=t+"px",n;var n},D,R,P,B,F,U;"horizontal"===I?(D="width",R="clientWidth",P="clientX",B="left",F="paddingLeft",U="paddingRight"):"vertical"===I&&(D="height",R="clientHeight",P="clientY",B="top",F="paddingTop",U="paddingBottom");var z=c.map(function(e,t){var r=p(e),i=1===t,s=t===c.length-1,d=C[t],u;if(0<t&&(u={a:p(c[t-1]),b:r,aMin:_[t-1],bMin:_[t],dragging:!1,isFirst:i,isLast:s,direction:I,parent:S},u.aGutterSize=E,u.bGutterSize=E,i&&(u.aGutterSize=E/2),s&&(u.bGutterSize=E/2),"row-reverse"===w||"column-reverse"===w)){var g=u.a;u.a=u.b,u.b=g}if(!l&&0<t){var f=L(t,I);m(f,E),f[n]("mousedown",b.bind(u)),f[n]("touchstart",b.bind(u)),S.insertBefore(f,r),u.gutter=f}if(0===t||t===c.length-1?h(r,d,E/2):h(r,d,E),0<t){var y=u.a[o]()[D],x=u.b[o]()[D];y<u.aMin&&(u.aMin=y),x<u.bMin&&(u.bMin=x)}return 0<t?u:null});return z.shift(),l?{setSizes:v,destroy:k}:{setSizes:v,getSizes:function(){var e=[];return z.forEach(function(n,r){var i=t.getComputedStyle(n.parent),s=n.parent[R]-parseFloat(i[F]||0)-parseFloat(i[U]||0);e.push(100*((n.a[o]()[D]+n.aGutterSize)/s)),r===z.length-1&&e.push(100*((n.b[o]()[D]+n.bGutterSize)/s))}),e},collapse:function(e){if(e===z.length){var t=z[e-1];y.call(t),l||g.call(t,t.size-t.bGutterSize)}else{var n=z[e];y.call(n),l||g.call(n,n.aGutterSize)}},destroy:k}}})},nFS2:function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.options=s.assign({level:f,method:b,chunkSize:16384,windowBits:15,memLevel:8,strategy:y,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&16>t.windowBits&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p,this.strm.avail_out=0;var n=i.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==h)throw new Error(d[n]);if(t.header&&i.deflateSetHeader(this.strm,t.header),t.dictionary){var o;if(o="string"==typeof t.dictionary?l.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=i.deflateSetDictionary(this.strm,o),n!==h)throw new Error(d[n]);this._dict_set=!0}}function o(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||d[n.err];return n.result}var i=n("+BLB"),s=n("tbG5"),l=n("34Q3"),d=n("gMAY"),p=n("bdtv"),c=Object.prototype.toString,u=4,h=0,m=1,g=2,f=-1,y=0,b=8;r.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,o,d;if(this.ended)return!1;d=t===~~t?t:!0===t?u:0,n.input="string"==typeof e?l.string2buf(e):"[object ArrayBuffer]"===c.call(e)?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length;do{if(0===n.avail_out&&(n.output=new s.Buf8(r),n.next_out=0,n.avail_out=r),o=i.deflate(n,d),o!==m&&o!==h)return this.onEnd(o),this.ended=!0,!1;(0===n.avail_out||0===n.avail_in&&(d===u||d===g))&&("string"===this.options.to?this.onData(l.buf2binstring(s.shrinkBuf(n.output,n.next_out))):this.onData(s.shrinkBuf(n.output,n.next_out)))}while((0<n.avail_in||0===n.avail_out)&&o!==m);return d===u?(o=i.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===h):d!==g||(this.onEnd(h),n.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){e===h&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=r,t.deflate=o,t.deflateRaw=function(e,t){return t=t||{},t.raw=!0,o(e,t)},t.gzip=function(e,t){return t=t||{},t.gzip=!0,o(e,t)}},nR4t:function(e,t,n){"use strict";function r(e){o.call(this,e)}var o=n("TCoK"),i=n("dvMn");i.inherits(r,o),r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},nwyA:function(e,t,n){"use strict";function r(e){return this instanceof r?void o.call(this,e):new r(e)}e.exports=r;var o=n("7tlB"),i=n("Q14w");i.inherits=n("4Bm0"),i.inherits(r,o),r.prototype._transform=function(e,t,n){n(null,e)}},p7rG:function(e,t,n){"use strict";function r(e,t){l.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}var o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=n("f4vO"),s=n("dvMn"),l=n("ZKdc"),d=o?"uint8array":"array";t.magic="\b\0",s.inherits(r,l),r.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(d,e.data),!1)},r.prototype.flush=function(){l.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},r.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},r.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},t.compressWorker=function(e){return new r("Deflate",e)},t.uncompressWorker=function(){return new r("Inflate",{})}},pTe4:function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:c[t]}function n(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),o="'"+n+"'";h[o]||(h[o]=r(n))}}function r(e){return function(t){return i(t,e)}}function o(e){var t=e.state.closeBrackets;if(!t||t.override)return t;var n=e.getModeAt(e.getCursor());return n.closeBrackets||t}function s(t){var n=0<e.cmpPos(t.anchor,t.head);return{anchor:new u(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new u(t.head.line,t.head.ch+(n?1:-1))}}function i(n,r){var d=o(n);if(!d||n.getOption("disableInput"))return e.Pass;var c=t(d,"pairs"),h=c.indexOf(r);if(-1==h)return e.Pass;for(var m=t(d,"triples"),g=c.charAt(h+1)==r,f=n.listSelections(),y=0==h%2,b=0,x;b<f.length;b++){var i=f[b],v=i.head,k=n.getRange(v,u(v.line,v.ch+1)),S;if(y&&!i.empty())S="surround";else if((g||!y)&&k==r)S=g&&p(n,v)?"both":0<=m.indexOf(r)&&n.getRange(v,u(v.line,v.ch+3))==r+r+r?"skipThree":"skip";else if(g&&1<v.ch&&0<=m.indexOf(r)&&n.getRange(u(v.line,v.ch-2),v)==r+r){if(2<v.ch&&/\bstring/.test(n.getTokenTypeAt(u(v.line,v.ch-2))))return e.Pass;S="addFour"}else if(g){var w=0==v.ch?" ":n.getRange(u(v.line,v.ch-1),v);if(!e.isWordChar(k)&&w!=r&&!e.isWordChar(w))S="both";else return e.Pass}else if(y&&(n.getLine(v.line).length==v.ch||l(k,c)||/\s/.test(k)))S="both";else return e.Pass;if(!x)x=S;else if(x!=S)return e.Pass}var C=h%2?c.charAt(h-1):r,T=h%2?r:c.charAt(h+1);n.operation(function(){if("skip"==x)n.execCommand("goCharRight");else if("skipThree"==x)for(var e=0;3>e;e++)n.execCommand("goCharRight");else if("surround"==x){for(var t=n.getSelections(),e=0;e<t.length;e++)t[e]=C+t[e]+T;n.replaceSelections(t,"around"),t=n.listSelections().slice();for(var e=0;e<t.length;e++)t[e]=s(t[e]);n.setSelections(t)}else"both"==x?(n.replaceSelection(C+T,null),n.triggerElectric(C+T),n.execCommand("goCharLeft")):"addFour"==x&&(n.replaceSelection(C+C+C+C,"before"),n.execCommand("goCharRight"))})}function l(e,t){var n=t.lastIndexOf(e);return-1<n&&1==n%2}function d(e,t){var n=e.getRange(u(t.line,t.ch-1),u(t.line,t.ch+1));return 2==n.length?n:null}function p(e,t){var n=e.getTokenAt(u(t.line,t.ch+1));return /\bstring/.test(n.type)&&n.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}var c={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},u=e.Pos;e.defineOption("autoCloseBrackets",!1,function(r,o,i){i&&i!=e.Init&&(r.removeKeyMap(h),r.state.closeBrackets=null),o&&(n(t(o,"pairs")),r.state.closeBrackets=o,r.addKeyMap(h))});var h={Backspace:function(n){var r=o(n);if(!r||n.getOption("disableInput"))return e.Pass;for(var s=t(r,"pairs"),l=n.listSelections(),p=0;p<l.length;p++){if(!l[p].empty())return e.Pass;var i=d(n,l[p].head);if(!i||0!=s.indexOf(i)%2)return e.Pass}for(var p=l.length-1,c;0<=p;p--)c=l[p].head,n.replaceRange("",u(c.line,c.ch-1),u(c.line,c.ch+1),"+delete")},Enter:function(n){var r=o(n),s=r&&t(r,"explode");if(!s||n.getOption("disableInput"))return e.Pass;for(var l=n.listSelections(),p=0;p<l.length;p++){if(!l[p].empty())return e.Pass;var i=d(n,l[p].head);if(!i||0!=s.indexOf(i)%2)return e.Pass}n.operation(function(){var e=n.lineSeparator()||"\n";n.replaceSelection(e+e,null),n.execCommand("goCharLeft"),l=n.listSelections();for(var t=0,r;t<l.length;t++)r=l[t].head.line,n.indentLine(r,null,!0),n.indentLine(r+1,null,!0)})}};n(c.pairs+"`")})},pwNi:function(e,t,n){"use strict";var r=n("KM04");var o=function(e){return e&&e.default?e.default:e},i=o(n("JkW7"));if("function"==typeof i){var s=document.body.firstElementChild,l=function(){var e=o(n("JkW7"));s=(0,r.render)((0,r.h)(e),document.body,s)};!1,l()}},q6qL:function(e,t,n){"use strict";(function(t,r){e.exports=r(n("KM04"))})(void 0,function(e){var t=function(){function e(e){this.value=e}function t(t){function n(o,i){try{var s=t[o](i),l=s.value;l instanceof e?Promise.resolve(l.value).then(function(e){n("next",e)},function(e){n("throw",e)}):r(s.done?"return":"normal",s.value)}catch(e){r("throw",e)}}function r(e,t){"return"===e?o.resolve({value:t,done:!0}):"throw"===e?o.reject(t):o.resolve({value:t,done:!1}),o=o.next,o?n(o.key,o.arg):i=null}var o,i;this._invoke=function(e,t){return new Promise(function(r,s){var l={key:e,arg:t,resolve:r,reject:s,next:null};i?i=i.next=l:(o=i=l,n(e,t))})},"function"!=typeof t.return&&(this.return=void 0)}return"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)},{wrap:function(e){return function(){return new t(e.apply(this,arguments))}},await:function(t){return new e(t)}}}(),n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e},i=function(t){function i(){return n(this,i),o(this,t.apply(this,arguments))}return r(i,t),i.prototype.componentDidUpdate=function(e){for(var t in e)if(e[t]!==this.props[t])return setTimeout(this.renderLayer)},i.prototype.componentDidMount=function(){this.isMounted=!0,this.renderLayer=this.renderLayer.bind(this),this.renderLayer()},i.prototype.componentWillUnmount=function(){this.renderLayer(!1),this.isMounted=!1,this.remote&&this.remote.parentNode.removeChild(this.remote)},i.prototype.findNode=function(e){return"string"==typeof e?document.querySelector(e):e},i.prototype.renderLayer=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:!0;this.isMounted&&(this.props.into!==this.intoPointer&&(this.intoPointer=this.props.into,this.into&&this.remote&&(this.remote=e.render(e.h(s,null),this.into,this.remote)),this.into=this.findNode(this.props.into)),this.remote=e.render(e.h(s,{context:this.context},t&&this.props.children||null),this.into,this.remote))},i.prototype.render=function(){return null},i}(e.Component),s=function(e){function t(){return n(this,t),o(this,e.apply(this,arguments))}return r(t,e),t.prototype.getChildContext=function(){return this.props.context},t.prototype.render=function(e){var t=e.children;return t&&t[0]||null},t}(e.Component);return i})},qdP6:function(e){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},qqFR:function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){e.defineMode("javascript",function(t,n){function r(e){for(var t=!1,n=!1,r;null!=(r=e.next());){if(!t){if("/"==r&&!n)return;"["==r?n=!0:n&&"]"==r&&(n=!1)}t=!t&&"\\"==r}}function o(e,t,n){return $e=e,Ze=n,t}function s(e,t){var n=e.next();if("\""==n||"'"==n)return t.tokenize=i(n),t.tokenize(e,t);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==n&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return o(n);if("="==n&&e.eat(">"))return o("=>","operator");if("0"==n&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return o("number","number");if(/\d/.test(n))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),o("number","number");if("/"==n)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):Fe(e,t,1)?(r(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),o("regexp","string-2")):(e.eat("="),o("operator","operator",e.current()));if("`"==n)return t.tokenize=d,d(e,t);if("#"==n)return e.skipToEnd(),o("error","error");if(Ke.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?("!"==n||"="==n)&&e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),o("operator","operator",e.current());if(We.test(n)){e.eatWhile(We);var s=e.current();if("."!=t.lastType){if(He.propertyIsEnumerable(s)){var p=He[s];return o(p.type,p.style,s)}if("async"==s&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return o("async","keyword",s)}return o("variable","variable",s)}}function i(e){return function(t,n){var r=!1,i;if(je&&"@"==t.peek()&&t.match(Ge))return n.tokenize=s,o("jsonld-keyword","meta");for(;null!=(i=t.next())&&(i!=e||r);)r=!r&&"\\"==i;return r||(n.tokenize=s),o("string","string")}}function l(e,t){for(var n=!1,r;r=e.next();){if("/"==r&&n){t.tokenize=s;break}n="*"==r}return o("comment","comment")}function d(e,t){for(var n=!1,r;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=s;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function p(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){if(Ve){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var o=0,i=!1,s=n-1;0<=s;--s){var l=e.string.charAt(s),d=Xe.indexOf(l);if(0<=d&&3>d){if(!o){++s;break}if(0==--o){"("==l&&(i=!0);break}}else if(3<=d&&6>d)++o;else if(We.test(l))i=!0;else{if(/["'\/]/.test(l))return;if(i&&!o){++s;break}}}i&&!o&&(t.fatArrowAt=s)}}function c(e,t,n,r,o,i){this.indented=e,this.column=t,this.type=n,this.prev=o,this.info=i,null!=r&&(this.align=r)}function u(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function h(e,t,n,r,o){var i=e.cc;for(Ye.state=e,Ye.stream=o,Ye.marked=null,Ye.cc=i,Ye.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var s=i.length?i.pop():qe?N:A;if(s(n,r)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Ye.marked?Ye.marked:"variable"==n&&u(e,r)?"variable-2":t}}}function g(){for(var e=arguments.length-1;0<=e;e--)Ye.cc.push(arguments[e])}function f(){return g.apply(null,arguments),!0}function m(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function y(e){var t=Ye.state;if(Ye.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=b(e,t.context);if(null!=r)return void(t.context=r)}else if(!m(e,t.localVars))return void(t.localVars=new k(e,t.localVars));n.globalVars&&!m(e,t.globalVars)&&(t.globalVars=new k(e,t.globalVars))}function b(e,t){if(!t)return null;if(t.block){var n=b(e,t.prev);return n?n==t.prev?t:new v(n,t.vars,!0):null}return m(e,t.vars)?t:new v(t.prev,new k(e,t.vars),!1)}function x(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function v(e,t,n){this.prev=e,this.vars=t,this.block=n}function k(e,t){this.name=e,this.next=t}function S(){Ye.state.context=new v(Ye.state.context,Ye.state.localVars,!1),Ye.state.localVars=Je}function w(){Ye.state.context=new v(Ye.state.context,Ye.state.localVars,!0),Ye.state.localVars=null}function C(){Ye.state.localVars=Ye.state.context.vars,Ye.state.context=Ye.state.context.prev}function T(e,t){var n=function(){var n=Ye.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var o=n.lexical;o&&")"==o.type&&o.align;o=o.prev)r=o.indented;n.lexical=new c(r,Ye.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function E(){var e=Ye.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function _(e){function t(n){return n==e?f():";"==e?g():f(t)}return t}function A(e,t){return"var"==e?f(T("vardef",t),de,_(";"),E):"keyword a"==e?f(T("form"),O,A,E):"keyword b"==e?f(T("form"),A,E):"keyword d"==e?Ye.stream.match(/^\s*$/,!1)?f():f(T("stat"),D,_(";"),E):"debugger"==e?f(_(";")):"{"==e?f(T("}"),w,J,E,C):";"==e?f():"if"==e?("else"==Ye.state.lexical.info&&Ye.state.cc[Ye.state.cc.length-1]==E&&Ye.state.cc.pop()(),f(T("form"),O,A,E,me)):"function"==e?f(ve):"for"==e?f(T("form"),ge,A,E):"class"==e||Ve&&"interface"==t?(Ye.marked="keyword",f(T("form"),we,E)):"variable"==e?Ve&&"declare"==t?(Ye.marked="keyword",f(A)):Ve&&("module"==t||"enum"==t||"type"==t)&&Ye.stream.match(/^\s*\w/,!1)?(Ye.marked="keyword","enum"==t?f(Re):"type"==t?f(te,_("operator"),te,_(";")):f(T("form"),pe,_("{"),T("}"),J,E,E)):Ve&&"namespace"==t?(Ye.marked="keyword",f(T("form"),N,J,E)):Ve&&"abstract"==t?(Ye.marked="keyword",f(A)):f(T("stat"),W):"switch"==e?f(T("form"),O,_("{"),T("}","switch"),w,J,E,E,C):"case"==e?f(N,_(":")):"default"==e?f(_(":")):"catch"==e?f(T("form"),S,I,A,E,C):"export"==e?f(T("stat"),Ee,E):"import"==e?f(T("stat"),Ie,E):"async"==e?f(A):"@"==t?f(N,A):g(T("stat"),N,_(";"),E)}function I(e){if("("==e)return f(ke,_(")"))}function N(e,t){return M(e,t,!1)}function L(e,t){return M(e,t,!0)}function O(e){return"("==e?f(T(")"),N,_(")"),E):g()}function M(e,t,n){if(Ye.state.fatArrowAt==Ye.stream.start){var r=n?z:U;if("("==e)return f(S,T(")"),Q(ke,")"),E,_("=>"),r,C);if("variable"==e)return g(S,pe,_("=>"),r,C)}var o=n?P:R;return Qe.hasOwnProperty(e)?f(o):"function"==e?f(ve,o):"class"==e||Ve&&"interface"==t?(Ye.marked="keyword",f(T("form"),Se,E)):"keyword c"==e||"async"==e?f(n?L:N):"("==e?f(T(")"),D,_(")"),E,o):"operator"==e||"spread"==e?f(n?L:N):"["==e?f(T("]"),De,E,o):"{"==e?Y(K,"}",null,o):"quasi"==e?g(B,o):"new"==e?f(j(n)):"import"==e?f(N):f()}function D(e){return e.match(/[;\}\)\],]/)?g():g(N)}function R(e,t){return","==e?f(N):P(e,t,!1)}function P(e,t,n){var r=!1==n?R:P,o=!1==n?N:L;return"=>"==e?f(S,n?z:U,C):"operator"==e?/\+\+|--/.test(t)||Ve&&"!"==t?f(r):Ve&&"<"==t&&Ye.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?f(T(">"),Q(te,">"),E,r):"?"==t?f(N,_(":"),o):f(o):"quasi"==e?g(B,r):";"==e?void 0:"("==e?Y(L,")","call",r):"."==e?f(H,r):"["==e?f(T("]"),D,_("]"),E,r):Ve&&"as"==t?(Ye.marked="keyword",f(te,r)):"regexp"==e?(Ye.state.lastType=Ye.marked="operator",Ye.stream.backUp(Ye.stream.pos-Ye.stream.start-1),f(o)):void 0}function B(e,t){return"quasi"==e?"${"==t.slice(t.length-2)?f(N,F):f(B):g()}function F(e){if("}"==e)return Ye.marked="string-2",Ye.state.tokenize=d,f(B)}function U(e){return p(Ye.stream,Ye.state),g("{"==e?A:N)}function z(e){return p(Ye.stream,Ye.state),g("{"==e?A:L)}function j(e){return function(t){return"."==t?f(e?V:q):"variable"==t&&Ve?f(ie,e?P:R):g(e?L:N)}}function q(e,t){if("target"==t)return Ye.marked="keyword",f(R)}function V(e,t){if("target"==t)return Ye.marked="keyword",f(P)}function W(e){return":"==e?f(E,A):g(R,_(";"),E)}function H(e){if("variable"==e)return Ye.marked="property",f()}function K(e,t){if("async"==e)return Ye.marked="property",f(K);if("variable"==e||"keyword"==Ye.style){if(Ye.marked="property","get"==t||"set"==t)return f(G);var n;return Ve&&Ye.state.fatArrowAt==Ye.stream.start&&(n=Ye.stream.match(/^\s*:\s*/,!1))&&(Ye.state.fatArrowAt=Ye.stream.pos+n[0].length),f(X)}return"number"==e||"string"==e?(Ye.marked=je?"property":Ye.style+" property",f(X)):"jsonld-keyword"==e?f(X):Ve&&x(t)?(Ye.marked="keyword",f(K)):"["==e?f(N,$,_("]"),X):"spread"==e?f(L,X):"*"==t?(Ye.marked="keyword",f(K)):":"==e?g(X):void 0}function G(e){return"variable"==e?(Ye.marked="property",f(ve)):g(X)}function X(e){return":"==e?f(L):"("==e?g(ve):void 0}function Q(e,t,n){function r(o,i){if(n?-1<n.indexOf(o):","==o){var s=Ye.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),f(function(n,r){return n==t||r==t?g():g(e)},r)}return o==t||i==t?f():f(_(t))}return function(n,o){return n==t||o==t?f():g(e,r)}}function Y(e,t,n){for(var r=3;r<arguments.length;r++)Ye.cc.push(arguments[r]);return f(T(t,n),Q(e,t),E)}function J(e){return"}"==e?f():g(A,J)}function $(e,t){if(Ve){if(":"==e)return f(te);if("?"==t)return f($)}}function Z(e){if(Ve&&":"==e)return Ye.stream.match(/^\s*\w+\s+is\b/,!1)?f(N,ee,te):f(te)}function ee(e,t){if("is"==t)return Ye.marked="keyword",f()}function te(e,t){return"keyof"==t||"typeof"==t?(Ye.marked="keyword",f("keyof"==t?te:L)):"variable"==e||"void"==t?(Ye.marked="type",f(ae)):"string"==e||"number"==e||"atom"==e?f(ae):"["==e?f(T("]"),Q(te,"]",","),E,ae):"{"==e?f(T("}"),Q(re,"}",",;"),E,ae):"("==e?f(Q(oe,")"),ne):"<"==e?f(Q(te,">"),te):void 0}function ne(e){if("=>"==e)return f(te)}function re(e,t){return"variable"==e||"keyword"==Ye.style?(Ye.marked="property",f(re)):"?"==t?f(re):":"==e?f(te):"["==e?f(N,$,_("]"),re):void 0}function oe(e,t){return"variable"==e&&Ye.stream.match(/^\s*[?:]/,!1)||"?"==t?f(oe):":"==e?f(te):g(te)}function ae(e,t){return"<"==t?f(T(">"),Q(te,">"),E,ae):"|"==t||"."==e||"&"==t?f(te):"["==e?f(_("]"),ae):"extends"==t||"implements"==t?(Ye.marked="keyword",f(te)):void 0}function ie(e,t){if("<"==t)return f(T(">"),Q(te,">"),E,ae)}function se(){return g(te,le)}function le(e,t){if("="==t)return f(te)}function de(e,t){return"enum"==t?(Ye.marked="keyword",f(Re)):g(pe,$,ue,he)}function pe(e,t){return Ve&&x(t)?(Ye.marked="keyword",f(pe)):"variable"==e?(y(t),f()):"spread"==e?f(pe):"["==e?Y(pe,"]"):"{"==e?Y(ce,"}"):void 0}function ce(e,t){return"variable"!=e||Ye.stream.match(/^\s*:/,!1)?("variable"==e&&(Ye.marked="property"),"spread"==e?f(pe):"}"==e?g():f(_(":"),pe,ue)):(y(t),f(ue))}function ue(e,t){if("="==t)return f(L)}function he(e){if(","==e)return f(de)}function me(e,t){if("keyword b"==e&&"else"==t)return f(T("form","else"),A,E)}function ge(e,t){return"await"==t?f(ge):"("==e?f(T(")"),fe,_(")"),E):void 0}function fe(e){return"var"==e?f(de,_(";"),be):";"==e?f(be):"variable"==e?f(ye):g(N,_(";"),be)}function ye(e,t){return"in"==t||"of"==t?(Ye.marked="keyword",f(N)):f(R,be)}function be(e,t){return";"==e?f(xe):"in"==t||"of"==t?(Ye.marked="keyword",f(N)):g(N,_(";"),xe)}function xe(e){")"!=e&&f(N)}function ve(e,t){return"*"==t?(Ye.marked="keyword",f(ve)):"variable"==e?(y(t),f(ve)):"("==e?f(S,T(")"),Q(ke,")"),E,Z,A,C):Ve&&"<"==t?f(T(">"),Q(se,">"),E,ve):void 0}function ke(e,t){return"@"==t&&f(N,ke),"spread"==e?f(ke):Ve&&x(t)?(Ye.marked="keyword",f(ke)):g(pe,$,ue)}function Se(e,t){return"variable"==e?we(e,t):Ce(e,t)}function we(e,t){if("variable"==e)return y(t),f(Ce)}function Ce(e,t){return"<"==t?f(T(">"),Q(se,">"),E,Ce):"extends"==t||"implements"==t||Ve&&","==e?("implements"==t&&(Ye.marked="keyword"),f(Ve?te:N,Ce)):"{"==e?f(T("}"),Te,E):void 0}function Te(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Ve&&x(t))&&Ye.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ye.marked="keyword",f(Te)):"variable"==e||"keyword"==Ye.style?(Ye.marked="property",f(Ve?_e:ve,Te)):"["==e?f(N,$,_("]"),Ve?_e:ve,Te):"*"==t?(Ye.marked="keyword",f(Te)):";"==e?f(Te):"}"==e?f():"@"==t?f(N,Te):void 0}function _e(e,t){return"?"==t?f(_e):":"==e?f(te,ue):"="==t?f(L):g(ve)}function Ee(e,t){return"*"==t?(Ye.marked="keyword",f(Me,_(";"))):"default"==t?(Ye.marked="keyword",f(N,_(";"))):"{"==e?f(Q(Ae,"}"),Me,_(";")):g(A)}function Ae(e,t){return"as"==t?(Ye.marked="keyword",f(_("variable"))):"variable"==e?g(L,Ae):void 0}function Ie(e){return"string"==e?f():"("==e?g(N):g(Ne,Le,Me)}function Ne(e,t){return"{"==e?Y(Ne,"}"):("variable"==e&&y(t),"*"==t&&(Ye.marked="keyword"),f(Oe))}function Le(e){if(","==e)return f(Ne,Le)}function Oe(e,t){if("as"==t)return Ye.marked="keyword",f(Ne)}function Me(e,t){if("from"==t)return Ye.marked="keyword",f(N)}function De(e){return"]"==e?f():g(Q(L,"]"))}function Re(){return g(T("form"),pe,_("{"),T("}"),Q(Pe,"}"),E,E)}function Pe(){return g(pe,ue)}function Be(e,t){return"operator"==e.lastType||","==e.lastType||Ke.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Fe(e,t,n){return t.tokenize==s&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}var Ue=t.indentUnit,ze=n.statementIndent,je=n.jsonld,qe=n.json||je,Ve=n.typescript,We=n.wordCharacters||/[\w$\xa1-\uffff]/,He=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),o=e("keyword d"),i=e("operator"),s={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:o,break:o,continue:o,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),Ke=/[+\-*&%=<>!?|~^@]/,Ge=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Xe="([{}])",Qe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ye={state:null,column:null,marked:null,cc:null},Je=new k("this",new k("arguments",null)),$e,Ze;return C.lex=!0,E.lex=!0,{startState:function(e){var t={tokenize:s,lastType:"sof",cc:[],lexical:new c((e||0)-Ue,0,"block",!1),localVars:n.localVars,context:n.localVars&&new v(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(!t.lexical.hasOwnProperty("align")&&(t.lexical.align=!1),t.indented=e.indentation(),p(e,t)),t.tokenize!=l&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==$e?n:(t.lastType="operator"==$e&&("++"==Ze||"--"==Ze)?"incdec":$e,h(t,n,$e,Ze,e))},indent:function(t,r){if(t.tokenize==l)return e.Pass;if(t.tokenize!=s)return 0;var o=r&&r.charAt(0),d=t.lexical,p;if(!/^\s*else\b/.test(r))for(var u=t.cc.length-1,i;0<=u;--u)if(i=t.cc[u],i==E)d=d.prev;else if(i!=me)break;for(;("stat"==d.type||"form"==d.type)&&("}"==o||(p=t.cc[t.cc.length-1])&&(p==R||p==P)&&!/^[,\.=+\-*:?[\(]/.test(r));)d=d.prev;ze&&")"==d.type&&"stat"==d.prev.type&&(d=d.prev);var c=d.type,h=o==c;return"vardef"==c?d.indented+("operator"==t.lastType||","==t.lastType?d.info.length+1:0):"form"==c&&"{"==o?d.indented:"form"==c?d.indented+Ue:"stat"==c?d.indented+(Be(t,r)?ze||Ue:0):"switch"!=d.info||h||!1==n.doubleIndentSwitch?d.align?d.column+(h?0:1):d.indented+(h?0:Ue):d.indented+(/^(?:case|default)\b/.test(r)?Ue:2*Ue)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:qe?null:"/*",blockCommentEnd:qe?null:"*/",blockCommentContinue:qe?null:" * ",lineComment:qe?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:qe?"json":"javascript",jsonldMode:je,jsonMode:qe,expressionAllowed:Fe,skipExpression:function(e){var t=e.cc[e.cc.length-1];(t==N||t==L)&&e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},rAgE:function(e,t,n){"use strict";function r(e){this.files=[],this.loadOptions=e}var o=n("9Uuy"),i=n("dvMn"),s=n("Ctqd"),l=n("dFUs"),d=n("Sm7/"),p=n("untT");r.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4);return this.reader.setIndex(n),r===t},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 e=this.reader.readData(this.zipCommentLength),t=p.uint8array?"uint8array":"array",n=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},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 e=this.zip64EndOfCentralSize-44,t,n,r;0<e;)t=this.reader.readInt(2),n=this.reader.readInt(4),r=this.reader.readData(n),this.zip64ExtensibleData[t]={id:t,length:n,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)e=new l({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length)if(0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length);else;},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(0>e){var t=!this.isSignature(0,s.LOCAL_FILE_HEADER);if(t)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(e);var n=e;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,e=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),0>e)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.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(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var o=n-r;if(0<o)this.isSignature(n,s.CENTRAL_FILE_HEADER)||(this.reader.zero=o);else if(0>o)throw new Error("Corrupted zip: missing "+Math.abs(o)+" bytes.")},prepareReader:function(e){this.reader=o(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=r},rbVD:function(e,t,n){"use strict";var r=Math.max;(function(e){e(n("tQq4"))})(function(e){function t(e,t){this.cm=e,this.options=t,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 n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}function n(e,t,n){var r=e.options.hintOptions,o={};for(var i in g)o[i]=g[i];if(r)for(var i in r)void 0!==r[i]&&(o[i]=r[i]);if(n)for(var i in n)void 0!==n[i]&&(o[i]=n[i]);return o.hint.resolve&&(o.hint=o.hint.resolve(e,t)),o}function o(e){return"string"==typeof e?e:e.text}function s(e,t){function n(e,n){var o;o="string"==typeof n?r.hasOwnProperty(n)?r[n]:n:function(e){return n(e,t)},i[e]=o}var r={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},o=e.options.customKeys,i=o?{}:r;if(o)for(var s in o)o.hasOwnProperty(s)&&n(s,o[s]);var l=e.options.extraKeys;if(l)for(var s in l)l.hasOwnProperty(s)&&n(s,l[s]);return i}function i(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function l(n,t){this.completion=n,this.data=t,this.picked=!1;var l=this,d=n.cm,p=this.hints=document.createElement("ul");p.className="CodeMirror-hints",this.selectedHint=t.selectedHint||0;for(var h=t.list,m=0;m<h.length;++m){var g=p.appendChild(document.createElement("li")),f=h[m],y=c+(m==this.selectedHint?" "+u:"");null!=f.className&&(y=f.className+" "+y),g.className=y,f.render?f.render(g,t,f):g.appendChild(document.createTextNode(f.displayText||o(f))),g.hintId=m}var b=d.cursorCoords(n.options.alignWithWord?t.from:null),x=b.left,v=b.bottom,k=!0;p.style.left=x+"px",p.style.top=v+"px";var S=window.innerWidth||r(document.body.offsetWidth,document.documentElement.offsetWidth),w=window.innerHeight||r(document.body.offsetHeight,document.documentElement.offsetHeight);(n.options.container||document.body).appendChild(p);var C=p.getBoundingClientRect(),T=C.bottom-w,_=p.scrollHeight>p.clientHeight+1,E=d.getScrollInfo();if(0<T){var A=C.bottom-C.top,I=b.top-(b.bottom-C.top);if(0<I-A)p.style.top=(v=b.top-A)+"px",k=!1;else if(A>w){p.style.height=w-5+"px",p.style.top=(v=b.bottom-C.top)+"px";var N=d.getCursor();t.from.ch!=N.ch&&(b=d.cursorCoords(N),p.style.left=(x=b.left)+"px",C=p.getBoundingClientRect())}}var L=C.right-S;if(0<L&&(C.right-C.left>S&&(p.style.width=S-5+"px",L-=C.right-C.left-S),p.style.left=(x=b.left-L)+"px"),_)for(var O=p.firstChild;O;O=O.nextSibling)O.style.paddingRight=d.display.nativeBarWidth+"px";if(d.addKeyMap(this.keyMap=s(n,{moveFocus:function(e,t){l.changeActive(l.selectedHint+e,t)},setFocus:function(e){l.changeActive(e)},menuSize:function(){return l.screenAmount()},length:h.length,close:function(){n.close()},pick:function(){l.pick()},data:t})),n.options.closeOnUnfocus){var M;d.on("blur",this.onBlur=function(){M=setTimeout(function(){n.close()},100)}),d.on("focus",this.onFocus=function(){clearTimeout(M)})}return d.on("scroll",this.onScroll=function(){var e=d.getScrollInfo(),t=d.getWrapperElement().getBoundingClientRect(),r=v+E.top-e.top,o=r-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return k||(o+=p.offsetHeight),o<=t.top||o>=t.bottom?n.close():void(p.style.top=r+"px",p.style.left=x+E.left-e.left+"px")}),e.on(p,"dblclick",function(n){var e=i(p,n.target||n.srcElement);e&&null!=e.hintId&&(l.changeActive(e.hintId),l.pick())}),e.on(p,"click",function(r){var e=i(p,r.target||r.srcElement);e&&null!=e.hintId&&(l.changeActive(e.hintId),n.options.completeOnSingleClick&&l.pick())}),e.on(p,"mousedown",function(){setTimeout(function(){d.focus()},20)}),e.signal(t,"select",h[this.selectedHint],p.childNodes[this.selectedHint]),!0}function d(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}function p(e,t,n,r){if(e.async)e(t,r,n);else{var o=e(t,n);o&&o.then?o.then(r):r(o)}}var c="CodeMirror-hint",u="CodeMirror-hint-active";e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var o in n)r[o]=n[o];return e.showHint(r)},e.defineExtension("showHint",function(r){r=n(this,this.getCursor("start"),r);var o=this.listSelections();if(!(1<o.length)){if(this.somethingSelected()){if(!r.hint.supportsSelection)return;for(var s=0;s<o.length;s++)if(o[s].head.line!=o[s].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var i=this.state.completionActive=new t(this,r);i.options.hint&&(e.signal(this,"startCompletion",this),i.update(!0))}});var h=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},m=window.cancelAnimationFrame||clearTimeout;t.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n];r.hint?r.hint(this.cm,t,r):this.cm.replaceRange(o(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),this.close()},cursorActivity:function(){this.debounce&&(m(this.debounce),this.debounce=0);var e=this.cm.getCursor(),t=this.cm.getLine(e.line);if(e.line!=this.startPos.line||t.length-e.ch!=this.startLen-this.startPos.ch||e.ch<this.startPos.ch||this.cm.somethingSelected()||e.ch&&this.options.closeCharacters.test(t.charAt(e.ch-1)))this.close();else{var n=this;this.debounce=h(function(){n.update()}),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;p(this.options.hint,this.cm,this.options,function(r){t.tick==n&&t.finishUpdate(r,e)})}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(r&&1==t.list.length?this.pick(t,0):(this.widget=new l(this,t),e.signal(t,"shown")))}},l.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm;this.completion.options.closeOnUnfocus&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus)),e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,n){if(t>=this.data.list.length?t=n?this.data.list.length-1:0:0>t&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r&&(r.className=r.className.replace(" "+u,"")),r=this.hints.childNodes[this.selectedHint=t],r.className+=" "+u,r.offsetTop<this.hints.scrollTop?this.hints.scrollTop=r.offsetTop-3:r.offsetTop+r.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=r.offsetTop+r.offsetHeight-this.hints.clientHeight+3),e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:function(t,n){var r=t.getHelpers(n,"hint"),o;if(r.length){var i=function(e,t,n){function o(r){return r==s.length?t(null):void p(s[r],e,n,function(e){e&&0<e.list.length?t(e):o(r+1)})}var s=d(e,r);o(0)};return i.async=!0,i.supportsSelection=!0,i}return(o=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:o})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}}),e.registerHelper("hint","fromList",function(t,n){var r=t.getCursor(),o=t.getTokenAt(r),s=e.Pos(r.line,o.start),l;o.start<r.ch&&/\w/.test(o.string.charAt(r.ch-o.start-1))?l=o.string.substr(0,r.ch-o.start):(l="",s=r);for(var d=[],p=0,i;p<n.words.length;p++)i=n.words[p],i.slice(0,l.length)==l&&d.push(i);if(d.length)return{list:d,from:s,to:r}}),e.commands.autocomplete=e.showHint;var g={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)})},rc1b:function(e,t){"use strict";function n(e){return e===l||e===d}function r(e){return 47<e&&58>e}function o(e,t,n){return t=t||65,n=n||90,e&=-33,e>=t&&e<=n}function i(e){return 32===e||9===e||160===e}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1,n;t<arguments.length;t++)for(var r in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},l=39,d=34,p={escape:92,throws:!1},c=function(e,t){t=t?s({},p,t):p;var r=e.pos,o=e.peek();if(e.eat(n)){for(;!e.eof();)switch(e.next()){case o:return e.start=r,!0;case t.escape:e.next();}if(e.pos=r,t.throws)throw e.error("Unable to consume quoted string")}return!1},u={escape:92,throws:!1};t.eatQuoted=c,t.isQuote=n,t.isAlpha=o,t.isNumber=r,t.isAlphaNumeric=function(e){return r(e)||o(e)},t.isSpace=function(e){return i(e)||10===e||13===e},t.isWhiteSpace=i,t.eatPair=function(e,t,n,r){r=r?s({},u,r):u;var o=e.pos;if(e.eat(t)){for(var i=1,l;!e.eof();)if(!c(e,r))if(l=e.next(),l===t)i++;else if(l!==n)l===r.escape&&e.next();else if(i--,!i)return e.start=o,!0;if(e.pos=o,r.throws)throw e.error("Unable to find matching pair for "+String.fromCharCode(t))}return!1}},rmqo:function(e,t,n){"use strict";var r=n("cVWy"),o=n("Ib92");r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},s0rf:function(e,t,n){"use strict";e.exports=!n("6TpT")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},sN8g:function(e,t,n){"use strict";n("rmqo"),e.exports=n("KxJl").setImmediate},tMLt:function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("H+g/"))})(function(e){function t(e){this.options=e,this.from=this.to=0}function n(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function r(e,t){for(var n=e.findMarks(u(t,0),u(t+1,0)),r=0;r<n.length;++r)if(n[r].__isFold&&n[r].find().from.line==t)return n[r]}function o(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function i(e,t,n){var i=e.state.foldGutter.options,s=t,l=e.foldOption(i,"minFoldSize"),d=e.foldOption(i,"rangeFinder");e.eachLine(t,n,function(t){var n=null;if(r(e,s))n=o(i.indicatorFolded);else{var p=u(s,0),c=d&&d(e,p);c&&c.to.line-c.from.line>=l&&(n=o(i.indicatorOpen))}e.setGutterMarker(t,i.gutter,n),++s})}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){i(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function l(e,t,n){var o=e.state.foldGutter;if(o){var i=o.options;if(n==i.gutter){var s=r(e,t);s?s.clear():e.foldCode(u(t,0),i.rangeFinder)}}}function d(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){s(e)},n.foldOnChangeTimeSpan||600)}}function p(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||20<n.from-t.to||20<t.from-n.to?s(e):e.operation(function(){n.from<t.from&&(i(e,n.from,t.from),t.from=n.from),n.to>t.to&&(i(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function c(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&i(e,r,r+1)}}e.defineOption("foldGutter",!1,function(r,o,i){i&&i!=e.Init&&(r.clearGutter(r.state.foldGutter.options.gutter),r.state.foldGutter=null,r.off("gutterClick",l),r.off("change",d),r.off("viewportChange",p),r.off("fold",c),r.off("unfold",c),r.off("swapDoc",d)),o&&(r.state.foldGutter=new t(n(o)),s(r),r.on("gutterClick",l),r.on("change",d),r.on("viewportChange",p),r.on("fold",c),r.on("unfold",c),r.on("swapDoc",d))});var u=e.Pos})},tQq4:function(e){"use strict";var t=Math.ceil,n=Math.abs,r=Math.round,o=Math.floor,i=String.fromCharCode,s=Math.min,l=Math.max;(function(t,n){e.exports=n()})(void 0,function(){function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function d(t){for(var e=t.childNodes.length;0<e;--e)t.removeChild(t.firstChild);return t}function p(t,n){return d(t).appendChild(n)}function c(t,n,r,o){var s=document.createElement(t);if(r&&(s.className=r),o&&(s.style.cssText=o),"string"==typeof n)s.appendChild(document.createTextNode(n));else if(n)for(var e=0;e<n.length;++e)s.appendChild(n[e]);return s}function u(t,n,r,o){var i=c(t,n,r,o);return i.setAttribute("role","presentation"),i}function h(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function m(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function g(t,n){var r=t.className;e(n).test(r)||(t.className+=(r?" ":"")+n)}function f(t,n){for(var r=t.split(" "),o=0;o<r.length;o++)r[o]&&!e(r[o]).test(n)&&(n+=" "+r[o]);return n}function y(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function b(e,t,n){for(var r in t||(t={}),e)e.hasOwnProperty(r)&&(!1!==n||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function v(e,t,r,o,s){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.length));for(var l=o||0,i=s||0,n;;){if(n=e.indexOf("\t",l),0>n||n>=t)return i+(t-l);i+=n-l,i+=r-i%r,l=n+1}}function x(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function k(e,t,n){for(var r=0,o=0,i;;){i=e.indexOf("\t",r),-1==i&&(i=e.length);var l=i-r;if(i==e.length||o+l>=t)return r+s(l,t-o);if(o+=i-r,o+=n-o%n,r=i+1,o>=t)return r}}function S(e){for(;es.length<=e;)es.push(w(es)+" ");return es[e]}function w(e){return e[e.length-1]}function C(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function T(e,t,n){for(var r=0,o=n(t);r<e.length&&n(e[r])<=o;)r++;e.splice(r,0,t)}function _(){}function E(e,t){var n;return Object.create?n=Object.create(e):(_.prototype=e,n=new _),t&&b(t,n),n}function A(e){return /\w/.test(e)||"\x80"<e&&(e.toUpperCase()!=e.toLowerCase()||ts.test(e))}function I(e,t){return t?-1<t.source.indexOf("\\w")&&A(e)||t.test(e):A(e)}function N(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function L(e){return 768<=e.charCodeAt(0)&&ns.test(e)}function O(e,t,n){for(;(0>n?0<t:t<e.length)&&L(e.charAt(t));)t+=n;return t}function M(e,n,r){for(var i=n>r?-1:1;;){if(n==r)return n;var s=(n+r)/2,l=0>i?t(s):o(s);if(l==n)return e(l)?n:r;e(l)?r=l:n=l+i}}function D(e,t,n){var r=this;this.input=n,r.scrollbarFiller=c("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=c("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=u("div",null,"CodeMirror-code"),r.selectionDiv=c("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=c("div",null,"CodeMirror-cursors"),r.measure=c("div",null,"CodeMirror-measure"),r.lineMeasure=c("div",null,"CodeMirror-measure"),r.lineSpace=u("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var o=u("div",[r.lineSpace],"CodeMirror-lines");r.mover=c("div",[o],null,"position: relative"),r.sizer=c("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=c("div",null,null,"position: absolute; height: "+Qi+"px; width: 1px;"),r.gutters=c("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=c("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=c("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),Ei&&8>Ai&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),Ii||wi&&Fi||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function R(e,t){if(t-=e.first,0>t||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(t<i){n=o;break}t-=i}return n.lines[t]}function P(e,t,r){var o=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var n=e.text;i==r.line&&(n=n.slice(0,r.ch)),i==t.line&&(n=n.slice(t.ch)),o.push(n),++i}),o}function B(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function F(e,t){var r=t-e.height;if(r)for(var o=e;o;o=o.parent)o.height+=r}function U(e){if(null==e.parent)return null;for(var t=e.parent,n=x(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var o=0;;++o){if(r.children[o]==t)break;n+=r.children[o].chunkSize()}return n+t.first}function z(e,t){var r=e.first;outer:do{for(var n=0;n<e.children.length;++n){var o=e.children[n],s=o.height;if(t<s){e=o;continue outer}t-=s,r+=o.chunkSize()}return r}while(!e.lines);for(var l=0;l<e.lines.length;++l){var i=e.lines[l],d=i.height;if(t<d)break;t-=d}return r+l}function j(e,t){return t>=e.first&&t<e.first+e.size}function q(e,t){return e.lineNumberFormatter(t+e.firstLineNumber)+""}function V(e,t,n){return void 0===n&&(n=null),this instanceof V?void(this.line=e,this.ch=t,this.sticky=n):new V(e,t,n)}function W(e,t){return e.line-t.line||e.ch-t.ch}function H(e,t){return e.sticky==t.sticky&&0==W(e,t)}function K(e){return V(e.line,e.ch)}function G(e,t){return 0>W(e,t)?t:e}function X(e,t){return 0>W(e,t)?e:t}function Q(e,t){return l(e.first,s(t,e.first+e.size-1))}function Y(e,t){if(t.line<e.first)return V(e.first,0);var n=e.first+e.size-1;return t.line>n?V(n,R(e,n).text.length):J(t,R(e,t.line).text.length)}function J(e,t){var n=e.ch;return null==n||n>t?V(e.line,t):0>n?V(e.line,0):e}function $(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Y(e,t[r]);return n}function Z(){rs=!0}function ee(){os=!0}function te(e,t,n){this.marker=e,this.from=t,this.to=n}function ne(e,t){if(e)for(var n=0,r;n<e.length;++n)if(r=e[n],r.marker==t)return r}function re(e,t){for(var n=0,o;n<e.length;++n)e[n]!=t&&(o||(o=[])).push(e[n]);return o}function oe(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function ae(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],s=i.marker,l=null==i.from||(s.inclusiveLeft?i.from<=t:i.from<t);if(l||i.from==t&&"bookmark"==s.type&&(!n||!i.marker.insertLeft)){var d=null==i.to||(s.inclusiveRight?i.to>=t:i.to>t);(r||(r=[])).push(new te(s,i.from,d?null:i.to))}}return r}function se(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],s=i.marker,l=null==i.to||(s.inclusiveRight?i.to>=t:i.to>t);if(l||i.from==t&&"bookmark"==s.type&&(!n||i.marker.insertLeft)){var d=null==i.from||(s.inclusiveLeft?i.from<=t:i.from<t);(r||(r=[])).push(new te(s,d?null:i.from-t,null==i.to?null:i.to-t))}}return r}function le(e,t){if(t.full)return null;var n=j(e,t.from.line)&&R(e,t.from.line).markedSpans,r=j(e,t.to.line)&&R(e,t.to.line).markedSpans;if(!n&&!r)return null;var o=t.from.ch,s=t.to.ch,l=0==W(t.from,t.to),d=ae(n,o,l),p=se(r,s,l),c=1==t.text.length,u=w(t.text).length+(c?o:0);if(d)for(var h=0,i;h<d.length;++h)if(i=d[h],null==i.to){var m=ne(p,i.marker);m?c&&(i.to=null==m.to?null:m.to+u):i.to=o}if(p)for(var g=0,f;g<p.length;++g)if(f=p[g],null!=f.to&&(f.to+=u),null==f.from){var y=ne(d,f.marker);y||(f.from=u,c&&(d||(d=[])).push(f))}else f.from+=u,c&&(d||(d=[])).push(f);d&&(d=de(d)),p&&p!=d&&(p=de(p));var b=[d];if(!c){var x=t.text.length-2,v;if(0<x&&d)for(var k=0;k<d.length;++k)null==d[k].to&&(v||(v=[])).push(new te(d[k].marker,null,null));for(var S=0;S<x;++S)b.push(v);b.push(p)}return b}function de(e){for(var t=0,n;t<e.length;++t)n=e[t],null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1);return e.length?e:null}function pe(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0,n;t<e.markedSpans.length;++t)n=e.markedSpans[t].marker,n.readOnly&&(!r||-1==x(r,n))&&(r||(r=[])).push(n)}),!r)return null;for(var o=[{from:t,to:n}],s=0;s<r.length;++s)for(var i=r[s],l=i.find(0),d=0,c;d<o.length;++d)if(c=o[d],!(0>W(c.to,l.from)||0<W(c.from,l.to))){var p=[d,1],u=W(c.from,l.from),h=W(c.to,l.to);!(0>u)&&(i.inclusiveLeft||u)||p.push({from:c.from,to:l.from}),!(0<h)&&(i.inclusiveRight||h)||p.push({from:l.to,to:c.to}),o.splice.apply(o,p),d+=p.length-3}return o}function ce(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function ue(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function he(e){return e.inclusiveLeft?-1:0}function me(e){return e.inclusiveRight?1:0}function ge(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),o=t.find(),i=W(r.from,o.from)||he(e)-he(t);if(i)return-i;var s=W(r.to,o.to)||me(e)-me(t);return s?s:t.id-e.id}function fe(e,t){var n=os&&e.markedSpans,r;if(n)for(var o=void 0,s=0;s<n.length;++s)o=n[s],o.marker.collapsed&&null==(t?o.from:o.to)&&(!r||0>ge(r,o.marker))&&(r=o.marker);return r}function ye(e){return fe(e,!0)}function be(e){return fe(e,!1)}function xe(e,t){var n=os&&e.markedSpans,r;if(n)for(var o=0,i;o<n.length;++o)i=n[o],i.marker.collapsed&&(null==i.from||i.from<t)&&(null==i.to||i.to>t)&&(!r||0>ge(r,i.marker))&&(r=i.marker);return r}function ve(e,t,n,r,o){var s=R(e,t),l=os&&s.markedSpans;if(l)for(var d=0,i;d<l.length;++d)if(i=l[d],!!i.marker.collapsed){var p=i.marker.find(0),c=W(p.from,n)||he(i.marker)-he(o),u=W(p.to,r)||me(i.marker)-me(o);if(!(0<=c&&0>=u||0>=c&&0<=u)&&(0>=c&&(i.marker.inclusiveRight&&o.inclusiveLeft?0<=W(p.to,n):0<W(p.to,n))||0<=c&&(i.marker.inclusiveRight&&o.inclusiveLeft?0>=W(p.from,r):0>W(p.from,r))))return!0}}function ke(e){for(var t;t=ye(e);)e=t.find(-1,!0).line;return e}function Se(e){for(var t;t=be(e);)e=t.find(1,!0).line;return e}function we(e){for(var t,n;t=be(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Ce(e,t){var n=R(e,t),r=ke(n);return n==r?t:U(r)}function Te(e,t){if(t>e.lastLine())return t;var n=R(e,t),r;if(!_e(e,n))return t;for(;r=be(n);)n=r.find(1,!0).line;return U(n)+1}function _e(e,t){var n=os&&t.markedSpans;if(n)for(var r=void 0,o=0;o<n.length;++o)if(r=n[o],!!r.marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Ee(e,t,r))return!0}}function Ee(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Ee(e,r.line,ne(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var o=void 0,s=0;s<t.markedSpans.length;++s)if(o=t.markedSpans[s],o.marker.collapsed&&!o.marker.widgetNode&&o.from==n.to&&(null==o.to||o.to!=n.from)&&(o.marker.inclusiveLeft||n.marker.inclusiveRight)&&Ee(e,t,o))return!0}function Ae(e){e=ke(e);for(var t=0,n=e.parent,r=0,o;r<n.lines.length&&(o=n.lines[r],o!=e);++r)t+=o.height;for(var i=n.parent;i;n=i,i=n.parent)for(var s=0,l;s<i.children.length&&(l=i.children[s],l!=n);++s)t+=l.height;return t}function Ie(e){if(0==e.height)return 0;for(var t=e.text.length,n=e,r,o;r=ye(n);)o=r.find(0,!0),n=o.from.line,t+=o.from.ch-o.to.ch;for(n=e;r=be(n);){var i=r.find(0,!0);t-=n.text.length-i.from.ch,n=i.to.line,t+=n.text.length-i.to.ch}return t}function Ne(e){var t=e.display,n=e.doc;t.maxLine=R(n,n.first),t.maxLineLength=Ie(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=Ie(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function Le(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var o=!1,d=0,i;d<e.length;++d)i=e[d],(i.from<n&&i.to>t||t==n&&i.to==t)&&(r(l(i.from,t),s(i.to,n),1==i.level?"rtl":"ltr",d),o=!0);o||r(t,n,"ltr")}function Oe(e,t,n){var r;as=null;for(var o=0,i;o<e.length;++o){if(i=e[o],i.from<t&&i.to>t)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:as=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:as=o)}return null==r?as:r}function Me(e,t){var n=e.order;return null==n&&(n=e.order=is(e.text,t)),n}function De(e,t){return e._handlers&&e._handlers[t]||ss}function Re(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,o=r&&r[t];if(o){var i=x(o,n);-1<i&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function Pe(e,t){var n=De(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o<n.length;++o)n[o].apply(null,r)}function Be(t,n,r){return"string"==typeof n&&(n={type:n,preventDefault:function(){this.defaultPrevented=!0}}),Pe(t,r||n.type,t,n),Ve(n)||n.codemirrorIgnore}function Fe(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==x(n,t[r])&&n.push(t[r])}function Ue(e,t){return 0<De(e,t).length}function ze(e){e.prototype.on=function(e,t){ls(this,e,t)},e.prototype.off=function(e,t){Re(this,e,t)}}function je(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function qe(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ve(t){return null==t.defaultPrevented?!1==t.returnValue:t.defaultPrevented}function We(t){je(t),qe(t)}function He(t){return t.target||t.srcElement}function Ke(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),Ui&&t.ctrlKey&&1==e&&(e=3),e}function Ge(e){if(null==ys){var t=c("span","\u200B");p(e,c("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ys=1>=t.offsetWidth&&2<t.offsetHeight&&!(Ei&&8>Ai))}var n=ys?c("span","\u200B"):c("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Xe(e){if(null!=bs)return bs;var t=p(e,document.createTextNode("A\u062EA")),n=Ki(t,0,1).getBoundingClientRect(),r=Ki(t,1,2).getBoundingClientRect();return d(e),n&&n.left!=n.right&&(bs=3>r.right-n.right)}function Qe(e){if(null!=us)return us;var t=p(e,c("span","x")),r=t.getBoundingClientRect(),o=Ki(t,0,1).getBoundingClientRect();return us=1<n(r.left-o.left)}function Ye(e,t){2<arguments.length&&(t.dependencies=Array.prototype.slice.call(arguments,2)),hs[e]=t}function Je(e){if("string"==typeof e&&ms.hasOwnProperty(e))e=ms[e];else if(e&&"string"==typeof e.name&&ms.hasOwnProperty(e.name)){var t=ms[e.name];"string"==typeof t&&(t={name:t}),e=E(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Je("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Je("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function $e(e,t){t=Je(t);var n=hs[t.name];if(!n)return $e(e,"text/plain");var r=n(e,t);if(gs.hasOwnProperty(t.name)){var o=gs[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var s in t.modeProps)r[s]=t.modeProps[s];return r}function Ze(e,t){var n=gs.hasOwnProperty(e)?gs[e]:gs[e]={};b(t,n)}function et(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var o in t){var n=t[o];n instanceof Array&&(n=n.concat([])),r[o]=n}return r}function tt(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),n&&n.mode!=e);)t=n.state,e=n.mode;return n||{mode:e,state:t}}function nt(e,t,n){return!e.startState||e.startState(t,n)}function rt(e,t,n,r){var l=[e.state.modeGen],d={};ct(e,t.text,e.doc.mode,n,function(e,t){return l.push(e,t)},d,r);for(var p=n.state,i=function(r){n.baseTokens=l;var o=e.state.overlays[r],c=1,i=0;n.state=!0,ct(e,t.text,o.mode,n,function(e,t){for(var n=c,r;i<e;)r=l[c],r>e&&l.splice(c,1,e,l[c+1],r),c+=2,i=s(e,r);if(t)if(o.opaque)l.splice(n,c-n,e,"overlay "+t),c=n+2;else for(;n<c;n+=2){var d=l[n+1];l[n+1]=(d?d+" ":"")+"overlay "+t}},d),n.state=p,n.baseTokens=null,n.baseTokenPos=1},c=0;c<e.state.overlays.length;++c)i(c);return{styles:l,classes:d.bgClass||d.textClass?d:null}}function ot(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=at(e,U(t)),o=t.text.length>e.options.maxHighlightLength&&et(e.doc.mode,r.state),i=rt(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=l(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function at(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new vs(r,!0,t);var i=ut(e,t,n),s=i>r.first&&R(r,i-1).stateAfter,l=s?vs.fromSaved(r,s,i):new vs(r,nt(r.mode),i);return r.iter(i,t,function(n){it(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||0==r%5||r>=o.viewFrom&&r<o.viewTo?l.save():null,l.nextLine()}),n&&(r.modeFrontier=l.line),l}function it(e,t,n,r){var o=e.doc.mode,i=new fs(t,e.options.tabSize,n);for(i.start=i.pos=r||0,""==t&&st(o,n.state);!i.eol();)lt(o,i,n.state),i.start=i.pos}function st(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=tt(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function lt(e,t,n,r){for(var o=0;10>o;o++){r&&(r[0]=tt(e,n).mode);var i=e.token(t,n);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}function dt(e,t,n,r){var o=e.doc,i=o.mode,s;t=Y(o,t);var l=R(o,t.line),d=at(e,t.line,n),p=new fs(l.text,e.options.tabSize,d),c;for(r&&(c=[]);(r||p.pos<t.ch)&&!p.eol();)p.start=p.pos,s=lt(i,p,d.state),r&&c.push(new ks(p,s,et(o.mode,d.state)));return r?c:new ks(p,s,d.state)}function pt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:!new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])&&(t[r]+=" "+n[2])}return e}function ct(e,t,n,r,o,i,l){var d=n.flattenSpans;null==d&&(d=e.options.flattenSpans);var p=0,c=null,u=new fs(t,e.options.tabSize,r),h=e.options.addModeClass&&[null],m;for(""==t&&pt(st(n,r.state),i);!u.eol();){if(u.pos>e.options.maxHighlightLength?(d=!1,l&&it(e,t,r,u.pos),u.pos=t.length,m=null):m=pt(lt(n,u,r.state,h),i),h){var g=h[0].name;g&&(m="m-"+(m?g+" "+m:g))}if(!d||c!=m){for(;p<u.start;)p=s(u.start,p+5e3),o(p,c);c=m}u.start=u.pos}for(;p<u.pos;){var f=s(u.pos,p+5e3);o(f,c),p=f}}function ut(e,t,n){for(var r=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),i=t,s,l;i>o;--i){if(i<=r.first)return r.first;var d=R(r,i-1),p=d.stateAfter;if(p&&(!n||i+(p instanceof xs?p.lookAhead:0)<=r.modeFrontier))return i;var c=v(d.text,null,e.options.tabSize);(null==l||s>c)&&(l=i-1,s=c)}return l}function ht(e,t){if(e.modeFrontier=s(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1,o;r>n;r--)if(o=R(e,r).stateAfter,o&&(!(o instanceof xs)||r+o.lookAhead<t)){n=r+1;break}e.highlightFrontier=s(e.highlightFrontier,n)}}function mt(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),ce(e),ue(e,n);var o=r?r(e):1;o!=e.height&&F(e,o)}function gt(e){e.parent=null,ce(e)}function ft(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Cs:ws;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function yt(e,t){var n=u("span",null,null,Ii?"padding-right: .1px":null),r={pre:u("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(Ei||Ii)&&e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,s=void 0;r.pos=0,r.addToken=xt,Xe(e.display.measure)&&(s=Me(i,e.doc.direction))&&(r.addToken=kt(r.addToken,s)),r.map=[];var l=t!=e.display.externalMeasured&&U(i);wt(i,r,ot(e,i,l)),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=f(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=f(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ge(e.display.measure))),0==o?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Ii){var d=r.content.lastChild;(/\bcm-tab\b/.test(d.className)||d.querySelector&&d.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Pe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=f(r.pre.className,r.textClass||"")),r}function bt(e){var t=c("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function xt(e,t,n,r,o,i,s){if(t){var l=e.splitSpaces?vt(t,e.trailingSpace):t,d=e.cm.state.specialChars,p=!1,u;if(!d.test(t))e.col+=t.length,u=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,u),Ei&&9>Ai&&(p=!0),e.pos+=t.length;else{u=document.createDocumentFragment();for(var h=0;;){d.lastIndex=h;var g=d.exec(t),f=g?g.index-h:t.length-h;if(f){var y=document.createTextNode(l.slice(h,h+f));Ei&&9>Ai?u.appendChild(c("span",[y])):u.appendChild(y),e.map.push(e.pos,e.pos+f,y),e.col+=f,e.pos+=f}if(!g)break;h+=f+1;var b=void 0;if("\t"==g[0]){var x=e.cm.options.tabSize,v=x-e.col%x;b=u.appendChild(c("span",S(v),"cm-tab")),b.setAttribute("role","presentation"),b.setAttribute("cm-text","\t"),e.col+=v}else"\r"==g[0]||"\n"==g[0]?(b=u.appendChild(c("span","\r"==g[0]?"\u240D":"\u2424","cm-invalidchar")),b.setAttribute("cm-text",g[0]),e.col+=1):(b=e.cm.options.specialCharPlaceholder(g[0]),b.setAttribute("cm-text",g[0]),Ei&&9>Ai?u.appendChild(c("span",[b])):u.appendChild(b),e.col+=1);e.map.push(e.pos,e.pos+1,b),e.pos++}}if(e.trailingSpace=32==l.charCodeAt(t.length-1),n||r||o||p||s){var k=n||"";r&&(k+=r),o&&(k+=o);var w=c("span",[u],k,s);return i&&(w.title=i),e.content.appendChild(w)}e.content.appendChild(u)}}function vt(e,t){if(1<e.length&&!/ /.test(e))return e;for(var n=t,r="",o=0,i;o<e.length;o++)i=e.charAt(o)," "==i&&n&&(o==e.length-1||32==e.charCodeAt(o+1))&&(i="\xA0"),r+=i,n=" "==i;return r}function kt(e,t){return function(n,r,o,s,l,d,p){o=o?o+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var h=void 0,m=0;m<t.length&&(h=t[m],!(h.to>c&&h.from<=c));m++);if(h.to>=u)return e(n,r,o,s,l,d,p);e(n,r.slice(0,h.to-c),o,s,null,d,p),s=null,r=r.slice(h.to-c),c=h.to}}}function St(e,t,n,r){var o=!r&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!r&&e.cm.display.input.needsContentAttribute&&(!o&&(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function wt(e,t,n){var r=e.markedSpans,o=e.text,l=0;if(!r){for(var d=1;d<n.length;d+=2)t.addToken(t,o.slice(l,l=n[d]),ft(n[d+1],t.cm.options));return}for(var p=o.length,c=0,u=1,i="",h=0,g,f,y,b,x,v,k;;){if(h==c){y=b=x=v=f="",k=null,h=Infinity;for(var S=[],w=void 0,C=0;C<r.length;++C){var T=r[C],_=T.marker;"bookmark"==_.type&&T.from==c&&_.widgetNode?S.push(_):T.from<=c&&(null==T.to||T.to>c||_.collapsed&&T.to==c&&T.from==c)?(null!=T.to&&T.to!=c&&h>T.to&&(h=T.to,b=""),_.className&&(y+=" "+_.className),_.css&&(f=(f?f+";":"")+_.css),_.startStyle&&T.from==c&&(x+=" "+_.startStyle),_.endStyle&&T.to==h&&(w||(w=[])).push(_.endStyle,T.to),_.title&&!v&&(v=_.title),_.collapsed&&(!k||0>ge(k.marker,_))&&(k=T)):T.from>c&&h>T.from&&(h=T.from)}if(w)for(var m=0;m<w.length;m+=2)w[m+1]==h&&(b+=" "+w[m]);if(!k||k.from==c)for(var E=0;E<S.length;++E)St(t,0,S[E]);if(k&&(k.from||0)==c){if(St(t,(null==k.to?p+1:k.to)-c,k.marker,null==k.from),null==k.to)return;k.to==c&&(k=!1)}}if(c>=p)break;for(var A=s(p,h);;){if(i){var I=c+i.length;if(!k){var N=I>A?i.slice(0,A-c):i;t.addToken(t,N,g?g+y:y,x,c+N.length==h?b:"",v,f)}if(I>=A){i=i.slice(A-c),c=A;break}c=I,x=""}i=o.slice(l,l=n[u++]),g=ft(n[u++],t.cm.options)}}}function Ct(e,t,n){this.line=t,this.rest=we(t),this.size=this.rest?U(w(this.rest))-n+1:1,this.node=this.text=null,this.hidden=_e(e,t)}function Tt(e,t,n){for(var r=[],o=t,i,s;o<n;o=i)s=new Ct(e.doc,R(e.doc,o),o),i=o+s.size,r.push(s);return r}function _t(e){Ts?Ts.ops.push(e):e.ownsGroup=Ts={ops:[e],delayedCallbacks:[]}}function Et(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0,o;r<e.ops.length;r++)if(o=e.ops[r],o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}while(n<t.length)}function At(e,t){var n=e.ownsGroup;if(n)try{Et(n)}finally{Ts=null,t(n)}}function It(e,t){var n=De(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),o;Ts?o=Ts.delayedCallbacks:_s?o=_s:(o=_s=[],setTimeout(Nt,0));for(var s=function(e){o.push(function(){return n[e].apply(null,r)})},l=0;l<n.length;++l)s(l)}}function Nt(){var e=_s;_s=null;for(var t=0;t<e.length;++t)e[t]()}function Lt(e,t,n,r){for(var o=0,i;o<t.changes.length;o++)i=t.changes[o],"text"==i?Rt(e,t):"gutter"==i?Bt(e,t,n,r):"class"==i?Pt(e,t):"widget"==i&&Ft(e,t,r);t.changes=null}function Ot(e){return e.node==e.text&&(e.node=c("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),Ei&&8>Ai&&(e.node.style.zIndex=2)),e.node}function Mt(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=Ot(t);t.background=r.insertBefore(c("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Dt(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):yt(e,t)}function Rt(e,t){var n=t.text.className,r=Dt(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Pt(e,t)):n&&(t.text.className=n)}function Pt(e,t){Mt(e,t),t.line.wrapClass?Ot(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Bt(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Ot(t);t.gutterBackground=c("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var s=Ot(t),l=t.gutter=c("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),s.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(c("div",q(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var d=0;d<e.options.gutters.length;++d){var p=e.options.gutters[d],u=i.hasOwnProperty(p)&&i[p];u&&l.appendChild(c("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[p]+"px; width: "+r.gutterWidth[p]+"px"))}}}function Ft(e,t,n){t.alignable&&(t.alignable=null);for(var r=t.node.firstChild,o=void 0;r;r=o)o=r.nextSibling,"CodeMirror-linewidget"==r.className&&t.node.removeChild(r);zt(e,t,n)}function Ut(e,t,n,r){var o=Dt(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),Pt(e,t),Bt(e,t,n,r),zt(e,t,r),t.node}function zt(e,t,n){if(jt(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)jt(e,t.rest[r],t,n,!1)}function jt(e,t,n,r,o){if(t.widgets)for(var s=Ot(n),l=0,i=t.widgets;l<i.length;++l){var d=i[l],p=c("div",[d.node],"CodeMirror-linewidget");d.handleMouseEvents||p.setAttribute("cm-ignore-events","true"),qt(d,p,n,r),e.display.input.setUneditable(p),o&&d.above?s.insertBefore(p,n.gutter||n.text):s.appendChild(p),It(d,"redraw")}}function qt(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var o=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(o-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",!e.noHScroll&&(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Vt(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!h(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),p(t.display.measure,c("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Wt(t,r){for(var e=He(r);e!=t.wrapper;e=e.parentNode)if(!e||1==e.nodeType&&"true"==e.getAttribute("cm-ignore-events")||e.parentNode==t.sizer&&e!=t.mover)return!0}function Ht(e){return e.lineSpace.offsetTop}function Kt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Gt(t){if(t.cachedPaddingH)return t.cachedPaddingH;var n=p(t.measure,c("pre","x")),e=window.getComputedStyle?window.getComputedStyle(n):n.currentStyle,r={left:parseInt(e.paddingLeft),right:parseInt(e.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(t.cachedPaddingH=r),r}function Xt(e){return Qi-e.display.nativeBarWidth}function Qt(e){return e.display.scroller.clientWidth-Xt(e)-e.display.barWidth}function Yt(e){return e.display.scroller.clientHeight-Xt(e)-e.display.barHeight}function Jt(e,t,r){var o=e.options.lineWrapping,s=o&&Qt(e);if(!t.measure.heights||o&&t.measure.width!=s){var l=t.measure.heights=[];if(o){t.measure.width=s;for(var d=t.text.firstChild.getClientRects(),p=0;p<d.length-1;p++){var i=d[p],c=d[p+1];2<n(i.bottom-c.bottom)&&l.push((i.bottom+c.top)/2-r.top)}}l.push(r.bottom-r.top)}}function $t(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var o=0;o<e.rest.length;o++)if(U(e.rest[o])>n)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function Zt(e,t){t=ke(t);var n=U(t),r=e.display.externalMeasured=new Ct(e.doc,t,n);r.lineN=n;var o=r.built=yt(e,r);return r.text=o.pre,p(e.display.lineMeasure,o.pre),r}function en(e,t,n,r){return rn(e,nn(e,t),n,r)}function tn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Pn(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function nn(e,t){var n=U(t),r=tn(e,n);r&&!r.text?r=null:r&&r.changes&&(Lt(e,r,n,Ln(e)),e.curOp.forceUpdate=!0),r||(r=Zt(e,t));var o=$t(r,t,n);return{line:t,view:r,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function rn(e,t,n,r,o){t.before&&(n=-1);var i=n+(r||""),s;return t.cache.hasOwnProperty(i)?s=t.cache[i]:(!t.rect&&(t.rect=t.view.text.getBoundingClientRect()),!t.hasHeights&&(Jt(e,t.view,t.rect),t.hasHeights=!0),s=ln(e,t,n,r),!s.bogus&&(t.cache[i]=s)),{left:s.left,right:s.right,top:o?s.rtop:s.top,bottom:o?s.rbottom:s.bottom}}function an(e,t,n){for(var r=0,o,i,s,l,d,p;r<e.length;r+=3)if(d=e[r],p=e[r+1],t<d?(i=0,s=1,l="left"):t<p?(i=t-d,s=i+1):(r==e.length-3||t==p&&e[r+3]>t)&&(s=p-d,i=s-1,t>=p&&(l="right")),null!=i){if(o=e[r+2],d==p&&n==(o.insertLeft?"left":"right")&&(l=n),"left"==n&&0==i)for(;r&&e[r-2]==e[r-3]&&e[r-1].insertLeft;)o=e[(r-=3)+2],l="left";if("right"==n&&i==p-d)for(;r<e.length-3&&e[r+3]==e[r+4]&&!e[r+5].insertLeft;)o=e[(r+=3)+2],l="right";break}return{node:o,start:i,end:s,collapse:l,coverStart:d,coverEnd:p}}function sn(e,t){var n=Es;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var o=e.length-1;0<=o&&(n=e[o]).left==n.right;o--);return n}function ln(e,t,n,r){var o=an(t.map,n,r),s=o.node,l=o.start,d=o.end,p=o.collapse,c;if(3==s.nodeType){for(var u=0;4>u;u++){for(;l&&L(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+d<o.coverEnd&&L(t.line.text.charAt(o.coverStart+d));)++d;if(c=Ei&&9>Ai&&0==l&&d==o.coverEnd-o.coverStart?s.parentNode.getBoundingClientRect():sn(Ki(s,l,d).getClientRects(),r),c.left||c.right||0==l)break;d=l,--l,p="right"}Ei&&11>Ai&&(c=dn(e.display.measure,c))}else{0<l&&(p=r="right");var h;c=e.options.lineWrapping&&1<(h=s.getClientRects()).length?h["right"==r?h.length-1:0]:s.getBoundingClientRect()}if(Ei&&9>Ai&&!l&&(!c||!c.left&&!c.right)){var m=s.parentNode.getClientRects()[0];c=m?{left:m.left,right:m.left+Nn(e.display),top:m.top,bottom:m.bottom}:Es}for(var g=c.top-t.rect.top,f=c.bottom-t.rect.top,y=t.view.measure.heights,b=0;b<y.length-1&&!((g+f)/2<y[b]);b++);var i=b?y[b-1]:0,x=y[b],v={left:("right"==p?c.right:c.left)-t.rect.left,right:("left"==p?c.left:c.right)-t.rect.left,top:i,bottom:x};return c.left||c.right||(v.bogus=!0),e.options.singleCursorHeightPerLine||(v.rtop=g,v.rbottom=f),v}function dn(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Qe(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function pn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function cn(e){e.display.externalMeasure=null,d(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)pn(e.display.view[t])}function un(e){cn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function hn(){return Li&&Bi?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function mn(){return Li&&Bi?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function gn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=Vt(e.widgets[n]));return t}function fn(e,t,n,r,o){if(!o){var i=gn(t);n.top+=i,n.bottom+=i}if("line"==r)return n;r||(r="local");var s=Ae(t);if("local"==r?s+=Ht(e.display):s-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();s+=l.top+("window"==r?0:mn());var d=l.left+("window"==r?0:hn());n.left+=d,n.right+=d}return n.top+=s,n.bottom+=s,n}function yn(e,t,n){if("div"==n)return t;var r=t.left,o=t.top;if("page"==n)r-=hn(),o-=mn();else if("local"==n||!n){var i=e.display.sizer.getBoundingClientRect();r+=i.left,o+=i.top}var s=e.display.lineSpace.getBoundingClientRect();return{left:r-s.left,top:o-s.top}}function bn(e,t,n,r,o){return r||(r=R(e.doc,t.line)),fn(e,r,en(e,r,t.ch,o),n)}function xn(e,t,n,r,o,i){function s(t,s){var l=rn(e,o,t,s?"right":"left",i);return s?l.left=l.right:l.right=l.left,fn(e,r,l,n)}function l(e,t,n){var r=d[t],o=1==r.level;return s(n?e-1:e,o!=n)}r=r||R(e.doc,t.line),o||(o=nn(e,r));var d=Me(r,e.doc.direction),p=t.ch,c=t.sticky;if(p>=r.text.length?(p=r.text.length,c="before"):0>=p&&(p=0,c="after"),!d)return s("before"==c?p-1:p,"before"==c);var u=Oe(d,p,c),h=as,m=l(p,u,"before"==c);return null!=h&&(m.other=l(p,h,"before"!=c)),m}function vn(e,t){var n=0;t=Y(e.doc,t),e.options.lineWrapping||(n=Nn(e.display)*t.ch);var r=R(e.doc,t.line),o=Ae(r)+Ht(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function kn(e,t,n,r,o){var i=V(e,t,n);return i.xRel=o,r&&(i.outside=!0),i}function Sn(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return kn(r.first,0,null,!0,-1);var o=z(r,n),i=r.first+r.size-1;if(o>i)return kn(r.first+r.size-1,R(r,i).text.length,null,!0,1);0>t&&(t=0);for(var s=R(r,o);;){var l=_n(e,s,o,t,n),d=xe(s,l.ch+(0<l.xRel?1:0));if(!d)return l;var p=d.find(1);if(p.line==o)return p;s=R(r,o=p.line)}}function wn(e,t,n,r){r-=gn(t);var o=t.text.length,i=M(function(t){return rn(e,n,t-1).bottom<=r},o,0);return o=M(function(t){return rn(e,n,t).top>r},i,o),{begin:i,end:o}}function Cn(e,t,n,r){n||(n=nn(e,t));var o=fn(e,t,rn(e,n,r),"line").top;return wn(e,t,n,o)}function Tn(e,t,n,r){return!(e.bottom<=n)&&(!!(e.top>n)||(r?e.left:e.right)>t)}function _n(e,t,n,r,o){o-=Ae(t);var i=nn(e,t),s=gn(t),l=0,d=t.text.length,p=!0,c=Me(t,e.doc.direction);if(c){var u=(e.options.lineWrapping?An:En)(e,t,n,i,c,r,o);p=1!=u.level,l=p?u.from:u.to-1,d=p?u.to:u.from-1}var h=null,m=null,g=M(function(t){var n=rn(e,i,t);return(n.top+=s,n.bottom+=s,!!Tn(n,r,o,!1))&&(n.top<=o&&n.left<=r&&(h=t,m=n),!0)},l,d),f=!1,y,b;if(m){var x=r-m.left<m.right-r,v=x==p;g=h+(v?0:1),b=v?"after":"before",y=x?m.left:m.right}else{p||g!=d&&g!=l||g++,b=0==g?"after":g==t.text.length?"before":rn(e,i,g-(p?1:0)).bottom+s<=o==p?"after":"before";var k=xn(e,V(n,g,b),"line",t,i);y=k.left,f=o<k.top||o>=k.bottom}return g=O(t.text,g,1),kn(n,g,b,f,r-y)}function En(e,t,n,r,o,s,l){var i=M(function(d){var i=o[d],p=1!=i.level;return Tn(xn(e,V(n,p?i.to:i.from,p?"before":"after"),"line",t,r),s,l,!0)},0,o.length-1),d=o[i];if(0<i){var p=1!=d.level,c=xn(e,V(n,p?d.from:d.to,p?"after":"before"),"line",t,r);Tn(c,s,l,!0)&&c.top>l&&(d=o[i-1])}return d}function An(e,t,n,r,o,d,c){var u=wn(e,t,r,c),h=u.begin,m=u.end;/\s/.test(t.text.charAt(m-1))&&m--;for(var g=null,f=null,y=0,i;y<o.length;y++)if(i=o[y],!(i.from>=m||i.to<=h)){var p=1!=i.level,b=rn(e,r,p?s(m,i.to)-1:l(h,i.from)).right,x=b<d?d-b+1e9:b-d;(!g||f>x)&&(g=i,f=x)}return g||(g=o[o.length-1]),g.from<h&&(g={from:h,to:g.to,level:g.level}),g.to>m&&(g={from:g.from,to:m,level:g.level}),g}function In(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Is){Is=c("pre");for(var t=0;49>t;++t)Is.appendChild(document.createTextNode("x")),Is.appendChild(c("br"));Is.appendChild(document.createTextNode("x"))}p(e.measure,Is);var n=Is.offsetHeight/50;return 3<n&&(e.cachedTextHeight=n),d(e.measure),n||1}function Nn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=c("span","xxxxxxxxxx"),n=c("pre",[t]);p(e.measure,n);var r=t.getBoundingClientRect(),o=(r.right-r.left)/10;return 2<o&&(e.cachedCharWidth=o),o||10}function Ln(e){for(var t=e.display,r={},o={},s=t.gutters.clientLeft,l=t.gutters.firstChild,n=0;l;l=l.nextSibling,++n)r[e.options.gutters[n]]=l.offsetLeft+l.clientLeft+s,o[e.options.gutters[n]]=l.clientWidth;return{fixedPos:On(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:o,wrapperWidth:t.wrapper.clientWidth}}function On(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Mn(e){var n=In(e.display),r=e.options.lineWrapping,o=r&&l(5,e.display.scroller.clientWidth/Nn(e.display)-3);return function(s){if(_e(e.doc,s))return 0;var l=0;if(s.widgets)for(var d=0;d<s.widgets.length;d++)s.widgets[d].height&&(l+=s.widgets[d].height);return r?l+(t(s.text.length/o)||1)*n:l+n}}function Dn(e){var t=e.doc,n=Mn(e);t.iter(function(e){var t=n(e);t!=e.height&&F(e,t)})}function Rn(t,n,e,o){var i=t.display;if(!e&&"true"==He(n).getAttribute("cm-not-content"))return null;var s=i.lineSpace.getBoundingClientRect(),d,p;try{d=n.clientX-s.left,p=n.clientY-s.top}catch(t){return null}var c=Sn(t,d,p),u;if(o&&1==c.xRel&&(u=R(t.doc,c.line).text).length==c.ch){var h=v(u,u.length,t.options.tabSize)-u.length;c=V(c.line,l(0,r((d-Gt(t.display).left)/Nn(t.display))-h))}return c}function Pn(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,0>t)return r}function Bn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Fn(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},o=r.cursors=document.createDocumentFragment(),s=r.selection=document.createDocumentFragment(),l=0;l<n.sel.ranges.length;l++)if(t||l!=n.sel.primIndex){var i=n.sel.ranges[l];if(!(i.from().line>=e.display.viewTo||i.to().line<e.display.viewFrom)){var d=i.empty();(d||e.options.showCursorWhenSelecting)&&Un(e,i.head,o),d||jn(e,i,s)}}return r}function Un(e,t,n){var r=xn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=n.appendChild(c("div","\xA0","CodeMirror-cursor"));if(o.style.left=r.left+"px",o.style.top=r.top+"px",o.style.height=l(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var i=n.appendChild(c("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));i.style.display="",i.style.left=r.other.left+"px",i.style.top=r.other.top+"px",i.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function zn(e,t){return e.top-t.top||e.left-t.left}function jn(e,t,n){function o(e,t,n,o){0>t&&(t=0),t=r(t),o=r(o),p.appendChild(c("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?m-e:n)+"px;\n height: "+(o-t)+"px"))}function i(t,n,r){function s(n,r){return bn(e,V(t,n),"div",l,r)}function i(t,n,r){var o=Cn(e,l,null,t),i="ltr"==n==("after"==r)?"left":"right",d="after"==r?o.begin:o.end-(/\s/.test(l.text.charAt(o.end-1))?2:1);return s(d,i)[i]}var l=R(d,t),p=l.text.length,c=Me(l,d.direction),u,f;return Le(c,n||0,null==r?p:r,function(e,t,l,d){var y="ltr"==l,b=s(e,y?"left":"right"),x=s(t-1,y?"right":"left"),v=null==n&&0==e,k=null==r&&t==p,S=0==d,w=!c||d==c.length-1;if(3>=x.top-b.top){var C=(g?v:k)&&S,T=(g?k:v)&&w,_=C?h:(y?b:x).left,E=T?m:(y?x:b).right;o(_,b.top,E-_,b.bottom)}else{var A,I,N,L;y?(A=g&&v&&S?h:b.left,I=g?m:i(e,l,"before"),N=g?h:i(t,l,"after"),L=g&&k&&w?m:x.right):(A=g?i(e,l,"before"):h,I=!g&&v&&S?m:b.right,N=!g&&k&&w?h:x.left,L=g?i(t,l,"after"):m),o(A,b.top,I-A,b.bottom),b.bottom<x.top&&o(h,b.bottom,null,x.top),o(N,x.top,L-N,x.bottom)}(!u||0>zn(b,u))&&(u=b),0>zn(x,u)&&(u=x),(!f||0>zn(b,f))&&(f=b),0>zn(x,f)&&(f=x)}),{start:u,end:f}}var s=e.display,d=e.doc,p=document.createDocumentFragment(),u=Gt(e.display),h=u.left,m=l(s.sizerWidth,Qt(e)-s.sizer.offsetLeft)-u.right,g="ltr"==d.direction,f=t.from(),y=t.to();if(f.line==y.line)i(f.line,f.ch,y.ch);else{var b=R(d,f.line),x=R(d,y.line),v=ke(b)==ke(x),k=i(f.line,f.ch,v?b.text.length+1:null).end,S=i(y.line,v?0:null,y.ch).start;v&&(k.top<S.top-2?(o(k.right,k.top,null,k.bottom),o(h,S.top,S.left,S.bottom)):o(k.right,k.top,S.left-k.right,k.bottom)),k.bottom<S.top&&o(h,k.bottom,null,S.top)}n.appendChild(p)}function qn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",0<e.options.cursorBlinkRate?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):0>e.options.cursorBlinkRate&&(t.cursorDiv.style.visibility="hidden")}}function Vn(e){e.state.focused||(e.display.input.focus(),Hn(e))}function Wn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Kn(e))},100)}function Hn(t,n){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"==t.options.readOnly||(!t.state.focused&&(Pe(t,"focus",t,n),t.state.focused=!0,g(t.display.wrapper,"CodeMirror-focused"),!t.curOp&&t.display.selForContextMenu!=t.doc.sel&&(t.display.input.reset(),Ii&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),qn(t))}function Kn(t,n){t.state.delayingBlurEvent||(t.state.focused&&(Pe(t,"blur",t,n),t.state.focused=!1,Hi(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function Gn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var o=t.view[r],i=void 0;if(!o.hidden){if(Ei&&8>Ai){var s=o.node.offsetTop+o.node.offsetHeight;i=s-n,n=s}else{var l=o.node.getBoundingClientRect();i=l.bottom-l.top}var d=o.line.height-i;if(2>i&&(i=In(t)),(.005<d||-.005>d)&&(F(o.line,i),Xn(o.line),o.rest))for(var p=0;p<o.rest.length;p++)Xn(o.rest[p])}}}function Xn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Qn(e,t,n){var r=n&&null!=n.top?l(0,n.top):e.scroller.scrollTop;r=o(r-Ht(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,d=z(t,r),p=z(t,i);if(n&&n.ensure){var c=n.ensure.from.line,u=n.ensure.to.line;c<d?(d=c,p=z(t,Ae(R(t,c))+e.wrapper.clientHeight)):s(u,t.lastLine())>=p&&(d=z(t,Ae(R(t,u))-e.wrapper.clientHeight),p=u)}return{from:d,to:l(p,d+1)}}function Yn(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=On(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,s=r+"px",l=0;l<n.length;l++)if(!n[l].hidden){e.options.fixedGutter&&(n[l].gutter&&(n[l].gutter.style.left=s),n[l].gutterBackground&&(n[l].gutterBackground.style.left=s));var i=n[l].alignable;if(i)for(var d=0;d<i.length;d++)i[d].style.left=s}e.options.fixedGutter&&(t.gutters.style.left=r+o+"px")}}function Jn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=q(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var o=r.measure.appendChild(c("div",[c("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=o.firstChild.offsetWidth,s=o.offsetWidth-i;return r.lineGutter.style.width="",r.lineNumInnerWidth=l(i,r.lineGutter.offsetWidth-s)+1,r.lineNumWidth=r.lineNumInnerWidth+s,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",qr(e),!0}return!1}function $n(e,t){if(!Be(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),o=null;if(0>t.top+r.top?o=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Ri){var i=c("div","\u200B",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Ht(e.display))+"px;\n height: "+(t.bottom-t.top+Xt(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+l(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}function Zn(e,t,r,o){null==o&&(o=0);var i;e.options.lineWrapping||t!=r||(t=t.ch?V(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,r="before"==t.sticky?V(t.line,t.ch+1,"before"):t);for(var d=0;5>d;d++){var p=!1,c=xn(e,t),u=r&&r!=t?xn(e,r):c;i={left:s(c.left,u.left),top:s(c.top,u.top)-o,right:l(c.left,u.left),bottom:l(c.bottom,u.bottom)+o};var h=tr(e,i),m=e.doc.scrollTop,g=e.doc.scrollLeft;if(null!=h.scrollTop&&(lr(e,h.scrollTop),1<n(e.doc.scrollTop-m)&&(p=!0)),null!=h.scrollLeft&&(pr(e,h.scrollLeft),1<n(e.doc.scrollLeft-g)&&(p=!0)),!p)break}return i}function er(e,t){var n=tr(e,t);null!=n.scrollTop&&lr(e,n.scrollTop),null!=n.scrollLeft&&pr(e,n.scrollLeft)}function tr(e,t){var n=e.display,r=In(e.display);0>t.top&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=Yt(e),d={};t.bottom-t.top>i&&(t.bottom=t.top+i);var p=e.doc.height+Kt(n),c=t.top<r,u=t.bottom>p-r;if(t.top<o)d.scrollTop=c?0:t.top;else if(t.bottom>o+i){var h=s(t.top,(u?p:t.bottom)-i);h!=o&&(d.scrollTop=h)}var m=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,g=Qt(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),f=t.right-t.left>g;return f&&(t.right=t.left+g),10>t.left?d.scrollLeft=0:t.left<m?d.scrollLeft=l(0,t.left-(f?0:10)):t.right>g+m-3&&(d.scrollLeft=t.right+(f?0:10)-g),d}function nr(e,t){null==t||(ir(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function rr(e){ir(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function or(e,t,n){(null!=t||null!=n)&&ir(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function ar(e,t){ir(e),e.curOp.scrollToPos=t}function ir(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=vn(e,t.from),r=vn(e,t.to);sr(e,n,r,t.margin)}}function sr(e,t,n,r){var o=tr(e,{left:s(t.left,n.left),top:s(t.top,n.top)-r,right:l(t.right,n.right),bottom:l(t.bottom,n.bottom)+r});or(e,o.scrollLeft,o.scrollTop)}function lr(e,t){2>n(e.doc.scrollTop-t)||(!wi&&zr(e,{top:t}),dr(e,t,!0),wi&&zr(e),Mr(e,100))}function dr(e,t,n){t=s(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function pr(e,t,r,o){t=s(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:2>n(e.doc.scrollLeft-t))&&!o||(e.doc.scrollLeft=t,Yn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function cr(e){var t=e.display,n=t.gutters.offsetWidth,o=r(e.doc.height+Kt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:o,scrollHeight:o+Xt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function ur(e,t){t||(t=cr(e));var n=e.display.barWidth,r=e.display.barHeight;hr(e,t);for(var o=0;4>o&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Gn(e),hr(e,cr(e)),n=e.display.barWidth,r=e.display.barHeight}function hr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function mr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Hi(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ls[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ls(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?pr(e,t):lr(e,t)},e),e.display.scrollbars.addClass&&g(e.display.wrapper,e.display.scrollbars.addClass)}function gr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++Os},_t(e.curOp)}function fr(e){var t=e.curOp;At(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;yr(e)})}function yr(e){for(var t=e.ops,n=0;n<t.length;n++)br(t[n]);for(var r=0;r<t.length;r++)xr(t[r]);for(var o=0;o<t.length;o++)vr(t[o]);for(var i=0;i<t.length;i++)kr(t[i]);for(var s=0;s<t.length;s++)Sr(t[s])}function br(e){var t=e.cm,n=t.display;Rr(t),e.updateMaxLine&&Ne(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ms(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function xr(e){e.updatedDisplay=e.mustUpdate&&Fr(e.cm,e.update)}function vr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Gn(t),e.barMeasure=cr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=en(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=l(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Xt(t)+t.display.barWidth),e.maxScrollLeft=l(0,n.sizer.offsetLeft+e.adjustWidthTo-Qt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function kr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&pr(t,s(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==m();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&ur(t,e.barMeasure),e.updatedDisplay&&Vr(t,e.barMeasure),e.selectionChanged&&qn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Vn(e.cm)}function Sr(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&Ur(t,e.update),null!=n.wheelStartX&&(null!=e.scrollTop||null!=e.scrollLeft||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&dr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&pr(t,e.scrollLeft,!0,!0),e.scrollToPos){var o=Zn(t,Y(r,e.scrollToPos.from),Y(r,e.scrollToPos.to),e.scrollToPos.margin);$n(t,o)}var s=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(s)for(var d=0;d<s.length;++d)s[d].lines.length||Pe(s[d],"hide");if(l)for(var i=0;i<l.length;++i)l[i].lines.length&&Pe(l[i],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Pe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function wr(e,t){if(e.curOp)return t();gr(e);try{return t()}finally{fr(e)}}function Cr(e,t){return function(){if(e.curOp)return t.apply(e,arguments);gr(e);try{return t.apply(e,arguments)}finally{fr(e)}}}function Tr(e){return function(){if(this.curOp)return e.apply(this,arguments);gr(this);try{return e.apply(this,arguments)}finally{fr(this)}}}function _r(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);gr(t);try{return e.apply(this,arguments)}finally{fr(t)}}}function Er(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var o=e.display;if(r&&n<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)os&&Ce(e.doc,t)<o.viewTo&&Ir(e);else if(n<=o.viewFrom)os&&Te(e.doc,n+r)>o.viewFrom?Ir(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)Ir(e);else if(t<=o.viewFrom){var i=Nr(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):Ir(e)}else if(n>=o.viewTo){var s=Nr(e,t,t,-1);s?(o.view=o.view.slice(0,s.index),o.viewTo=s.lineN):Ir(e)}else{var l=Nr(e,t,t,-1),d=Nr(e,n,n+r,1);l&&d?(o.view=o.view.slice(0,l.index).concat(Tt(e,l.lineN,d.lineN)).concat(o.view.slice(d.index)),o.viewTo+=r):Ir(e)}var p=o.externalMeasured;p&&(n<p.lineN?p.lineN+=r:t<p.lineN+p.size&&(o.externalMeasured=null))}function Ar(e,t,n){e.curOp.viewChanged=!0;var r=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var i=r.view[Pn(e,t)];if(null!=i.node){var s=i.changes||(i.changes=[]);-1==x(s,n)&&s.push(n)}}}function Ir(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Nr(e,t,r,o){var s=Pn(e,t),l=e.display.view,d;if(!os||r==e.doc.first+e.doc.size)return{index:s,lineN:r};for(var p=e.display.viewFrom,n=0;n<s;n++)p+=l[n].size;if(p!=t){if(0<o){if(s==l.length-1)return null;d=p+l[s].size-t,s++}else d=p-t;t+=d,r+=d}for(;Ce(e.doc,r)!=r;){if(s==(0>o?0:l.length-1))return null;r+=o*l[s-(0>o?1:0)].size,s+=o}return{index:s,lineN:r}}function Lr(e,t,n){var r=e.display,o=r.view;0==o.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Tt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Tt(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Pn(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Tt(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Pn(e,n)))),r.viewTo=n}function Or(e){for(var t=e.display.view,n=0,r=0,o;r<t.length;r++)o=t[r],o.hidden||o.node&&!o.changes||++n;return n}function Mr(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,y(Dr,e))}function Dr(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=at(e,t.highlightFrontier),o=[];t.iter(r.line,s(t.first+t.size,e.display.viewTo+500),function(s){if(r.line>=e.display.viewFrom){var l=s.styles,d=s.text.length>e.options.maxHighlightLength?et(t.mode,r.state):null,p=rt(e,s,r,!0);d&&(r.state=d),s.styles=p.styles;var c=s.styleClasses,u=p.classes;u?s.styleClasses=u:c&&(s.styleClasses=null);for(var h=!l||l.length!=s.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),m=0;!h&&m<l.length;++m)h=l[m]!=s.styles[m];h&&o.push(r.line),s.stateAfter=r.save(),r.nextLine()}else s.text.length<=e.options.maxHighlightLength&&it(e,s.text,r),s.stateAfter=0==r.line%5?r.save():null,r.nextLine();return+new Date>n?(Mr(e,e.options.workDelay),!0):void 0}),t.highlightFrontier=r.line,t.modeFrontier=l(t.modeFrontier,r.line),o.length&&wr(e,function(){for(var t=0;t<o.length;t++)Ar(e,o[t],"text")})}}function Rr(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Xt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Xt(e)+"px",t.scrollbarsClipped=!0)}function Pr(e){if(e.hasFocus())return null;var t=m();if(!t||!h(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&h(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Br(e){if(e&&e.activeElt&&e.activeElt!=m()&&(e.activeElt.focus(),e.anchorNode&&h(document.body,e.anchorNode)&&h(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function Fr(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Ir(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Or(e))return!1;Jn(e)&&(Ir(e),t.dims=Ln(e));var o=r.first+r.size,i=l(t.visible.from-e.options.viewportMargin,r.first),p=s(o,t.visible.to+e.options.viewportMargin);n.viewFrom<i&&20>i-n.viewFrom&&(i=l(r.first,n.viewFrom)),n.viewTo>p&&20>n.viewTo-p&&(p=s(o,n.viewTo)),os&&(i=Ce(e.doc,i),p=Te(e.doc,p));var c=i!=n.viewFrom||p!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Lr(e,i,p),n.viewOffset=Ae(R(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Or(e);if(!c&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var h=Pr(e);return 4<u&&(n.lineDiv.style.display="none"),jr(e,n.updateLineNumbers,t.dims),4<u&&(n.lineDiv.style.display=""),n.renderedView=n.view,Br(h),d(n.cursorDiv),d(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,c&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Mr(e,400)),n.updateLineNumbers=null,!0}function Ur(e,t){for(var n=t.viewport,r=!0;;r=!1){if((!r||!e.options.lineWrapping||t.oldDisplayWidth==Qt(e))&&(n&&null!=n.top&&(n={top:s(e.doc.height+Kt(e.display)-Yt(e),n.top)}),t.visible=Qn(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo))break;if(!Fr(e,t))break;Gn(e);var o=cr(e);Bn(e),ur(e,o),Vr(e,o),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function zr(e,t){var n=new Ms(e,t);if(Fr(e,n)){Gn(e),Ur(e,n);var r=cr(e);Bn(e),ur(e,r),Vr(e,r),n.finish()}}function jr(e,t,n){function r(t){var n=t.nextSibling;return Ii&&Ui&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var o=e.display,s=e.options.lineNumbers,l=o.lineDiv,p=l.firstChild,c=o.view,u=o.viewFrom,h=0,i;h<c.length;h++){if(i=c[h],i.hidden);else if(!i.node||i.node.parentNode!=l){var m=Ut(e,i,u,n);l.insertBefore(m,p)}else{for(;p!=i.node;)p=r(p);var g=s&&null!=t&&t<=u&&i.lineNumber;i.changes&&(-1<x(i.changes,"gutter")&&(g=!1),Lt(e,i,u,n)),g&&(d(i.lineNumber),i.lineNumber.appendChild(document.createTextNode(q(e.options,u)))),p=i.node.nextSibling}u+=i.size}for(;p;)p=r(p)}function qr(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Vr(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Xt(e)+"px"}function Wr(e){var t=e.display.gutters,n=e.options.gutters;d(t);for(var r=0;r<n.length;++r){var o=n[r],i=t.appendChild(c("div",null,"CodeMirror-gutter "+o));"CodeMirror-linenumbers"==o&&(e.display.lineGutter=i,i.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=r?"":"none",qr(e)}function Hr(e){var t=x(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):-1<t&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Kr(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function Gr(t){var e=Kr(t);return e.x*=Rs,e.y*=Rs,e}function Xr(t,n){var e=Kr(n),r=e.x,o=e.y,d=t.display,p=d.scroller,c=p.scrollWidth>p.clientWidth,u=p.scrollHeight>p.clientHeight;if(r&&c||o&&u){if(o&&Ui&&Ii)outer:for(var h=n.target,m=d.view;h!=p;h=h.parentNode)for(var g=0;g<m.length;g++)if(m[g].node==h){t.display.currentWheelTarget=h;break outer}if(r&&!wi&&!Oi&&null!=Rs)return o&&u&&lr(t,l(0,p.scrollTop+o*Rs)),pr(t,l(0,p.scrollLeft+r*Rs)),(!o||o&&u)&&je(n),void(d.wheelStartX=null);if(o&&null!=Rs){var i=o*Rs,f=t.doc.scrollTop,y=f+d.wrapper.clientHeight;0>i?f=l(0,f+i-50):y=s(t.doc.height,y+i+50),zr(t,{top:f,bottom:y})}20>Ds&&(null==d.wheelStartX?(d.wheelStartX=p.scrollLeft,d.wheelStartY=p.scrollTop,d.wheelDX=r,d.wheelDY=o,setTimeout(function(){if(null!=d.wheelStartX){var e=p.scrollLeft-d.wheelStartX,t=p.scrollTop-d.wheelStartY,n=t&&d.wheelDY&&t/d.wheelDY||e&&d.wheelDX&&e/d.wheelDX;d.wheelStartX=d.wheelStartY=null,n&&(Rs=(Rs*Ds+n)/(Ds+1),++Ds)}},200)):(d.wheelDX+=r,d.wheelDY+=o))}}function Qr(e,t){var n=e[t];e.sort(function(e,t){return W(e.from(),t.from())}),t=x(e,n);for(var r=1;r<e.length;r++){var o=e[r],i=e[r-1];if(0<=W(i.to(),o.from())){var s=X(i.from(),o.from()),l=G(i.to(),o.to()),d=i.empty()?o.from()==o.head:i.from()==i.head;r<=t&&--t,e.splice(--r,2,new Bs(d?l:s,d?s:l))}}return new Ps(e,t)}function Yr(e,t){return new Ps([new Bs(e,t||e)],0)}function Jr(e){return e.text?V(e.from.line+e.text.length-1,w(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function $r(e,t){if(0>W(e,t.from))return e;if(0>=W(e,t.to))return Jr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Jr(t).ch-t.to.ch),V(n,r)}function Zr(e,t){for(var n=[],r=0,o;r<e.sel.ranges.length;r++)o=e.sel.ranges[r],n.push(new Bs($r(o.anchor,t),$r(o.head,t)));return Qr(n,e.sel.primIndex)}function eo(e,t,n){return e.line==t.line?V(n.line,e.ch-t.ch+n.ch):V(n.line+(e.line-t.line),e.ch)}function to(e,t,n){for(var r=[],o=V(e.first,0),s=o,l=0;l<t.length;l++){var i=t[l],d=eo(i.from,o,s),p=eo(Jr(i),o,s);if(o=i.to,s=p,"around"==n){var c=e.sel.ranges[l],u=0>W(c.head,c.anchor);r[l]=new Bs(u?p:d,u?d:p)}else r[l]=new Bs(d,d)}return new Ps(r,e.sel.primIndex)}function no(e){e.doc.mode=$e(e.options,e.doc.modeOption),ro(e)}function ro(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Mr(e,100),e.state.modeGen++,e.curOp&&Er(e)}function oo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==w(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ao(e,t,r,n){function o(e){return r?r[e]:null}function i(e,r,o){mt(e,r,o,n),It(e,"change",e,t)}function s(e,t){for(var r=[],s=e;s<t;++s)r.push(new Ss(p[s],o(s),n));return r}var l=t.from,d=t.to,p=t.text,c=R(e,l.line),u=R(e,d.line),h=w(p),m=o(p.length-1),g=d.line-l.line;if(t.full)e.insert(0,s(0,p.length)),e.remove(p.length,e.size-p.length);else if(oo(e,t)){var f=s(0,p.length-1);i(u,u.text,m),g&&e.remove(l.line,g),f.length&&e.insert(l.line,f)}else if(c==u){if(1==p.length)i(c,c.text.slice(0,l.ch)+h+c.text.slice(d.ch),m);else{var y=s(1,p.length-1);y.push(new Ss(h+c.text.slice(d.ch),m,n)),i(c,c.text.slice(0,l.ch)+p[0],o(0)),e.insert(l.line+1,y)}}else if(1==p.length)i(c,c.text.slice(0,l.ch)+p[0]+u.text.slice(d.ch),o(0)),e.remove(l.line+1,g);else{i(c,c.text.slice(0,l.ch)+p[0],o(0)),i(u,h+u.text.slice(d.ch),m);var b=s(1,p.length-1);1<g&&e.remove(l.line+1,g-1),e.insert(l.line+1,b)}It(e,"change",e,t)}function io(e,t,n){function r(e,o,s){if(e.linked)for(var l=0,i;l<e.linked.length;++l)if(i=e.linked[l],i.doc!=o){var d=s&&i.sharedHist;(!n||d)&&(t(i.doc,d),r(i.doc,e,d))}}r(e,null,!0)}function so(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Dn(e),no(e),lo(e),e.options.lineWrapping||Ne(e),e.options.mode=t.modeOption,Er(e)}function lo(e){("rtl"==e.doc.direction?g:Hi)(e.display.lineDiv,"CodeMirror-rtl")}function po(e){wr(e,function(){lo(e),Er(e)})}function co(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function uo(e,t){var n={from:K(t.from),to:Jr(t),text:P(e,t.from,t.to)};return xo(e,n,t.from.line,t.to.line+1),io(e,function(e){return xo(e,n,t.from.line,t.to.line+1)},!0),n}function ho(e){for(;e.length;){var t=w(e);if(t.ranges)e.pop();else break}}function mo(e,t){return t?(ho(e.done),w(e.done)):e.done.length&&!w(e.done).ranges?w(e.done):1<e.done.length&&!e.done[e.done.length-2].ranges?(e.done.pop(),w(e.done)):void 0}function go(e,t,n,r){var o=e.history;o.undone.length=0;var i=+new Date,s,l;if((o.lastOp==r||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>i-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(s=mo(o,o.lastOp==r)))l=w(s.changes),0==W(t.from,t.to)&&0==W(t.from,l.to)?l.to=Jr(t):s.changes.push(uo(e,t));else{var d=w(o.done);for(d&&d.ranges||bo(e.sel,o.done),s={changes:[uo(e,t)],generation:o.generation},o.done.push(s);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=i,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,l||Pe(e,"historyAdded")}function fo(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function yo(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||fo(e,i,w(o.done),t))?o.done[o.done.length-1]=t:bo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&ho(o.undone)}function bo(e,t){var n=w(t);n&&n.ranges&&n.equals(e)||t.push(e)}function xo(e,t,r,o){var i=t["spans_"+e.id],d=0;e.iter(l(e.first,r),s(e.first+e.size,o),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[d]=n.markedSpans),++d})}function vo(e){if(!e)return null;for(var t=0,n;t<e.length;++t)e[t].marker.explicitlyCleared?n||(n=e.slice(0,t)):n&&n.push(e[t]);return n?n.length?n:null:e}function ko(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],o=0;o<t.text.length;++o)r.push(vo(n[o]));return r}function So(e,t){var n=ko(e,t),r=le(e,t);if(!n)return r;if(!r)return n;for(var o=0;o<n.length;++o){var i=n[o],s=r[o];if(i&&s)spans:for(var l=0,d;l<s.length;++l){d=s[l];for(var p=0;p<i.length;++p)if(i[p].marker==d.marker)continue spans;i.push(d)}else s&&(n[o]=s)}return n}function wo(e,t,n){for(var r=[],o=0,i;o<e.length;++o){if(i=e[o],i.ranges){r.push(n?Ps.prototype.deepCopy.call(i):i);continue}var s=i.changes,l=[];r.push({changes:l});for(var d=0;d<s.length;++d){var p=s[d],c=void 0;if(l.push({from:p.from,to:p.to,text:p.text}),t)for(var u in p)(c=u.match(/^spans_(\d+)$/))&&-1<x(t,+c[1])&&(w(l)[u]=p[u],delete p[u])}}return r}function Co(e,t,n,r){if(r){var o=e.anchor;if(n){var i=0>W(t,o);i==0>W(n,o)?i!=0>W(t,n)&&(t=n):(o=t,t=n)}return new Bs(o,t)}return new Bs(n||t,t)}function To(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),Lo(e,new Ps([Co(e.sel.primary(),t,n,o)],0),r)}function _o(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),s=0;s<e.sel.ranges.length;s++)r[s]=Co(e.sel.ranges[s],t[s],null,o);var i=Qr(r,e.sel.primIndex);Lo(e,i,n)}function Eo(e,t,n,r){var o=e.sel.ranges.slice(0);o[t]=n,Lo(e,Qr(o,e.sel.primIndex),r)}function Ao(e,t,n,r){Lo(e,Yr(t,n),r)}function Io(e,t,n){var r={ranges:t.ranges,update:function(t){var n=this;this.ranges=[];for(var r=0;r<t.length;r++)n.ranges[r]=new Bs(Y(e,t[r].anchor),Y(e,t[r].head))},origin:n&&n.origin};return Pe(e,"beforeSelectionChange",e,r),e.cm&&Pe(e.cm,"beforeSelectionChange",e.cm,r),r.ranges==t.ranges?t:Qr(r.ranges,r.ranges.length-1)}function No(e,t,n){var r=e.history.done,o=w(r);o&&o.ranges?(r[r.length-1]=t,Oo(e,t,n)):Lo(e,t,n)}function Lo(e,t,n){Oo(e,t,n),yo(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Oo(e,t,n){(Ue(e,"beforeSelectionChange")||e.cm&&Ue(e.cm,"beforeSelectionChange"))&&(t=Io(e,t,n));var r=n&&n.bias||(0>W(t.primary().head,e.sel.primary().head)?-1:1);Mo(e,Ro(e,t,r,!0)),!(n&&!1===n.scroll)&&e.cm&&rr(e.cm)}function Mo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Fe(e.cm)),It(e,"cursorActivity",e))}function Do(e){Mo(e,Ro(e,e.sel,null,!1))}function Ro(e,t,n,r){for(var o=0,i;o<t.ranges.length;o++){var s=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],d=Bo(e,s.anchor,l&&l.anchor,n,r),p=Bo(e,s.head,l&&l.head,n,r);(i||d!=s.anchor||p!=s.head)&&(!i&&(i=t.ranges.slice(0,o)),i[o]=new Bs(d,p))}return i?Qr(i,t.primIndex):t}function Po(e,t,n,r,o){var s=R(e,t.line);if(s.markedSpans)for(var l=0;l<s.markedSpans.length;++l){var i=s.markedSpans[l],d=i.marker;if((null==i.from||(d.inclusiveLeft?i.from<=t.ch:i.from<t.ch))&&(null==i.to||(d.inclusiveRight?i.to>=t.ch:i.to>t.ch))){if(o&&(Pe(d,"beforeCursorEnter"),d.explicitlyCleared))if(!s.markedSpans)break;else{--l;continue}if(!d.atomic)continue;if(n){var p=d.find(0>r?1:-1),c=void 0;if((0>r?d.inclusiveRight:d.inclusiveLeft)&&(p=Fo(e,p,-r,p&&p.line==t.line?s:null)),p&&p.line==t.line&&(c=W(p,n))&&(0>r?0>c:0<c))return Po(e,p,t,r,o)}var u=d.find(0>r?-1:1);return(0>r?d.inclusiveLeft:d.inclusiveRight)&&(u=Fo(e,u,r,u.line==t.line?s:null)),u?Po(e,u,t,r,o):null}}return t}function Bo(e,t,n,r,o){var i=r||1,s=Po(e,t,n,i,o)||!o&&Po(e,t,n,i,!0)||Po(e,t,n,-i,o)||!o&&Po(e,t,n,-i,!0);return s?s:(e.cantEdit=!0,V(e.first,0))}function Fo(e,t,n,r){return 0>n&&0==t.ch?t.line>e.first?Y(e,V(t.line-1)):null:0<n&&t.ch==(r||R(e,t.line)).text.length?t.line<e.first+e.size-1?V(t.line+1,0):null:new V(t.line,t.ch+n)}function Uo(e){e.setSelection(V(e.firstLine(),0),V(e.lastLine()),Ji)}function zo(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,o,i){t&&(r.from=Y(e,t)),n&&(r.to=Y(e,n)),o&&(r.text=o),void 0!==i&&(r.origin=i)}),Pe(e,"beforeChange",e,r),e.cm&&Pe(e.cm,"beforeChange",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function jo(e,t,n){if(e.cm){if(!e.cm.curOp)return Cr(e.cm,jo)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((Ue(e,"beforeChange")||e.cm&&Ue(e.cm,"beforeChange"))&&(t=zo(e,t,!0),!t))){var r=rs&&!n&&pe(e,t.from,t.to);if(r)for(var o=r.length-1;0<=o;--o)qo(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else qo(e,t)}}function qo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=W(t.from,t.to)){var n=Zr(e,t);go(e,t,n,e.cm?e.cm.curOp.id:NaN),Ho(e,t,n,le(e,t));var r=[];io(e,function(e,n){n||-1!=x(r,e.history)||(Yo(e.history,t),r.push(e.history)),Ho(e,t,null,le(e,t))})}}function Vo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o=e.history,s=e.sel,l="undo"==t?o.done:o.undone,d="undo"==t?o.undone:o.done,p=0,c;p<l.length&&(c=l[p],n?!c.ranges||c.equals(e.sel):!!c.ranges);p++);if(p!=l.length){for(o.lastOrigin=o.lastSelOrigin=null;;)if(c=l.pop(),c.ranges){if(bo(c,d),n&&!c.equals(e.sel))return void Lo(e,c,{clearRedo:!1});s=c}else{if(r)return void l.push(c);break}var u=[];bo(s,d),d.push({changes:u,generation:o.generation}),o.generation=c.generation||++o.maxGeneration;for(var h=Ue(e,"beforeChange")||e.cm&&Ue(e.cm,"beforeChange"),i=function(n){var r=c.changes[n];if(r.origin=t,h&&!zo(e,r,!1))return l.length=0,{};u.push(uo(e,r));var o=n?Zr(e,r):w(l);Ho(e,r,o,So(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Jr(r)});var s=[];io(e,function(e,t){t||-1!=x(s,e.history)||(Yo(e.history,r),s.push(e.history)),Ho(e,r,null,So(e,r))})},m=c.changes.length-1,g;0<=m;--m)if(g=i(m),g)return g.v}}}function Wo(e,t){if(0!=t&&(e.first+=t,e.sel=new Ps(C(e.sel.ranges,function(e){return new Bs(V(e.anchor.line+t,e.anchor.ch),V(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Er(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Ar(e.cm,r,"gutter")}}function Ho(e,t,n,r){if(e.cm&&!e.cm.curOp)return Cr(e.cm,Ho)(e,t,n,r);if(t.to.line<e.first)return void Wo(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);Wo(e,o),t={from:V(e.first,0),to:V(t.to.line+o,t.to.ch),text:[w(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:V(i,R(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=P(e,t.from,t.to),n||(n=Zr(e,t)),e.cm?Ko(e.cm,t,r):ao(e,t,r),Oo(e,n,Ji)}}function Ko(e,t,n){var r=e.doc,o=e.display,i=t.from,s=t.to,l=!1,d=i.line;e.options.lineWrapping||(d=U(ke(R(r,i.line))),r.iter(d,s.line+1,function(e){if(e==o.maxLine)return l=!0,!0})),-1<r.sel.contains(t.from,t.to)&&Fe(e),ao(r,t,n,Mn(e)),e.options.lineWrapping||(r.iter(d,i.line+t.text.length,function(e){var t=Ie(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),ht(r,i.line),Mr(e,400);var p=t.text.length-(s.line-i.line)-1;t.full?Er(e):i.line!=s.line||1!=t.text.length||oo(e.doc,t)?Er(e,i.line,s.line+1,p):Ar(e,i.line,"text");var c=Ue(e,"changes"),u=Ue(e,"change");if(u||c){var h={from:i,to:s,text:t.text,removed:t.removed,origin:t.origin};u&&It(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Go(e,t,n,r,o){if(r||(r=n),0>W(r,n)){var i;i=[r,n],n=i[0],r=i[1]}"string"==typeof t&&(t=e.splitLines(t)),jo(e,{from:n,to:r,text:t,origin:o})}function Xo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Qo(e,t,n,r){for(var o=0;o<e.length;++o){var i=e[o],s=!0;if(i.ranges){i.copied||(i=e[o]=i.deepCopy(),i.copied=!0);for(var l=0;l<i.ranges.length;l++)Xo(i.ranges[l].anchor,t,n,r),Xo(i.ranges[l].head,t,n,r);continue}for(var d=0,p;d<i.changes.length;++d)if(p=i.changes[d],n<p.from.line)p.from=V(p.from.line+r,p.from.ch),p.to=V(p.to.line+r,p.to.ch);else if(t<=p.to.line){s=!1;break}s||(e.splice(0,o+1),o=0)}}function Yo(e,t){var n=t.from.line,r=t.to.line,o=t.text.length-(r-n)-1;Qo(e.done,n,r,o),Qo(e.undone,n,r,o)}function Jo(e,t,n,r){var o=t,i=t;return("number"==typeof t?i=R(e,Q(e,t)):o=U(t),null==o)?null:(r(i,o)&&e.cm&&Ar(e.cm,o,n),i)}function $o(e){var t=this;this.lines=e,this.parent=null;for(var n=0,r=0;r<e.length;++r)e[r].parent=t,n+=e[r].height;this.height=n}function Zo(e){var t=this;this.children=e;for(var n=0,r=0,o=0,i;o<e.length;++o)i=e[o],n+=i.chunkSize(),r+=i.height,i.parent=t;this.size=n,this.height=r,this.parent=null}function ea(e,t,n){Ae(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&nr(e,n)}function ta(e,t,n,r){var o=new Fs(e,n,r),i=e.cm;return i&&o.noHScroll&&(i.display.alignWidgets=!0),Jo(e,t,"widget",function(t){var n=t.widgets||(t.widgets=[]);if(null==o.insertAt?n.push(o):n.splice(s(n.length-1,l(0,o.insertAt)),0,o),o.line=t,i&&!_e(e,t)){var r=Ae(t)<e.scrollTop;F(t,t.height+Vt(o)),r&&nr(i,o.height),i.curOp.forceUpdate=!0}return!0}),i&&It(i,"lineWidgetAdded",i,o,"number"==typeof t?t:U(t)),o}function na(e,t,n,r,o){if(r&&r.shared)return ra(e,t,n,r,o);if(e.cm&&!e.cm.curOp)return Cr(e.cm,na)(e,t,n,r,o);var s=new zs(e,o),l=W(t,n);if(r&&b(r,s,!1),0<l||0==l&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=u("span",[s.replacedWith],"CodeMirror-widget"),!r.handleMouseEvents&&s.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ve(e,t.line,t,n,s)||t.line!=n.line&&ve(e,n.line,t,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");ee()}s.addToHistory&&go(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var d=t.line,p=e.cm,c;if(e.iter(d,n.line+1,function(e){p&&s.collapsed&&!p.options.lineWrapping&&ke(e)==p.display.maxLine&&(c=!0),s.collapsed&&d!=t.line&&F(e,0),oe(e,new te(s,d==t.line?t.ch:null,d==n.line?n.ch:null)),++d}),s.collapsed&&e.iter(t.line,n.line+1,function(t){_e(e,t)&&F(t,0)}),s.clearOnEnter&&ls(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(Z(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),s.collapsed&&(s.id=++Us,s.atomic=!0),p){if(c&&(p.curOp.updateMaxLine=!0),s.collapsed)Er(p,t.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var h=t.line;h<=n.line;h++)Ar(p,h,"text");s.atomic&&Do(p.doc),It(p,"markerAdded",p,s)}return s}function ra(e,t,n,r,o){r=b(r),r.shared=!1;var s=[na(e,t,n,r,o)],l=s[0],d=r.widgetNode;return io(e,function(e){d&&(r.widgetNode=d.cloneNode(!0)),s.push(na(e,Y(e,t),Y(e,n),r,o));for(var p=0;p<e.linked.length;++p)if(e.linked[p].isParent)return;l=w(s)}),new js(s,l)}function oa(e){return e.findMarks(V(e.first,0),e.clipPos(V(e.lastLine())),function(e){return e.parent})}function aa(e,t){for(var n=0;n<t.length;n++){var r=t[n],o=r.find(),i=e.clipPos(o.from),s=e.clipPos(o.to);if(W(i,s)){var l=na(e,i,s,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function ia(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];io(n.primary.doc,function(e){return r.push(e)});for(var o=0,i;o<n.markers.length;o++)i=n.markers[o],-1==x(r,i.doc)&&(i.parent=null,n.markers.splice(o--,1))},n=0;n<e.length;n++)t(n)}function sa(t){var e=this;if(pa(e),!(Be(e,t)||Wt(e.display,t))){je(t),Ei&&(Ws=+new Date);var r=Rn(e,t,!0),o=t.dataTransfer.files;if(r&&!e.isReadOnly())if(o&&o.length&&window.FileReader&&window.File)for(var s=o.length,n=Array(s),l=0,d=function(t,o){if(!(e.options.allowDropFileTypes&&-1==x(e.options.allowDropFileTypes,t.type))){var i=new FileReader;i.onload=Cr(e,function(){var t=i.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(t)&&(t=""),n[o]=t,++l==s){r=Y(e.doc,r);var d={from:r,to:r,text:e.doc.splitLines(n.join(e.doc.lineSeparator())),origin:"paste"};jo(e.doc,d),No(e.doc,Yr(r,Jr(d)))}}),i.readAsText(t)}},p=0;p<s;++p)d(o[p],p);else{if(e.state.draggingText&&-1<e.doc.sel.contains(r))return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var i=t.dataTransfer.getData("Text");if(i){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),Oo(e.doc,Yr(r,r)),c)for(var u=0;u<c.length;++u)Go(e.doc,"",c[u].anchor,c[u].head,"drag");e.replaceSelection(i,"around","paste"),e.display.input.focus()}}catch(t){}}}}function la(t,n){if(Ei&&(!t.state.draggingText||100>+new Date-Ws))return void We(n);if(!(Be(t,n)||Wt(t.display,n))&&(n.dataTransfer.setData("Text",t.getSelection()),n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setDragImage&&!Mi)){var e=c("img",null,null,"position: fixed; left: 0; top: 0;");e.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Oi&&(e.width=e.height=1,t.display.wrapper.appendChild(e),e._top=e.offsetTop),n.dataTransfer.setDragImage(e,0,0),Oi&&e.parentNode.removeChild(e)}}function da(t,n){var e=Rn(t,n);if(e){var r=document.createDocumentFragment();Un(t,e,r),t.display.dragCursor||(t.display.dragCursor=c("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),p(t.display.dragCursor,r)}}function pa(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ca(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),n=0,r;n<t.length;n++)r=t[n].CodeMirror,r&&e(r)}function ua(){Hs||(ha(),Hs=!0)}function ha(){var e;ls(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,ca(ma)},100))}),ls(window,"blur",function(){return ca(Kn)})}function ma(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function ga(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n=0,r,o,i,s,l;n<t.length-1;n++)if(l=t[n],/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l);return r&&(e="Alt-"+e),o&&(e="Ctrl-"+e),s&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function fa(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var o=C(n.split(" "),ga),s=0;s<o.length;s++){var i=void 0,l=void 0;s==o.length-1?(l=o.join(" "),i=r):(l=o.slice(0,s+1).join(" "),i="...");var d=t[l];if(!d)t[l]=i;else if(d!=i)throw new Error("Inconsistent bindings for "+l)}delete e[n]}for(var p in t)e[p]=t[p];return e}function ya(e,t,n,r){t=ka(t);var o=t.call?t.call(e,r):t[e];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&n(o))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return ya(e,t.fallthrough,n,r);for(var s=0,i;s<t.fallthrough.length;s++)if(i=ya(e,t.fallthrough[s],n,r),i)return i}}function ba(e){var t="string"==typeof e?e:Ks[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function xa(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(Vi?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(Vi?t.ctrlKey:t.metaKey)&&"Cmd"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function va(e,t){if(Oi&&34==e.keyCode&&e.char)return!1;var n=Ks[e.keyCode];return null==n||e.altGraphKey?!1:(3==e.keyCode&&e.code&&(n=e.code),xa(n,e,t))}function ka(e){return"string"==typeof e?Ys[e]:e}function Sa(e,t){for(var n=e.doc.sel.ranges,r=[],o=0,i;o<n.length;o++){for(i=t(n[o]);r.length&&0>=W(i.from,w(r).to);){var s=r.pop();if(0>W(s.from,i.from)){i.from=s.from;break}}r.push(i)}wr(e,function(){for(var t=r.length-1;0<=t;t--)Go(e.doc,"",r[t].from,r[t].to,"+delete");rr(e)})}function wa(e,t,n){var r=O(e.text,t+n,n);return 0>r||r>e.text.length?null:r}function Ca(e,t,n){var r=wa(e,t.ch,n);return null==r?null:new V(t.line,r,0>n?"after":"before")}function Ta(e,t,n,r,o){if(e){var i=Me(n,t.doc.direction);if(i){var s=0>o?w(i):i[0],l=0>o==(1==s.level),d=l?"after":"before",p;if(0<s.level||"rtl"==t.doc.direction){var c=nn(t,n);p=0>o?n.text.length-1:0;var u=rn(t,c,p).top;p=M(function(e){return rn(t,c,e).top==u},0>o==(1==s.level)?s.from:s.to-1,p),"before"==d&&(p=wa(n,p,1))}else p=0>o?s.to:s.from;return new V(r,p,d)}}return new V(r,0>o?n.text.length:0,0>o?"before":"after")}function _a(e,t,n,r){var o=Me(t,e.doc.direction);if(!o)return Ca(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):0>=n.ch&&(n.ch=0,n.sticky="after");var i=Oe(o,n.ch,n.sticky),s=o[i];if("ltr"==e.doc.direction&&0==s.level%2&&(0<r?s.to>n.ch:s.from<n.ch))return Ca(t,n,r);var l=function(e,n){return wa(t,e instanceof V?e.ch:e,n)},d=function(n){return e.options.lineWrapping?(c=c||nn(e,t),Cn(e,t,c,n)):{begin:0,end:t.text.length}},p=d("before"==n.sticky?l(n,-1):n.ch),c;if("rtl"==e.doc.direction||1==s.level){var u=1==s.level==0>r,h=l(n,u?1:-1);if(null!=h&&(u?h<=s.to&&h<=p.end:h>=s.from&&h>=p.begin)){var m=u?"before":"after";return new V(n.line,h,m)}}var g=function(e,t,r){for(var i=function(e,t){return t?new V(n.line,l(e,1),"before"):new V(n.line,e,"after")};0<=e&&e<o.length;e+=t){var s=o[e],d=0<t==(1!=s.level),p=d?r.begin:l(r.end,-1);if(s.from<=p&&p<s.to)return i(p,d);if(p=d?s.from:l(s.to,-1),r.begin<=p&&p<r.end)return i(p,d)}},f=g(i+r,r,p);if(f)return f;var y=0<r?p.end:l(p.begin,-1);return null!=y&&!(0<r&&y==t.text.length)&&(f=g(0<r?0:o.length-1,r,d(y)),f)?f:null}function Ea(e,t){var n=R(e.doc,t),r=ke(n);return r!=n&&(t=U(r)),Ta(!0,e,r,t,1)}function Aa(e,t){var n=R(e.doc,t),r=Se(n);return r!=n&&(t=U(r)),Ta(!0,e,n,t,-1)}function Ia(e,t){var n=Ea(e,t.line),r=R(e.doc,n.line),o=Me(r,e.doc.direction);if(!o||0==o[0].level){var i=l(0,r.text.search(/\S/)),s=t.line==n.line&&t.ch<=i&&t.ch;return V(n.line,s?0:i,n.sticky)}return n}function Na(e,t,n){if("string"==typeof t&&(t=Js[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),o=t(e)!=Yi}finally{e.display.shift=r,e.state.suppressEdits=!1}return o}function La(e,t,n){for(var r=0,o;r<e.state.keyMaps.length;r++)if(o=ya(t,e.state.keyMaps[r],n,e),o)return o;return e.options.extraKeys&&ya(t,e.options.extraKeys,n,e)||ya(t,e.options.keyMap,n,e)}function Oa(t,n,r,e){var o=t.state.keySeq;if(o){if(ba(n))return"handled";if(/\'$/.test(n)?t.state.keySeq=null:$s.set(50,function(){t.state.keySeq==o&&(t.state.keySeq=null,t.display.input.reset())}),Ma(t,o+" "+n,r,e))return!0}return Ma(t,n,r,e)}function Ma(t,n,r,e){var o=La(t,n,e);return"multi"==o&&(t.state.keySeq=n),"handled"==o&&It(t,"keyHandled",t,n,r),("handled"==o||"multi"==o)&&(je(r),qn(t)),!!o}function Da(t,n){var e=va(n,!0);return!!e&&(n.shiftKey&&!t.state.keySeq?Oa(t,"Shift-"+e,n,function(e){return Na(t,e,!0)})||Oa(t,e,n,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return Na(t,e)}):Oa(t,e,n,function(e){return Na(t,e)}))}function Ra(t,n,e){return Oa(t,"'"+e+"'",n,function(e){return Na(t,e,!0)})}function Pa(t){var e=this;if(e.curOp.focus=m(),!Be(e,t)){Ei&&11>Ai&&27==t.keyCode&&(t.returnValue=!1);var n=t.keyCode;e.display.shift=16==n||t.shiftKey;var r=Da(e,t);Oi&&(Zs=r?n:null,!r&&88==n&&!cs&&(Ui?t.metaKey:t.ctrlKey)&&e.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||Ba(e)}}function Ba(e){function t(r){18!=r.keyCode&&r.altKey||(Hi(n,"CodeMirror-crosshair"),Re(document,"keyup",t),Re(document,"mouseover",t))}var n=e.display.lineDiv;g(n,"CodeMirror-crosshair"),ls(document,"keyup",t),ls(document,"mouseover",t)}function Fa(t){16==t.keyCode&&(this.doc.sel.shift=!1),Be(this,t)}function Ua(t){var e=this;if(!(Wt(e.display,t)||Be(e,t)||t.ctrlKey&&!t.altKey||Ui&&t.metaKey)){var n=t.keyCode,r=t.charCode;if(Oi&&n==Zs)return Zs=null,void je(t);if(!(Oi&&(!t.which||10>t.which)&&Da(e,t))){var o=i(null==r?n:r);"\b"==o||Ra(e,t,o)||e.display.input.onKeyPress(t)}}}function za(e,t){var n=+new Date;return al&&al.compare(n,e,t)?(ol=al=null,"triple"):ol&&ol.compare(n,e,t)?(al=new el(n,e,t),ol=null,"double"):(ol=new el(n,e,t),al=null,"single")}function ja(t){var e=this,n=e.display;if(!(Be(e,t)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=t.shiftKey,Wt(n,t))return void(Ii||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100)));if(!Ya(e,t)){var r=Rn(e,t),o=Ke(t),i=r?za(r,o):"single";window.focus(),1==o&&e.state.selectingText&&e.state.selectingText(t),r&&qa(e,o,r,i,t)||(1==o?r?Wa(e,r,i,t):He(t)==n.scroller&&je(t):2==o?(r&&To(e.doc,r),setTimeout(function(){return n.input.focus()},20)):3==o&&(Wi?Ja(e,t):Wn(e)))}}}function qa(e,t,n,r,o){var i="Click";return"double"==r?i="Double"+i:"triple"==r&&(i="Triple"+i),i=(1==t?"Left":2==t?"Middle":"Right")+i,Oa(e,xa(i,o),o,function(t){if("string"==typeof t&&(t=Js[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=Yi}finally{e.state.suppressEdits=!1}return r})}function Va(e,t,n){var r=e.getOption("configureMouse"),o=r?r(e,t,n):{};if(null==o.unit){var i=zi?n.shiftKey&&n.metaKey:n.altKey;o.unit=i?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==o.extend||e.doc.extend)&&(o.extend=e.doc.extend||n.shiftKey),null==o.addNew&&(o.addNew=Ui?n.metaKey:n.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=Ui?!n.altKey:!n.ctrlKey),o}function Wa(e,t,n,r){Ei?setTimeout(y(Vn,e),0):e.curOp.focus=m();var o=Va(e,n,r),i=e.doc.sel,s;e.options.dragDrop&&on&&!e.isReadOnly()&&"single"==n&&-1<(s=i.contains(t))&&(0>W((s=i.ranges[s]).from(),t)||0<t.xRel)&&(0<W(s.to(),t)||0>t.xRel)?Ha(e,r,t,o):Ga(e,r,t,o)}function Ha(t,e,r,o){var i=t.display,s=!1,l=Cr(t,function(n){Ii&&(i.scroller.draggable=!1),t.state.draggingText=!1,Re(i.wrapper.ownerDocument,"mouseup",l),Re(i.wrapper.ownerDocument,"mousemove",d),Re(i.scroller,"dragstart",p),Re(i.scroller,"drop",l),s||(je(n),!o.addNew&&To(t.doc,r,null,null,o.extend),Ii||Ei&&9==Ai?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),d=function(t){s=s||10<=n(e.clientX-t.clientX)+n(e.clientY-t.clientY)},p=function(){return s=!0};Ii&&(i.scroller.draggable=!0),t.state.draggingText=l,l.copy=!o.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ls(i.wrapper.ownerDocument,"mouseup",l),ls(i.wrapper.ownerDocument,"mousemove",d),ls(i.scroller,"dragstart",p),ls(i.scroller,"drop",l),Wn(t),setTimeout(function(){return i.input.focus()},20)}function Ka(e,t,n){if("char"==n)return new Bs(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Bs(V(t.line,0),Y(e.doc,V(t.line+1,0)));var r=n(e,t);return new Bs(r.from,r.to)}function Ga(t,e,n,r){function o(e){if(0!=W(b,e))if(b=e,"rectangle"==r.unit){for(var o=[],i=t.options.tabSize,d=v(R(c,n.line).text,n.ch,i),p=v(R(c,e.line).text,e.ch,i),h=s(d,p),m=l(d,p),y=s(n.line,e.line),x=s(t.lastLine(),l(n.line,e.line));y<=x;y++){var S=R(c,y).text,w=k(S,h,i);h==m?o.push(new Bs(V(y,w),V(y,w))):S.length>w&&o.push(new Bs(V(y,w),V(y,k(S,m,i))))}o.length||o.push(new Bs(n,n)),Lo(c,Qr(u.ranges.slice(0,f).concat(o),f),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var C=g,T=Ka(t,e,r.unit),_=C.anchor,E;0<W(T.anchor,_)?(E=T.head,_=X(C.from(),T.anchor)):(E=T.anchor,_=G(C.to(),T.head));var A=u.ranges.slice(0);A[f]=Xa(t,new Bs(Y(c,_),E)),Lo(c,Qr(A,f),$i)}}function i(n){var e=++S,s=Rn(t,n,!0,"rectangle"==r.unit);if(s)if(0!=W(s,b)){t.curOp.focus=m(),o(s);var l=Qn(p,c);(s.line>=l.to||s.line<l.from)&&setTimeout(Cr(t,function(){S==e&&i(n)}),150)}else{var d=n.clientY<x.top?-20:n.clientY>x.bottom?20:0;d&&setTimeout(Cr(t,function(){S!=e||(p.scroller.scrollTop+=d,i(n))}),50)}}function d(n){t.state.selectingText=!1,S=Infinity,je(n),p.input.focus(),Re(p.wrapper.ownerDocument,"mousemove",w),Re(p.wrapper.ownerDocument,"mouseup",C),c.history.lastSelOrigin=null}var p=t.display,c=t.doc;je(e);var u=c.sel,h=u.ranges,g,f;if(r.addNew&&!r.extend?(f=c.sel.contains(n),g=-1<f?h[f]:new Bs(n,n)):(g=c.sel.primary(),f=c.sel.primIndex),"rectangle"==r.unit)r.addNew||(g=new Bs(n,n)),n=Rn(t,e,!0,!0),f=-1;else{var y=Ka(t,n,r.unit);g=r.extend?Co(g,y.anchor,y.head,r.extend):y}r.addNew?-1==f?(f=h.length,Lo(c,Qr(h.concat([g]),f),{scroll:!1,origin:"*mouse"})):1<h.length&&h[f].empty()&&"char"==r.unit&&!r.extend?(Lo(c,Qr(h.slice(0,f).concat(h.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),u=c.sel):Eo(c,f,g,$i):(f=0,Lo(c,new Ps([g],0),$i),u=c.sel);var b=n,x=p.wrapper.getBoundingClientRect(),S=0,w=Cr(t,function(t){0!==t.buttons&&Ke(t)?i(t):d(t)}),C=Cr(t,d);t.state.selectingText=C,ls(p.wrapper.ownerDocument,"mousemove",w),ls(p.wrapper.ownerDocument,"mouseup",C)}function Xa(e,t){var n=t.anchor,r=t.head,o=R(e.doc,n.line);if(0==W(n,r)&&n.sticky==r.sticky)return t;var i=Me(o);if(!i)return t;var s=Oe(i,n.ch,n.sticky),l=i[s];if(l.from!=n.ch&&l.to!=n.ch)return t;var d=s+(l.from==n.ch==(1!=l.level)?0:1);if(0==d||d==i.length)return t;var p;if(r.line!=n.line)p=0<(r.line-n.line)*("ltr"==e.doc.direction?1:-1);else{var c=Oe(i,r.ch,r.sticky),u=c-s||(r.ch-n.ch)*(1==l.level?-1:1);p=c==d-1||c==d?0>u:0<u}var h=i[d+(p?-1:0)],m=p==(1==h.level),g=m?h.from:h.to,f=m?"after":"before";return n.ch==g&&n.sticky==f?t:new Bs(new V(n.line,g,f),r)}function Qa(t,n,e,r){var s,l;if(n.touches)s=n.touches[0].clientX,l=n.touches[0].clientY;else try{s=n.clientX,l=n.clientY}catch(t){return!1}if(s>=o(t.display.gutters.getBoundingClientRect().right))return!1;r&&je(n);var d=t.display,p=d.lineDiv.getBoundingClientRect();if(l>p.bottom||!Ue(t,e))return Ve(n);l-=p.top-d.viewOffset;for(var c=0,i;c<t.options.gutters.length;++c)if(i=d.gutters.childNodes[c],i&&i.getBoundingClientRect().right>=s){var u=z(t.doc,l),h=t.options.gutters[c];return Pe(t,e,t,u,h,n),Ve(n)}}function Ya(t,n){return Qa(t,n,"gutterClick",!0)}function Ja(t,n){Wt(t.display,n)||$a(t,n)||Be(t,n,"contextmenu")||t.display.input.onContextMenu(n)}function $a(t,n){return!!Ue(t,"gutterContextMenu")&&Qa(t,n,"gutterContextMenu",!1)}function Za(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),un(e)}function ei(e){Wr(e),Er(e),Yn(e)}function ti(e,t,n){if(!t!=!(n&&n!=tl)){var r=e.display.dragFunctions,o=t?ls:Re;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function ni(e){e.options.lineWrapping?(g(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Hi(e.display.wrapper,"CodeMirror-wrap"),Ne(e)),Dn(e),Er(e),un(e),setTimeout(function(){return ur(e)},100)}function ri(e,t){var n=this;if(!(this instanceof ri))return new ri(e,t);this.options=t=t?b(t):{},b(nl,t,!1),Hr(t);var r=t.value;"string"==typeof r&&(r=new Vs(r,t.mode,null,t.lineSeparator,t.direction)),this.doc=r;var o=new ri.inputStyles[t.inputStyle](this),s=this.display=new D(e,r,o);for(var l in s.wrapper.CodeMirror=this,Wr(this),Za(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),mr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Xi,keySeq:null,specialChars:null},t.autofocus&&!Fi&&s.input.focus(),Ei&&11>Ai&&setTimeout(function(){return n.display.input.reset(!0)},20),oi(this),ua(),gr(this),this.curOp.forceUpdate=!0,so(this,r),t.autofocus&&!Fi||this.hasFocus()?setTimeout(y(Hn,this),20):Kn(this),rl)rl.hasOwnProperty(l)&&rl[l](n,t[l],tl);Jn(this),t.finishInit&&t.finishInit(this);for(var d=0;d<il.length;++d)il[d](n);fr(this),Ii&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(s.lineDiv).textRendering&&(s.lineDiv.style.textRendering="auto")}function oi(t){function n(){i.activeTouch&&(l=setTimeout(function(){return i.activeTouch=null},1e3),s=i.activeTouch,s.end=+new Date)}function r(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return 1>=e.radiusX&&1>=e.radiusY}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return 400<n*n+r*r}var i=t.display;ls(i.scroller,"mousedown",Cr(t,ja)),Ei&&11>Ai?ls(i.scroller,"dblclick",Cr(t,function(n){if(!Be(t,n)){var e=Rn(t,n);if(!(!e||Ya(t,n)||Wt(t.display,n))){je(n);var r=t.findWordAt(e);To(t.doc,r.anchor,r.head)}}})):ls(i.scroller,"dblclick",function(n){return Be(t,n)||je(n)}),Wi||ls(i.scroller,"contextmenu",function(n){return Ja(t,n)});var s={end:0},l;ls(i.scroller,"touchstart",function(n){if(!Be(t,n)&&!r(n)&&!Ya(t,n)){i.input.ensurePolled(),clearTimeout(l);var e=+new Date;i.activeTouch={start:e,moved:!1,prev:300>=e-s.end?s:null},1==n.touches.length&&(i.activeTouch.left=n.touches[0].pageX,i.activeTouch.top=n.touches[0].pageY)}}),ls(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),ls(i.scroller,"touchend",function(r){var e=i.activeTouch;if(e&&!Wt(i,r)&&null!=e.left&&!e.moved&&300>new Date-e.start){var s=t.coordsChar(i.activeTouch,"page"),l;l=!e.prev||o(e,e.prev)?new Bs(s,s):!e.prev.prev||o(e,e.prev.prev)?t.findWordAt(s):new Bs(V(s.line,0),Y(t.doc,V(s.line+1,0))),t.setSelection(l.anchor,l.head),t.focus(),je(r)}n()}),ls(i.scroller,"touchcancel",n),ls(i.scroller,"scroll",function(){i.scroller.clientHeight&&(lr(t,i.scroller.scrollTop),pr(t,i.scroller.scrollLeft,!0),Pe(t,"scroll",t))}),ls(i.scroller,"mousewheel",function(n){return Xr(t,n)}),ls(i.scroller,"DOMMouseScroll",function(n){return Xr(t,n)}),ls(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(n){Be(t,n)||We(n)},over:function(n){Be(t,n)||(da(t,n),We(n))},start:function(n){return la(t,n)},drop:Cr(t,sa),leave:function(n){Be(t,n)||pa(t)}};var e=i.input.getField();ls(e,"keyup",function(n){return Fa.call(t,n)}),ls(e,"keydown",Cr(t,Pa)),ls(e,"keypress",Cr(t,Ua)),ls(e,"focus",function(n){return Hn(t,n)}),ls(e,"blur",function(n){return Kn(t,n)})}function ai(e,t,n,r){var s=e.doc,d;null==n&&(n="add"),"smart"==n&&(s.mode.indent?d=at(e,t).state:n="prev");var p=e.options.tabSize,c=R(s,t),u=v(c.text,null,p);c.stateAfter&&(c.stateAfter=null);var h=c.text.match(/^\s*/)[0],m;if(!r&&!/\S/.test(c.text))m=0,n="not";else if("smart"==n&&(m=s.mode.indent(d,c.text.slice(h.length),c.text),m==Yi||150<m)){if(!r)return;n="prev"}"prev"==n?t>s.first?m=v(R(s,t-1).text,null,p):m=0:"add"==n?m=u+e.options.indentUnit:"subtract"==n?m=u-e.options.indentUnit:"number"==typeof n&&(m=u+n),m=l(0,m);var g="",f=0;if(e.options.indentWithTabs)for(var y=o(m/p);y;--y)f+=p,g+="\t";if(f<m&&(g+=S(m-f)),g!=h)return Go(s,g,V(t,0),V(t,h.length),"+input"),c.stateAfter=null,!0;for(var i=0,b;i<s.sel.ranges.length;i++)if(b=s.sel.ranges[i],b.head.line==t&&b.head.ch<h.length){var x=V(t,h.length);Eo(s,i,new Bs(x,x));break}}function ii(e){sl=e}function si(e,t,n,r,o){var l=e.doc;e.display.shift=!1,r||(r=l.sel);var d=e.state.pasteIncoming||"paste"==o,p=ds(t),c=null;if(d&&1<r.ranges.length)if(!(sl&&sl.text.join("\n")==t))p.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=C(p,function(e){return[e]}));else if(0==r.ranges.length%sl.text.length){c=[];for(var u=0;u<sl.text.length;u++)c.push(l.splitLines(sl.text[u]))}for(var i=r.ranges.length-1,h;0<=i;i--){var m=r.ranges[i],g=m.from(),f=m.to();m.empty()&&(n&&0<n?g=V(g.line,g.ch-n):e.state.overwrite&&!d?f=V(f.line,s(R(l,f.line).text.length,f.ch+w(p).length)):sl&&sl.lineWise&&sl.text.join("\n")==t&&(g=f=V(g.line,0))),h=e.curOp.updateInput;var y={from:g,to:f,text:c?c[i%c.length]:p,origin:o||(d?"paste":e.state.cutIncoming?"cut":"+input")};jo(e.doc,y),It(e,"inputRead",e,y)}t&&!d&&di(e,t),rr(e),e.curOp.updateInput=h,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function li(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||wr(e,function(){return si(e,n,0,null,"paste")}),!0}function di(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1,o;0<=r;r--)if(o=n.ranges[r],!(100<o.head.ch||r&&n.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),s=!1;if(i.electricChars){for(var l=0;l<i.electricChars.length;l++)if(-1<t.indexOf(i.electricChars.charAt(l))){s=ai(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(R(e.doc,o.head.line).text.slice(0,o.head.ch))&&(s=ai(e,o.head.line,"smart"));s&&It(e,"electricInput",e,o.head.line)}}function pi(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var o=e.doc.sel.ranges[r].head.line,i={anchor:V(o,0),head:V(o+1,0)};n.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:n}}function ci(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function ui(){var e=c("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=c("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ii?e.style.width="1000px":e.setAttribute("wrap","off"),Pi&&(e.style.border="1px solid black"),ci(e),t}function hi(e,t,n,r,o){function i(){var r=t.line+n;return r<e.first||r>=e.first+e.size?!1:(t=new V(r,t.ch,t.sticky),p=R(e,r))}function s(r){var s;if(s=o?_a(e.cm,p,t,n):Ca(p,t,n),null!=s)t=s;else if(!r&&i())t=Ta(o,e.cm,p,t.line,n);else return!1;return!0}var l=t,d=n,p=R(e,t.line);if("char"==r)s();else if("column"==r)s(!0);else if("word"==r||"group"==r)for(var c=null,u="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),m=!0;;m=!1){if(0>n&&!s(!m))break;var g=p.text.charAt(t.ch)||"\n",f=I(g,h)?"w":u&&"\n"==g?"n":!u||/\s/.test(g)?null:"p";if(!u||m||f||(f="s"),c&&c!=f){0>n&&(n=1,s(),t.sticky="after");break}if(f&&(c=f),0<n&&!s(!m))break}var y=Bo(e,t,l,d,!0);return H(l,y)&&(y.hitSide=!0),y}function mi(e,t,n,r){var o=e.doc,i=t.left,d;if("page"==r){var p=s(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=l(p-.5*In(e.display),3);d=(0<n?t.bottom:t.top)+n*c}else"line"==r&&(d=0<n?t.bottom+3:t.top-3);for(var u;;){if(u=Sn(e,i,d),!u.outside)break;if(0>n?0>=d:d>=o.height){u.hitSide=!0;break}d+=5*n}return u}function gi(e,t){var n=tn(e,t.line);if(!n||n.hidden)return null;var r=R(e.doc,t.line),o=$t(n,r,t.line),i=Me(r,e.doc.direction),s="left";if(i){var l=Oe(i,t.ch);s=l%2?"right":"left"}var d=an(o.map,t.ch,s);return d.offset="right"==d.collapse?d.end:d.start,d}function fi(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function yi(e,t){return t&&(e.bad=!0),e}function bi(e,t,n,r,o){function i(e){return function(t){return t.id==e}}function s(){c&&(p+=u,h&&(p+=u),c=h=!1)}function l(e){e&&(s(),p+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void l(n);var p=t.getAttribute("cm-marker"),m;if(p){var g=e.findMarks(V(r,0),V(o+1,0),i(+p));return void(g.length&&(m=g[0].find(0))&&l(P(e.doc,m.from,m.to).join(u)))}if("false"==t.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;f&&s();for(var y=0;y<t.childNodes.length;y++)d(t.childNodes[y]);/^(pre|p)$/i.test(t.nodeName)&&(h=!0),f&&(c=!0)}else 3==t.nodeType&&l(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(var p="",c=!1,u=e.doc.lineSeparator(),h=!1;;){if(d(t),t==n)break;t=t.nextSibling,h=!1}return p}function xi(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return yi(e.clipPos(V(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0,i;o<e.display.view.length;o++)if(i=e.display.view[o],i.node==r)return vi(i,t,n)}function vi(e,t,n){function r(t,n,r){for(var o=-1,i;o<(c?c.length:0);o++){i=0>o?p.map:c[o];for(var s=0,l;s<i.length;s+=3)if(l=i[s+2],l==t||l==n){var d=U(0>o?e.line:e.rest[o]),u=i[s]+r;return(0>r||l!=t)&&(u=i[s+(r?1:0)]),V(d,u)}}}var o=e.text.firstChild,i=!1;if(!t||!h(o,t))return yi(V(U(e.line),0),!0);if(t==o&&(i=!0,t=o.childNodes[n],n=0,!t)){var s=e.rest?w(e.rest):e.line;return yi(V(U(s),s.text.length),i)}var l=3==t.nodeType?t:null,d=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,n&&(n=l.nodeValue.length));d.parentNode!=o;)d=d.parentNode;var p=e.measure,c=p.maps,u=r(l,d,n);if(u)return yi(u,i);for(var m=d.nextSibling,g=l?l.nodeValue.length-n:0;m;m=m.nextSibling){if(u=r(m,m.firstChild,0),u)return yi(V(u.line,u.ch-g),i);g+=m.textContent.length}for(var f=d.previousSibling,y=n;f;f=f.previousSibling){if(u=r(f,f.firstChild,-1),u)return yi(V(u.line,u.ch+y),i);y+=f.textContent.length}}var ki=navigator.userAgent,Si=navigator.platform,wi=/gecko\/\d/i.test(ki),Ci=/MSIE \d/.test(ki),Ti=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ki),_i=/Edge\/(\d+)/.exec(ki),Ei=Ci||Ti||_i,Ai=Ei&&(Ci?document.documentMode||6:+(_i||Ti)[1]),Ii=!_i&&/WebKit\//.test(ki),Ni=Ii&&/Qt\/\d+\.\d+/.test(ki),Li=!_i&&/Chrome\//.test(ki),Oi=/Opera\//.test(ki),Mi=/Apple Computer/.test(navigator.vendor),Di=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ki),Ri=/PhantomJS/.test(ki),Pi=!_i&&/AppleWebKit/.test(ki)&&/Mobile\/\w+/.test(ki),Bi=/Android/.test(ki),Fi=Pi||Bi||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ki),Ui=Pi||/Mac/.test(Si),zi=/\bCrOS\b/.test(ki),ji=/win/i.test(Si),qi=Oi&&ki.match(/Version\/(\d*\.\d*)/);qi&&(qi=+qi[1]),qi&&15<=qi&&(Oi=!1,Ii=!0);var Vi=Ui&&(Ni||Oi&&(null==qi||12.11>qi)),Wi=wi||Ei&&9<=Ai,Hi=function(t,n){var r=t.className,o=e(n).exec(r);if(o){var i=r.slice(o.index+o[0].length);t.className=r.slice(0,o.index)+(i?o[1]+i:"")}},Ki;Ki=document.createRange?function(e,t,n,o){var i=document.createRange();return i.setEnd(o||e,n),i.setStart(e,t),i}:function(e,t,n){var o=document.body.createTextRange();try{o.moveToElementText(e.parentNode)}catch(t){return o}return o.collapse(!0),o.moveEnd("character",n),o.moveStart("character",t),o};var Gi=function(e){e.select()};Pi?Gi=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Ei&&(Gi=function(e){try{e.select()}catch(e){}});var Xi=function(){this.id=null};Xi.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Qi=30,Yi={toString:function(){return"CodeMirror.Pass"}},Ji={scroll:!1},$i={origin:"*mouse"},Zi={origin:"+move"},es=[""],ts=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ns=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,rs=!1,os=!1,as=null,is=function(){function e(e){return 247>=e?n.charAt(e):1424<=e&&1524>=e?"R":1536<=e&&1785>=e?r.charAt(e-1536):1774<=e&&2220>=e?"r":8192<=e&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,s=/[LRr]/,l=/[Lb1n]/,d=/[1n]/;return function(n,r){var p="ltr"==r?"L":"R";if(0==n.length||"ltr"==r&&!o.test(n))return!1;for(var c=n.length,u=[],h=0;h<c;++h)u.push(e(n.charCodeAt(h)));for(var g=0,f=p,y;g<c;++g)y=u[g],"m"==y?u[g]=f:f=y;for(var b=0,x=p,v;b<c;++b)v=u[b],"1"==v&&"r"==x?u[b]="n":s.test(v)&&(x=v,"r"==v&&(u[b]="R"));for(var k=1,S=u[0],C;k<c-1;++k)C=u[k],"+"==C&&"1"==S&&"1"==u[k+1]?u[k]="1":","==C&&S==u[k+1]&&("1"==S||"n"==S)&&(u[k]=S),S=C;for(var T=0,_;T<c;++T)if(_=u[T],","==_)u[T]="N";else if("%"==_){var E=void 0;for(E=T+1;E<c&&"%"==u[E];++E);for(var A=T&&"!"==u[T-1]||E<c&&"1"==u[E]?"1":"N",I=T;I<E;++I)u[I]=A;T=E-1}for(var N=0,L=p,O;N<c;++N)O=u[N],"L"==L&&"1"==O?u[N]="L":s.test(O)&&(L=O);for(var M=0;M<c;++M)if(i.test(u[M])){var D=void 0;for(D=M+1;D<c&&i.test(u[D]);++D);for(var R="L"==(M?u[M-1]:p),P="L"==(D<c?u[D]:p),B=R==P?R?"L":"R":p,F=M;F<D;++F)u[F]=B;M=D-1}for(var U=[],z=0,j;z<c;)if(l.test(u[z])){var m=z;for(++z;z<c&&l.test(u[z]);++z);U.push(new t(0,m,z))}else{var q=z,V=U.length;for(++z;z<c&&"L"!=u[z];++z);for(var W=q;W<z;)if(d.test(u[W])){q<W&&U.splice(V,0,new t(1,q,W));var H=W;for(++W;W<z&&d.test(u[W]);++W);U.splice(V,0,new t(2,H,W)),q=W}else++W;q<z&&U.splice(V,0,new t(1,q,z))}return"ltr"==r&&(1==U[0].level&&(j=n.match(/^\s+/))&&(U[0].from=j[0].length,U.unshift(new t(0,0,j[0].length))),1==w(U).level&&(j=n.match(/\s+$/))&&(w(U).to-=j[0].length,U.push(new t(0,c-j[0].length,c)))),"rtl"==r?U.reverse():U}}(),ss=[],ls=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ss).concat(n)}},on=function(){if(Ei&&9>Ai)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e}(),ds=3=="\n\nb".split(/\n/).length?function(e){return e.split(/\r\n?|\n/)}:function(e){for(var t=0,n=[],r=e.length,o;t<=r;){o=e.indexOf("\n",t),-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),s=i.indexOf("\r");-1==s?(n.push(i),t=o+1):(n.push(i.slice(0,s)),t+=s+1)}return n},ps=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(t){}return t&&t.parentElement()==e&&0!=t.compareEndPoints("StartToEnd",t)},cs=function(){var t=c("div");return!!("oncopy"in t)||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),us=null,hs={},ms={},gs={},fs=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n},ys,bs;fs.prototype.eol=function(){return this.pos>=this.string.length},fs.prototype.sol=function(){return this.pos==this.lineStart},fs.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},fs.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},fs.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(n="string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},fs.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},fs.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},fs.prototype.skipToEnd=function(){this.pos=this.string.length},fs.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1<t)return this.pos=t,!0},fs.prototype.backUp=function(e){this.pos-=e},fs.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=v(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?v(this.string,this.lineStart,this.tabSize):0)},fs.prototype.indentation=function(){return v(this.string,null,this.tabSize)-(this.lineStart?v(this.string,this.lineStart,this.tabSize):0)},fs.prototype.match=function(e,t,n){if("string"==typeof e){var r=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(r(o)==r(e))return!1!==t&&(this.pos+=e.length),!0}else{var i=this.string.slice(this.pos).match(e);return i&&0<i.index?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}},fs.prototype.current=function(){return this.string.slice(this.start,this.pos)},fs.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},fs.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},fs.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var xs=function(e,t){this.state=e,this.lookAhead=t},vs=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};vs.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},vs.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},vs.prototype.nextLine=function(){this.line++,0<this.maxLookAhead&&this.maxLookAhead--},vs.fromSaved=function(e,t,n){return t instanceof xs?new vs(e,et(e.mode,t.state),n,t.lookAhead):new vs(e,et(e.mode,t),n)},vs.prototype.save=function(e){var t=!1===e?this.state:et(this.doc.mode,this.state);return 0<this.maxLookAhead?new xs(t,this.maxLookAhead):t};var ks=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n},Ss=function(e,t,n){this.text=e,ue(this,t),this.height=n?n(this):1};Ss.prototype.lineNo=function(){return U(this)},ze(Ss);var ws={},Cs={},Ts=null,_s=null,Es={left:0,right:0,top:0,bottom:0},As=function(e,t,n){this.cm=n;var r=this.vert=c("div",[c("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=c("div",[c("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),ls(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ls(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ei&&8>Ai&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},Is;As.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=l(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=l(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0<e.clientHeight&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},As.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},As.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},As.prototype.zeroWidthHack=function(){var e=Ui&&!Di?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Xi,this.disableVert=new Xi},As.prototype.enableZeroWidthBar=function(e,t,n){function r(){var o=e.getBoundingClientRect(),i="vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1);i==e?t.set(1e3,r):e.style.pointerEvents="none"}e.style.pointerEvents="auto",t.set(1e3,r)},As.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ns=function(){};Ns.prototype.update=function(){return{bottom:0,right:0}},Ns.prototype.setScrollLeft=function(){},Ns.prototype.setScrollTop=function(){},Ns.prototype.clear=function(){};var Ls={native:As,null:Ns},Os=0,Ms=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Qn(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Qt(e),this.force=n,this.dims=Ln(e),this.events=[]};Ms.prototype.signal=function(e,t){Ue(e,t)&&this.events.push(arguments)},Ms.prototype.finish=function(){for(var e=this,t=0;t<this.events.length;t++)Pe.apply(null,e.events[t])};var Ds=0,Rs=null;Ei?Rs=-.53:wi?Rs=15:Li?Rs=-.7:Mi&&(Rs=-1/3);var Ps=function(e,t){this.ranges=e,this.primIndex=t};Ps.prototype.primary=function(){return this.ranges[this.primIndex]},Ps.prototype.equals=function(e){var t=this;if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var n=0;n<this.ranges.length;n++){var r=t.ranges[n],o=e.ranges[n];if(!H(r.anchor,o.anchor)||!H(r.head,o.head))return!1}return!0},Ps.prototype.deepCopy=function(){for(var e=this,t=[],n=0;n<this.ranges.length;n++)t[n]=new Bs(K(e.ranges[n].anchor),K(e.ranges[n].head));return new Ps(t,this.primIndex)},Ps.prototype.somethingSelected=function(){for(var e=this,t=0;t<this.ranges.length;t++)if(!e.ranges[t].empty())return!0;return!1},Ps.prototype.contains=function(e,t){var n=this;t||(t=e);for(var r=0,o;r<this.ranges.length;r++)if(o=n.ranges[r],0<=W(t,o.from())&&0>=W(e,o.to()))return r;return-1};var Bs=function(e,t){this.anchor=e,this.head=t};Bs.prototype.from=function(){return X(this.anchor,this.head)},Bs.prototype.to=function(){return G(this.anchor,this.head)},Bs.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},$o.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=this,r=e,o;r<e+t;++r)o=n.lines[r],n.height-=o.height,gt(o),It(o,"delete");this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){var r=this;this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var o=0;o<t.length;++o)t[o].parent=r},iterN:function(t,r,n){for(var o=this,i=t+r;t<i;++t)if(n(o.lines[t]))return!0}},Zo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){var n=this;this.size-=t;for(var r=0;r<this.children.length;++r){var o=n.children[r],i=o.chunkSize();if(e<i){var l=s(t,i-e),d=o.height;if(o.removeInner(e,l),n.height-=d-o.height,i==l&&(n.children.splice(r--,1),o.parent=null),0==(t-=l))break;e=0}else e-=i}if(25>this.size-t&&(1<this.children.length||!(this.children[0]instanceof $o))){var p=[];this.collapse(p),this.children=[new $o(p)],this.children[0].parent=this}},collapse:function(e){for(var t=this,n=0;n<this.children.length;++n)t.children[n].collapse(e)},insertInner:function(e,t,n){var r=this;this.size+=t.length,this.height+=n;for(var o=0;o<this.children.length;++o){var i=r.children[o],s=i.chunkSize();if(e<=s){if(i.insertInner(e,t,n),i.lines&&50<i.lines.length){for(var l=i.lines.length%25+25,d=l,p;d<i.lines.length;)p=new $o(i.lines.slice(d,d+=25)),i.height-=p.height,r.children.splice(++o,0,p),p.parent=r;i.lines=i.lines.slice(0,l),r.maybeSpill()}break}e-=s}},maybeSpill:function(){if(!(10>=this.children.length)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Zo(t);if(!e.parent){var r=new Zo(e.children);r.parent=e,e.children=[r,n],e=r}else{e.size-=n.size,e.height-=n.height;var o=x(e.parent.children,e);e.parent.children.splice(o+1,0,n)}n.parent=e.parent}while(10<e.children.length);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=this,o=0;o<this.children.length;++o){var i=r.children[o],l=i.chunkSize();if(e<l){var d=s(t,l-e);if(i.iterN(e,d,n))return!0;if(0==(t-=d))break;e=0}else e-=l}}};var Fs=function(e,t,n){var r=this;if(n)for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o]);this.doc=e,this.node=t};Fs.prototype.clear=function(){var e=this,t=this.doc.cm,n=this.line.widgets,r=this.line,o=U(r);if(null!=o&&n){for(var s=0;s<n.length;++s)n[s]==e&&n.splice(s--,1);n.length||(r.widgets=null);var i=Vt(this);F(r,l(0,r.height-i)),t&&(wr(t,function(){ea(t,r,-i),Ar(t,o,"widget")}),It(t,"lineWidgetCleared",t,this,o))}},Fs.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var o=Vt(this)-t;o&&(F(r,r.height+o),n&&wr(n,function(){n.curOp.forceUpdate=!0,ea(n,r,o),It(n,"lineWidgetChanged",n,e,U(r))}))},ze(Fs);var Us=0,zs=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Us};zs.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,n=t&&!t.curOp;if(n&&gr(t),Ue(this,"clear")){var r=this.find();r&&It(this,"clear",r.from,r.to)}for(var o=null,s=null,l=0;l<this.lines.length;++l){var i=e.lines[l],d=ne(i.markedSpans,e);t&&!e.collapsed?Ar(t,U(i),"text"):t&&(null!=d.to&&(s=U(i)),null!=d.from&&(o=U(i))),i.markedSpans=re(i.markedSpans,d),null==d.from&&e.collapsed&&!_e(e.doc,i)&&t&&F(i,In(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var p=0;p<this.lines.length;++p){var c=ke(e.lines[p]),u=Ie(c);u>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=o&&t&&this.collapsed&&Er(t,o,s+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Do(t.doc)),t&&It(t,"markerCleared",t,this,o,s),n&&fr(t),this.parent&&this.parent.clear()}},zs.prototype.find=function(e,t){var n=this;null==e&&"bookmark"==this.type&&(e=1);for(var r=0,o,i;r<this.lines.length;++r){var s=n.lines[r],l=ne(s.markedSpans,n);if(null!=l.from&&(o=V(t?s:U(s),l.from),-1==e))return o;if(null!=l.to&&(i=V(t?s:U(s),l.to),1==e))return i}return o&&{from:o,to:i}},zs.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&wr(r,function(){var o=t.line,i=U(t.line),s=tn(r,i);if(s&&(pn(s),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!_e(n.doc,o)&&null!=n.height){var l=n.height;n.height=null;var d=Vt(n)-l;d&&F(o,o.height+d)}It(r,"markerChanged",r,e)})},zs.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=x(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},zs.prototype.detachLine=function(e){if(this.lines.splice(x(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ze(zs);var js=function(e,t){var n=this;this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=n};js.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)e.markers[t].clear();It(this,"clear")}},js.prototype.find=function(e,t){return this.primary.find(e,t)},ze(js);var qs=0,Vs=function e(t,n,r,o,i){if(!(this instanceof e))return new e(t,n,r,o,i);null==r&&(r=0),Zo.call(this,[new $o([new Ss("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var s=V(r,0);this.sel=Yr(s),this.history=new co(null),this.id=++qs,this.modeOption=n,this.lineSep=o,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),ao(this,{from:s,to:s,text:t}),Lo(this,Yr(s),Ji)};Vs.prototype=E(Zo.prototype,{constructor:Vs,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=B(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:_r(function(e){var t=V(this.first,0),n=this.first+this.size-1;jo(this,{from:t,to:V(n,R(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&or(this.cm,0,0),Lo(this,Yr(t),Ji)}),replaceRange:function(e,t,n,r){t=Y(this,t),n=n?Y(this,n):t,Go(this,e,t,n,r)},getRange:function(e,t,n){var r=P(this,Y(this,e),Y(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(j(this,e))return R(this,e)},getLineNumber:function(e){return U(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=R(this,e)),ke(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Y(this,e)},getCursor:function(e){var t=this.sel.primary(),n;return n=null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from(),n},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:_r(function(e,t,n){Ao(this,Y(this,"number"==typeof e?V(e,t||0):e),null,n)}),setSelection:_r(function(e,t,n){Ao(this,Y(this,e),Y(this,t||e),n)}),extendSelection:_r(function(e,t,n){To(this,Y(this,e),t&&Y(this,t),n)}),extendSelections:_r(function(e,t){_o(this,$(this,e),t)}),extendSelectionsBy:_r(function(e,t){var n=C(this.sel.ranges,e);_o(this,$(this,n),t)}),setSelections:_r(function(e,t,n){var r=this;if(e.length){for(var o=[],l=0;l<e.length;l++)o[l]=new Bs(Y(r,e[l].anchor),Y(r,e[l].head));null==t&&(t=s(e.length-1,this.sel.primIndex)),Lo(this,Qr(o,t),n)}}),addSelection:_r(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Bs(Y(this,e),Y(this,t||e))),Lo(this,Qr(r,r.length-1),n)}),getSelection:function(e){for(var t=this,n=this.sel.ranges,r=0,o,i;r<n.length;r++)i=P(t,n[r].from(),n[r].to()),o=o?o.concat(i):i;return!1===e?o:o.join(e||this.lineSeparator())},getSelections:function(e){for(var t=this,n=[],r=this.sel.ranges,o=0,i;o<r.length;o++)i=P(t,r[o].from(),r[o].to()),!1!==e&&(i=i.join(e||t.lineSeparator())),n[o]=i;return n},replaceSelection:function(e,t,n){for(var r=[],o=0;o<this.sel.ranges.length;o++)r[o]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:_r(function(e,t,n){for(var r=this,o=[],s=this.sel,l=0,i;l<s.ranges.length;l++)i=s.ranges[l],o[l]={from:i.from(),to:i.to(),text:r.splitLines(e[l]),origin:n};for(var d=t&&"end"!=t&&to(this,o,t),p=o.length-1;0<=p;p--)jo(r,o[p]);d?No(this,d):this.cm&&rr(this.cm)}),undo:_r(function(){Vo(this,"undo")}),redo:_r(function(){Vo(this,"redo")}),undoSelection:_r(function(){Vo(this,"undo",!0)}),redoSelection:_r(function(){Vo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new co(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:wo(this.history.done),undone:wo(this.history.undone)}},setHistory:function(e){var t=this.history=new co(this.history.maxGeneration);t.done=wo(e.done.slice(0),null,!0),t.undone=wo(e.undone.slice(0),null,!0)},setGutterMarker:_r(function(e,t,n){return Jo(this,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&N(r)&&(e.gutterMarkers=null),!0})}),clearGutter:_r(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Jo(t,n,"gutter",function(){return n.gutterMarkers[e]=null,N(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!j(this,e))return null;if(t=e,e=R(this,e),!e)return null}else if(t=U(e),null==t)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:_r(function(t,n,r){return Jo(this,t,"gutter"==n?"gutter":"class",function(t){var o="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass";if(!t[o])t[o]=r;else{if(e(r).test(t[o]))return!1;t[o]+=" "+r}return!0})}),removeLineClass:_r(function(t,n,r){return Jo(this,t,"gutter"==n?"gutter":"class",function(t){var o="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass",i=t[o];if(!i)return!1;if(null==r)t[o]=null;else{var s=i.match(e(r));if(!s)return!1;var l=s.index+s[0].length;t[o]=i.slice(0,s.index)+(s.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0})}),addLineWidget:_r(function(e,t,n){return ta(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return na(this,Y(this,e),Y(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Y(this,e),na(this,e,e,n,"bookmark")},findMarksAt:function(e){e=Y(this,e);var t=[],n=R(this,e.line).markedSpans;if(n)for(var r=0,o;r<n.length;++r)o=n[r],(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker);return t},findMarks:function(e,t,n){e=Y(this,e),t=Y(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,function(s){var l=s.markedSpans;if(l)for(var d=0,i;d<l.length;d++)i=l[d],null!=i.to&&o==e.line&&e.ch>=i.to||null==i.from&&o!=e.line||null!=i.from&&o==t.line&&i.from>=t.ch||n&&!n(i.marker)||r.push(i.marker.parent||i.marker);++o}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t=this.first,n=this.lineSeparator().length,r;return this.iter(function(o){var i=o.text.length+n;return i>e?(r=e,!0):void(e-=i,++t)}),Y(this,V(t,r))},indexFromPos:function(e){e=Y(this,e);var t=e.ch;if(e.line<this.first||0>e.ch)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new Vs(B(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Vs(B(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],aa(r,oa(this)),r},unlinkDoc:function(e){var t=this;if(e instanceof ri&&(e=e.doc),this.linked)for(var n=0,r;n<this.linked.length;++n)if(r=t.linked[n],r.doc==e){t.linked.splice(n,1),e.unlinkDoc(t),ia(oa(t));break}if(e.history==this.history){var o=[e.id];io(e,function(e){return o.push(e.id)},!0),e.history=new co(null),e.history.done=wo(this.history.done,o),e.history.undone=wo(this.history.undone,o)}},iterLinkedDocs:function(e){io(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):ds(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:_r(function(e){"rtl"!=e&&(e="ltr"),e==this.direction||(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&po(this.cm))})}),Vs.prototype.eachLine=Vs.prototype.iter;for(var Ws=0,Hs=!1,Ks={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Gs=0;10>Gs;Gs++)Ks[Gs+48]=Ks[Gs+96]=Gs+"";for(var Xs=65;90>=Xs;Xs++)Ks[Xs]=i(Xs);for(var Qs=1;12>=Qs;Qs++)Ks[Qs+111]=Ks[Qs+63235]="F"+Qs;var Ys={};Ys.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ys.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ys.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ys.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ys["default"]=Ui?Ys.macDefault:Ys.pcDefault;var Js={selectAll:Uo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ji)},killLine:function(e){return Sa(e,function(t){if(t.empty()){var n=R(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:V(t.head.line+1,0)}:{from:t.head,to:V(t.head.line,n)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Sa(e,function(t){return{from:V(t.from().line,0),to:Y(e.doc,V(t.to().line+1,0))}})},delLineLeft:function(e){return Sa(e,function(e){return{from:V(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return Sa(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return Sa(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(V(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(V(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Ea(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Ia(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Aa(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},Zi)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},Zi)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?Ia(e,t.head):r},Zi)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,o=0;o<n.length;o++){var i=n[o].from(),s=v(e.getLine(i.line),i.ch,r);t.push(S(r-s%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return wr(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var o=t[r].head,i=R(e.doc,o.line).text;if(i)if(o.ch==i.length&&(o=new V(o.line,o.ch-1)),0<o.ch)o=new V(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),V(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var s=R(e.doc,o.line-1).text;s&&(o=new V(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),V(o.line-1,s.length-1),o,"+transpose"))}n.push(new Bs(o,o))}e.setSelections(n)})},newlineAndIndent:function(e){return wr(e,function(){for(var t=e.listSelections(),n=t.length-1;0<=n;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);rr(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},$s=new Xi,Zs=null,el=function(e,t,n){this.time=e,this.pos=t,this.button=n};el.prototype.compare=function(e,t,n){return this.time+400>e&&0==W(t,this.pos)&&n==this.button};var tl={toString:function(){return"CodeMirror.Init"}},nl={},rl={},ol,al;ri.defaults=nl,ri.optionHandlers=rl;var il=[];ri.defineInitHook=function(e){return il.push(e)};var sl=null,ll=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Xi,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ll.prototype.init=function(e){function t(t){if(!Be(o,t)){if(o.somethingSelected())ii({lineWise:!1,text:o.getSelections()}),"cut"==t.type&&o.replaceSelection("",null,"cut");else{if(!o.options.lineWiseCopyCut)return;var e=pi(o);ii({lineWise:!0,text:e.text}),"cut"==t.type&&o.operation(function(){o.setSelections(e.ranges,0,Ji),o.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=sl.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=ui(),l=s.firstChild;o.display.lineSpace.insertBefore(s,o.display.lineSpace.firstChild),l.value=sl.text.join("\n");var d=document.activeElement;Gi(l),setTimeout(function(){o.display.lineSpace.removeChild(s),d.focus(),d==i&&r.showPrimarySelection()},50)}}var n=this,r=this,o=r.cm,i=r.div=e.lineDiv;ci(i,o.options.spellcheck),ls(i,"paste",function(t){Be(o,t)||li(t,o)||11>=Ai&&setTimeout(Cr(o,function(){return n.updateFromDOM()}),20)}),ls(i,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),ls(i,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),ls(i,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),ls(i,"touchstart",function(){return r.forceCompositionEnd()}),ls(i,"input",function(){n.composing||n.readFromDOMSoon()}),ls(i,"copy",t),ls(i,"cut",t)},ll.prototype.prepareSelection=function(){var e=Fn(this.cm,!1);return e.focus=this.cm.state.focused,e},ll.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},ll.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ll.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||o.line<t.display.viewFrom)return void e.removeAllRanges();var i=xi(t,e.anchorNode,e.anchorOffset),s=xi(t,e.focusNode,e.focusOffset);if(!i||i.bad||!s||s.bad||0!=W(X(i,s),r)||0!=W(G(i,s),o)){var l=t.display.view,d=r.line>=t.display.viewFrom&&gi(t,r)||{node:l[0].measure.map[2],offset:0},p=o.line<t.display.viewTo&&gi(t,o);if(!p){var c=l[l.length-1].measure,u=c.maps?c.maps[c.maps.length-1]:c.map;p={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}if(!d||!p)return void e.removeAllRanges();var h=e.rangeCount&&e.getRangeAt(0),m;try{m=Ki(d.node,d.offset,p.offset,p.node)}catch(t){}m&&(!wi&&t.state.focused?(e.collapse(d.node,d.offset),!m.collapsed&&(e.removeAllRanges(),e.addRange(m))):(e.removeAllRanges(),e.addRange(m)),h&&null==e.anchorNode?e.addRange(h):wi&&this.startGracePeriod()),this.rememberSelection()}},ll.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},ll.prototype.showMultipleSelections=function(e){p(this.cm.display.cursorDiv,e.cursors),p(this.cm.display.selectionDiv,e.selection)},ll.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ll.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return h(this.div,t)},ll.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(!this.selectionInEditor()&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ll.prototype.blur=function(){this.div.blur()},ll.prototype.getField=function(){return this.div},ll.prototype.supportsTouch=function(){return!0},ll.prototype.receivedFocus=function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():wr(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},ll.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ll.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(Bi&&Li&&this.cm.options.gutters.length&&fi(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:n}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=xi(t,e.anchorNode,e.anchorOffset),o=xi(t,e.focusNode,e.focusOffset);r&&o&&wr(t,function(){Lo(t.doc,Yr(r,o),Ji),(r.bad||o.bad)&&(t.curOp.selectionChanged=!0)})}}},ll.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),o=n.to();if(0==r.ch&&r.line>e.firstLine()&&(r=V(r.line-1,R(e.doc,r.line-1).length)),o.ch==R(e.doc,o.line).text.length&&o.line<e.lastLine()&&(o=V(o.line+1,0)),r.line<t.viewFrom||o.line>t.viewTo-1)return!1;var i,l,d;r.line==t.viewFrom||0==(i=Pn(e,r.line))?(l=U(t.view[0].line),d=t.view[0].node):(l=U(t.view[i].line),d=t.view[i-1].node.nextSibling);var p=Pn(e,o.line),c,u;if(p==t.view.length-1?(c=t.viewTo-1,u=t.lineDiv.lastChild):(c=U(t.view[p+1].line)-1,u=t.view[p+1].node.previousSibling),!d)return!1;for(var h=e.doc.splitLines(bi(e,d,u,l,c)),m=P(e.doc,V(l,0),V(c,R(e.doc,c).text.length));1<h.length&&1<m.length;)if(w(h)==w(m))h.pop(),m.pop(),c--;else if(h[0]==m[0])h.shift(),m.shift(),l++;else break;for(var g=0,f=0,y=h[0],b=m[0],x=s(y.length,b.length);g<x&&y.charCodeAt(g)==b.charCodeAt(g);)++g;for(var v=w(h),k=w(m),S=s(v.length-(1==h.length?g:0),k.length-(1==m.length?g:0));f<S&&v.charCodeAt(v.length-f-1)==k.charCodeAt(k.length-f-1);)++f;if(1==h.length&&1==m.length&&l==r.line)for(;g&&g>r.ch&&v.charCodeAt(v.length-f-1)==k.charCodeAt(k.length-f-1);)g--,f++;h[h.length-1]=v.slice(0,v.length-f).replace(/^\u200b+/,""),h[0]=h[0].slice(g).replace(/\u200b+$/,"");var C=V(l,g),T=V(c,m.length?w(m).length-f:0);if(1<h.length||h[0]||W(C,T))return Go(e.doc,h,C,T,"+input"),!0},ll.prototype.ensurePolled=function(){this.forceCompositionEnd()},ll.prototype.reset=function(){this.forceCompositionEnd()},ll.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ll.prototype.readFromDOMSoon=function(){var e=this;null!=this.readDOMTimeout||(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},ll.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&wr(this.cm,function(){return Er(e.cm)})},ll.prototype.setUneditable=function(e){e.contentEditable="false"},ll.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),!this.cm.isReadOnly()&&Cr(this.cm,si)(this.cm,i(null==t.charCode?t.keyCode:t.charCode),0))},ll.prototype.readOnlyChanged=function(e){this.div.contentEditable=("nocursor"!=e)+""},ll.prototype.onContextMenu=function(){},ll.prototype.resetPosition=function(){},ll.prototype.needsContentAttribute=!0;var dl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Xi,this.hasSelection=!1,this.composing=null};dl.prototype.init=function(t){function e(t){if(!Be(o,t)){if(o.somethingSelected())ii({lineWise:!1,text:o.getSelections()});else{if(!o.options.lineWiseCopyCut)return;var e=pi(o);ii({lineWise:!0,text:e.text}),"cut"==t.type?o.setSelections(e.ranges,null,Ji):(r.prevInput="",i.value=e.text.join("\n"),Gi(i))}"cut"==t.type&&(o.state.cutIncoming=!0)}}var n=this,r=this,o=this.cm;this.createField(t);var i=this.textarea;t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),Pi&&(i.style.width="0px"),ls(i,"input",function(){Ei&&9<=Ai&&n.hasSelection&&(n.hasSelection=null),r.poll()}),ls(i,"paste",function(t){Be(o,t)||li(t,o)||(o.state.pasteIncoming=!0,r.fastPoll())}),ls(i,"cut",e),ls(i,"copy",e),ls(t.scroller,"paste",function(n){Wt(t,n)||Be(o,n)||(o.state.pasteIncoming=!0,r.focus())}),ls(t.lineSpace,"selectstart",function(n){Wt(t,n)||je(n)}),ls(i,"compositionstart",function(){var e=o.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:o.markText(e,o.getCursor("to"),{className:"CodeMirror-composing"})}}),ls(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},dl.prototype.createField=function(){this.wrapper=ui(),this.textarea=this.wrapper.firstChild},dl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Fn(e);if(e.options.moveInputWithCursor){var o=xn(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),d=t.lineDiv.getBoundingClientRect();r.teTop=l(0,s(t.wrapper.clientHeight-10,o.top+d.top-i.top)),r.teLeft=l(0,s(t.wrapper.clientWidth-10,o.left+d.left-i.left))}return r},dl.prototype.showSelection=function(e){var t=this.cm,n=t.display;p(n.cursorDiv,e.cursors),p(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},dl.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Gi(this.textarea),Ei&&9<=Ai&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",Ei&&9<=Ai&&(this.hasSelection=null))}},dl.prototype.getField=function(){return this.textarea},dl.prototype.supportsTouch=function(){return!1},dl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Fi||m()!=this.textarea))try{this.textarea.focus()}catch(t){}},dl.prototype.blur=function(){this.textarea.blur()},dl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},dl.prototype.receivedFocus=function(){this.slowPoll()},dl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},dl.prototype.fastPoll=function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},dl.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||ps(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==r&&!t.somethingSelected())return!1;if(Ei&&9<=Ai&&this.hasSelection===o||Ui&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r="\u200B"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var d=0,p=s(r.length,o.length);d<p&&r.charCodeAt(d)==o.charCodeAt(d);)++d;return wr(t,function(){si(t,o.slice(d),r.length-d,null,e.composing?"*compose":null),1e3<o.length||-1<o.indexOf("\n")?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},dl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},dl.prototype.onKeyPress=function(){Ei&&9<=Ai&&(this.hasSelection=null),this.fastPoll()},dl.prototype.onContextMenu=function(t){function e(){if(null!=l.selectionStart){var e=o.somethingSelected(),t="\u200B"+(e?l.value:"");l.value="\u21DA",l.value=t,r.prevInput=e?"":"\u200B",l.selectionStart=1,l.selectionEnd=t.length,s.selForContextMenu=o.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=u,l.style.cssText=c,Ei&&9>Ai&&s.scrollbars.setScrollTop(s.scroller.scrollTop=d),null!=l.selectionStart){(!Ei||Ei&&9>Ai)&&e();var t=0,n=function e(){s.selForContextMenu==o.doc.sel&&0==l.selectionStart&&0<l.selectionEnd&&"\u200B"==r.prevInput?Cr(o,Uo)(o):10>t++?s.detectingSelectAll=setTimeout(e,500):(s.selForContextMenu=null,s.input.reset())};s.detectingSelectAll=setTimeout(n,200)}}var r=this,o=r.cm,s=o.display,l=r.textarea,i=Rn(o,t),d=s.scroller.scrollTop;if(i&&!Oi){var p=o.options.resetSelectionOnContextMenu;p&&-1==o.doc.sel.contains(i)&&Cr(o,Lo)(o.doc,Yr(i),Ji);var c=l.style.cssText,u=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var h=r.wrapper.getBoundingClientRect();l.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(Ei?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var m;if(Ii&&(m=window.scrollY),s.input.focus(),Ii&&window.scrollTo(null,m),s.input.reset(),o.somethingSelected()||(l.value=r.prevInput=" "),r.contextMenuPending=!0,s.selForContextMenu=o.doc.sel,clearTimeout(s.detectingSelectAll),Ei&&9<=Ai&&e(),Wi){We(t);var g=function e(){Re(window,"mouseup",e),setTimeout(n,20)};ls(window,"mouseup",g)}else setTimeout(n,50)}},dl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},dl.prototype.setUneditable=function(){},dl.prototype.needsContentAttribute=!1,function(e){function t(t,r,o,i){e.defaults[t]=r,o&&(n[t]=i?function(e,t,n){n!=tl&&o(e,t,n)}:o)}var n=e.optionHandlers;e.defineOption=t,e.Init=tl,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,no(e)},!0),t("indentUnit",2,no,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){ro(e),un(e),Er(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,!!t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var o=0,i;;){if(i=e.text.indexOf(t,o),-1==i)break;o=i+t.length,n.push(V(r,i))}r++});for(var o=n.length-1;0<=o;o--)Go(e.doc,t,n[o],V(n[o].line,n[o].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=tl&&e.refresh()}),t("specialCharPlaceholder",bt,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Fi?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!ji),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Za(e),ei(e)},!0),t("keyMap","default",function(e,t,n){var r=ka(t),o=n!=tl&&ka(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,ni,!0),t("gutters",[],function(e){Hr(e.options),ei(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?On(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return ur(e)},!0),t("scrollbarStyle","native",function(e){mr(e),ur(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Hr(e.options),ei(e)},!0),t("firstLineNumber",1,ei,!0),t("lineNumberFormatter",function(e){return e},ei,!0),t("showCursorWhenSelecting",!1,Bn,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Kn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,ti),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Bn,!0),t("singleCursorHeightPerLine",!0,Bn,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,ro,!0),t("addModeClass",!1,ro,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,ro,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(ri),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,o=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Cr(this,t[e])(this,n,o),Pe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](ka(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Tr(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");T(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},function(e){return e.priority}),this.state.modeGen++,Er(this)}),removeOverlay:Tr(function(e){for(var t=this,n=this.state.overlays,r=0,o;r<n.length;++r)if(o=n[r].modeSpec,o==e||"string"==typeof e&&o.name==e)return n.splice(r,1),t.state.modeGen++,void Er(t)}),indentLine:Tr(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(null==t?t=this.options.smartIndent?"smart":"prev":t=t?"add":"subtract"),j(this.doc,e)&&ai(this,e,t,n)}),indentSelection:Tr(function(e){for(var t=this,n=this.doc.sel.ranges,r=-1,o=0,i;o<n.length;o++)if(i=n[o],!i.empty()){var d=i.from(),p=i.to(),c=l(r,d.line);r=s(t.lastLine(),p.line-(p.ch?0:1))+1;for(var u=c;u<r;++u)ai(t,u,e);var h=t.doc.sel.ranges;0==d.ch&&n.length==h.length&&0<h[o].from().ch&&Eo(t.doc,o,new Bs(d,h[o].to()),Ji)}else i.head.line>r&&(ai(t,i.head.line,e,!0),r=i.head.line,o==t.doc.sel.primIndex&&rr(t))}),getTokenAt:function(e,t){return dt(this,e,t)},getLineTokens:function(e,t){return dt(this,V(e),t,!0)},getTokenTypeAt:function(e){e=Y(this.doc,e);var t=ot(this,R(this.doc,e.line)),n=0,r=(t.length-1)/2,o=e.ch,i;if(0==o)i=t[2];else for(;;){var s=n+r>>1;if((s?t[2*s-1]:0)>=o)r=s;else if(t[2*s+1]<o)n=s+1;else{i=t[2*s+2];break}}var l=i?i.indexOf("overlay "):-1;return 0>l?i:0==l?null:i.slice(0,l-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=this,o=[];if(!r.hasOwnProperty(t))return o;var s=r[t],l=this.getModeAt(e);if("string"==typeof l[t])s[l[t]]&&o.push(s[l[t]]);else if(l[t])for(var d=0,i;d<l[t].length;d++)i=s[l[t][d]],i&&o.push(i);else l.helperType&&s[l.helperType]?o.push(s[l.helperType]):s[l.name]&&o.push(s[l.name]);for(var p=0,c;p<s._global.length;p++)c=s._global[p],c.pred(l,n)&&-1==x(o,c.val)&&o.push(c.val);return o},getStateAfter:function(e,t){var n=this.doc;return e=Q(n,null==e?n.first+n.size-1:e),at(this,e+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary(),r;return r=null==e?n.head:"object"==typeof e?Y(this.doc,e):e?n.from():n.to(),xn(this,r,t||"page")},charCoords:function(e,t){return bn(this,Y(this.doc,e),t||"page")},coordsChar:function(e,t){return e=yn(this,e,t||"page"),Sn(this,e.left,e.top)},lineAtHeight:function(e,t){return e=yn(this,{top:e,left:0},t||"page").top,z(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r=!1,o;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,r=!0),o=R(this.doc,e)}else o=e;return fn(this,o,{top:0,left:0},t||"page",n||r).top+(r?this.doc.height-Ae(o):0)},defaultTextHeight:function(){return In(this.display)},defaultCharWidth:function(){return Nn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var i=this.display;e=xn(this,Y(this.doc,e));var s=e.bottom,d=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),i.sizer.appendChild(t),"over"==r)s=e.top;else if("above"==r||"near"==r){var p=l(i.wrapper.clientHeight,this.doc.height),c=l(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>p)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=p&&(s=e.bottom),d+t.offsetWidth>c&&(d=c-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==o?(d=i.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?d=0:"middle"==o&&(d=(i.sizer.clientWidth-t.offsetWidth)/2),t.style.left=d+"px"),n&&er(this,{left:d,top:s,right:d+t.offsetWidth,bottom:s+t.offsetHeight})},triggerOnKeyDown:Tr(Pa),triggerOnKeyPress:Tr(Ua),triggerOnKeyUp:Fa,triggerOnMouseDown:Tr(ja),execCommand:function(e){if(Js.hasOwnProperty(e))return Js[e].call(null,this)},triggerElectric:Tr(function(e){di(this,e)}),findPosH:function(e,t,n,r){var o=this,s=1;0>t&&(s=-1,t=-t);for(var l=Y(this.doc,e),d=0;d<t&&(l=hi(o.doc,l,s,n,r),!l.hitSide);++d);return l},moveH:Tr(function(e,t){var n=this;this.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?hi(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},Zi)}),deleteH:Tr(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Sa(this,function(n){var o=hi(r,n.head,e,t,!1);return 0>e?{from:o,to:n.head}:{from:n.head,to:o}})}),findPosV:function(e,t,n,r){var o=this,s=1,l=r;0>t&&(s=-1,t=-t);for(var d=Y(this.doc,e),p=0,i;p<t&&(i=xn(o,d,"div"),null==l?l=i.left:i.left=l,d=mi(o,i,s,n),!d.hitSide);++p);return d},moveV:Tr(function(e,t){var n=this,r=this.doc,o=[],s=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(i){if(s)return 0>e?i.from():i.to();var l=xn(n,i.head,"div");null!=i.goalColumn&&(l.left=i.goalColumn),o.push(l.left);var d=mi(n,l,e,t);return"page"==t&&i==r.sel.primary()&&nr(n,bn(n,d,"div").top-l.top),d},Zi),o.length)for(var l=0;l<r.sel.ranges.length;l++)r.sel.ranges[l].goalColumn=o[l]}),findWordAt:function(e){var t=this.doc,n=R(t,e.line).text,r=e.ch,o=e.ch;if(n){var i=this.getHelper(e,"wordChars");("before"==e.sticky||o==n.length)&&r?--r:++o;for(var s=n.charAt(r),l=I(s,i)?function(e){return I(e,i)}:/\s/.test(s)?function(e){return /\s/.test(e)}:function(e){return!/\s/.test(e)&&!I(e)};0<r&&l(n.charAt(r-1));)--r;for(;o<n.length&&l(n.charAt(o));)++o}return new Bs(V(e.line,r),V(e.line,o))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?g(this.display.cursorDiv,"CodeMirror-overwrite"):Hi(this.display.cursorDiv,"CodeMirror-overwrite"),Pe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==m()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Tr(function(e,t){or(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Xt(this)-this.display.barHeight,width:e.scrollWidth-Xt(this)-this.display.barWidth,clientHeight:Yt(this),clientWidth:Qt(this)}},scrollIntoView:Tr(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:V(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null==e.from.line?sr(this,e.from,e.to,e.margin):ar(this,e)}),setSize:Tr(function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(e+"")?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&cn(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Ar(n,o,"widget");break}++o}),this.curOp.forceUpdate=!0,Pe(this,"refresh",this)}),operation:function(e){return wr(this,e)},startOperation:function(){return gr(this)},endOperation:function(){return fr(this)},refresh:Tr(function(){var e=this.display.cachedTextHeight;Er(this),this.curOp.forceUpdate=!0,un(this),or(this,this.doc.scrollLeft,this.doc.scrollTop),qr(this),(null==e||.5<n(e-In(this.display)))&&Dn(this),Pe(this,"refresh",this)}),swapDoc:Tr(function(e){var t=this.doc;return t.cm=null,so(this,e),un(this),this.display.input.reset(),or(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,It(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ze(e),e.registerHelper=function(t,n,o){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=o},e.registerGlobalHelper=function(t,n,o,i){e.registerHelper(t,n,i),r[t]._global.push({pred:o,val:i})}}(ri);var pl=["iter","insert","remove","copy","getEditor","constructor"];for(var cl in Vs.prototype)Vs.prototype.hasOwnProperty(cl)&&0>x(pl,cl)&&(ri.prototype[cl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Vs.prototype[cl]));return ze(Vs),ri.inputStyles={textarea:dl,contenteditable:ll},ri.defineMode=function(e){ri.defaults.mode||"null"==e||(ri.defaults.mode=e),Ye.apply(this,arguments)},ri.defineMIME=function(e,t){ms[e]=t},ri.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ri.defineMIME("text/plain","null"),ri.defineExtension=function(e,t){ri.prototype[e]=t},ri.defineDocExtension=function(e,t){Vs.prototype[e]=t},ri.fromTextArea=function(e,t){function n(){e.value=l.getValue()}if(t=t?b(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=m();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}var o;if(e.form&&(ls(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var s=i.submit=function(){n(),i.submit=o,i.submit(),i.submit=s}}catch(t){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(Re(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=o))}},e.style.display="none";var l=ri(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return l},function(e){e.off=Re,e.on=ls,e.wheelEventPixels=Gr,e.Doc=Vs,e.splitLines=ds,e.countColumn=v,e.findColumn=k,e.isWordChar=A,e.Pass=Yi,e.signal=Pe,e.Line=Ss,e.changeEnd=Jr,e.scrollbarModel=Ls,e.Pos=V,e.cmpPos=W,e.modes=hs,e.mimeModes=ms,e.resolveMode=Je,e.getMode=$e,e.modeExtensions=gs,e.extendMode=Ze,e.copyState=et,e.startState=nt,e.innerMode=tt,e.commands=Js,e.keyMap=Ys,e.keyName=va,e.isModifierKey=ba,e.lookupKey=ya,e.normalizeKeyMap=fa,e.StringStream=fs,e.SharedTextMarker=js,e.TextMarker=zs,e.LineWidget=Fs,e.e_preventDefault=je,e.e_stopPropagation=qe,e.e_stop=We,e.addClass=g,e.contains=h,e.rmClass=Hi,e.keyNames=Ks}(ri),ri.version="5.38.0",ri})},tbG5:function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1),r;t.length;)if(r=t.shift(),r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var o in r)n(r,o)&&(e[o]=r[o])}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,r,o){if(t.subarray&&e.subarray)return void e.set(t.subarray(n,n+r),o);for(var s=0;s<r;s++)e[o+s]=t[n+s]},flattenChunks:function(e){var t,n,r,o,i,s;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(s=new Uint8Array(r),o=0,(t=0,n=e.length);t<n;t++)i=e[t],s.set(i,o),o+=i.length;return s}},i={arraySet:function(e,t,n,r,o){for(var s=0;s<r;s++)e[o+s]=t[n+s]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,i))},t.setTyped(r)},tzeh:function(e,t,n){"use strict";t=e.exports=n("DHrQ"),t.Stream=t,t.Readable=t,t.Writable=n("WSyY"),t.Duplex=n("Hba+"),t.Transform=n("7tlB"),t.PassThrough=n("nwyA")},uQIK:function(e,t,n){"use strict";(function(e){e(n("tQq4"))})(function(e){function t(e,t,r){var o=e.getLineHandle(t.line),i=t.ch-1,d=r&&r.afterCursor;null==d&&(d=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var p=!d&&0<=i&&l[o.text.charAt(i)]||l[o.text.charAt(++i)];if(!p)return null;var c=">"==p.charAt(1)?1:-1;if(r&&r.strict&&0<c!=(i==t.ch))return null;var u=e.getTokenTypeAt(s(t.line,i+1)),h=n(e,s(t.line,i+(0<c?1:0)),c,u||null,r);return null==h?null:{from:s(t.line,i),to:h&&h.pos,match:h&&h.ch==p.charAt(0),forward:0<c}}function n(e,t,n,r,o){for(var i=o&&o.maxScanLineLength||1e4,d=o&&o.maxScanLines||1e3,p=[],c=o&&o.bracketRegex?o.bracketRegex:/[(){}[\]]/,u=0<n?Math.min(t.line+d,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-d),h=t.line,m;h!=u;h+=n)if(m=e.getLine(h),m){var g=0<n?0:m.length-1,f=0<n?m.length:-1;if(!(m.length>i))for(h==t.line&&(g=t.ch-(0>n?1:0));g!=f;g+=n){var y=m.charAt(g);if(c.test(y)&&(void 0===r||e.getTokenTypeAt(s(h,g+1))==r)){var b=l[y];if(">"==b.charAt(1)==0<n)p.push(y);else{if(!p.length)return{pos:s(h,g),ch:y};p.pop()}}}}return h-n!=(0<n?e.lastLine():e.firstLine())&&null}function r(e,n,r){for(var o=e.state.matchBrackets.maxHighlightLineLength||1e3,l=[],d=e.listSelections(),p=0,c;p<d.length;p++)if(c=d[p].empty()&&t(e,d[p].head,r),c&&e.getLine(c.from.line).length<=o){var u=c.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(c.from,s(c.from.line,c.from.ch+1),{className:u})),c.to&&e.getLine(c.to.line).length<=o&&l.push(e.markText(c.to,s(c.to.line,c.to.ch+1),{className:u}))}if(l.length){i&&e.state.focused&&e.focus();var h=function(){e.operation(function(){for(var e=0;e<l.length;e++)l[e].clear()})};if(n)setTimeout(h,800);else return h}}function o(e){e.operation(function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=r(e,!1,e.state.matchBrackets)})}var i=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||8>document.documentMode),s=e.Pos,l={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",o),t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",o))}),e.defineExtension("matchBrackets",function(){r(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,r){return(r||"boolean"==typeof n)&&(r?(r.strict=n,n=r):n=n?{strict:!0}:null),t(this,e,n)}),e.defineExtension("scanForBracket",function(e,t,r,o){return n(this,e,t,r,o)})})},uUPe:function(e,t,n){"use strict";(function(t){function n(){c=!0;for(var e=p.length,t,n;e;){for(n=p,p=[],t=-1;++t<e;)n[t]();e=p.length}c=!1}var r=t.MutationObserver||t.WebKitMutationObserver,o;if(r){var i=0,s=new r(n),l=t.document.createTextNode("");s.observe(l,{characterData:!0}),o=function(){l.data=i=++i%2}}else if(!t.setImmediate&&"undefined"!=typeof t.MessageChannel){var d=new t.MessageChannel;d.port1.onmessage=n,o=function(){d.port2.postMessage(0)}}else o="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){n(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(n,0)};var p=[],c;e.exports=function(e){1!==p.push(e)||c||o()}}).call(t,n("h6ac"))},untT:function(e,t,n){"use strict";if(t.base64=!0,t.array=!0,t.string=!0,t.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,t.nodebuffer="undefined"!=typeof Buffer,t.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)t.blob=!1;else{var r=new ArrayBuffer(0);try{t.blob=0===new Blob([r],{type:"application/zip"}).size}catch(n){try{var o=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,i=new o;i.append(r),t.blob=0===i.getBlob("application/zip").size}catch(n){t.blob=!1}}}try{t.nodestream=!!n("fOjT").Readable}catch(n){t.nodestream=!1}},uxo6:function(e){"use strict";e.exports=function(e,t,r,o){for(var i=0|65535&e,s=0|65535&e>>>16,l=0;0!==r;){l=2e3<r?2e3:r,r-=l;do i=0|i+t[o++],s=0|s+i;while(--l);i%=65521,s%=65521}return 0|(i|s<<16)}},vCxL:function(e,t){"use strict";function n(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function r(t,o){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var s=n.call(t),i=[],l,r;try{for(;(void 0===o||0<o--)&&!(l=s.next()).done;)i.push(l.value)}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=s["return"])&&n.call(s)}finally{if(r)throw r.error}}return i}function i(e){return this instanceof i?(this.v=e,this):new i(e)}t.__esModule=!0,t.__extends=function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t.__rest=function(n,r){var e={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&0>r.indexOf(t)&&(e[t]=n[t]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,t=Object.getOwnPropertySymbols(n);o<t.length;o++)0>r.indexOf(t[o])&&(e[t[o]]=n[t[o]]);return e},t.__decorate=function(e,t,n,o){var s=arguments.length,l=3>s?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o,r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,o);else for(var d=e.length-1;0<=d;d--)(r=e[d])&&(l=(3>s?r(l):3<s?r(t,n,l):r(t,n))||l);return 3<s&&l&&Object.defineProperty(t,n,l),l},t.__param=function(e,t){return function(n,r){t(n,r,e)}},t.__metadata=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},t.__awaiter=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{d(r.next(e))}catch(t){i(t)}}function l(e){try{d(r["throw"](e))}catch(t){i(t)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,l)}d((r=r.apply(e,t||[])).next())})},t.__generator=function(e,n){function r(e){return function(t){return o([e,t])}}function o(r){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,l&&(d=l[2&r[0]?"return":r[0]?"throw":"next"])&&!(d=d.call(l,r[1])).done)return d;switch((l=0,d)&&(r=[0,d.value]),r[0]){case 0:case 1:d=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,l=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if((d=i.trys,!(d=0<d.length&&d[d.length-1]))&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!d||r[1]>d[0]&&r[1]<d[3])){i.label=r[1];break}if(6===r[0]&&i.label<d[1]){i.label=d[1],d=r;break}if(d&&i.label<d[2]){i.label=d[2],i.ops.push(r);break}d[2]&&i.ops.pop(),i.trys.pop();continue;}r=n.call(e,i)}catch(t){r=[6,t],l=0}finally{s=d=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]},s,l,d,p;return p={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(p[Symbol.iterator]=function(){return this}),p},t.__exportStar=function(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])},t.__values=n,t.__read=r,t.__spread=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e},t.__await=i,t.__asyncGenerator=function(e,t,n){function r(e){c[e]&&(h[e]=function(t){return new Promise(function(n,r){1<u.push([e,t,n,r])||o(e,t)})})}function o(e,t){try{s(c[e](t))}catch(t){p(u[0][3],t)}}function s(e){e.value instanceof i?Promise.resolve(e.value.v).then(l,d):p(u[0][2],e)}function l(e){o("next",e)}function d(e){o("throw",e)}function p(e,t){(e(t),u.shift(),u.length)&&o(u[0][0],u[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=n.apply(e,t||[]),u=[],h;return h={},r("next"),r("throw"),r("return"),h[Symbol.asyncIterator]=function(){return this},h},t.__asyncDelegator=function(e){function t(t,n){e[t]&&(r[t]=function(r){return(o=!o)?{value:i(e[t](r)),done:"return"===t}:n?n(r):r})}var r,o;return r={},t("next"),t("throw",function(t){throw t}),t("return"),r[Symbol.iterator]=function(){return this},r},t.__asyncValues=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"==typeof n?n(e):e[Symbol.iterator]()},t.__makeTemplateObject=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},t.__importStar=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},t.__importDefault=function(e){return e&&e.__esModule?e:{default:e}};var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},s=t.__assign=Object.assign||function(e){for(var t=1,r=arguments.length,n;t<r;t++)for(var o in n=arguments[t],n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}},vexR:function(e){"use strict";e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},wGjj:function(e,t,n){"use strict";var r=Math.min;(function(e){function t(){}function o(e,t){return function(){e.apply(t,arguments)}}function s(e){if(!(this instanceof s))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(e,this)}function l(e,t){for(;3===e._state;)e=e._value;return 0===e._state?void e._deferreds.push(t):void(e._handled=!0,s._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._state?d:p)(t.promise,e._value);var r;try{r=n(e._value)}catch(n){return void p(t.promise,n)}d(t.promise,r)}))}function d(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof s)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(o(n,e),t)}t._state=1,t._value=e,c(t)}catch(n){p(t,n)}}function p(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&s._immediateFn(function(){e._handled||s._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)l(e,e._deferreds[t]);e._deferreds=null}function u(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function h(e,t){var n=!1;try{e(function(e){n||(n=!0,d(t,e))},function(e){n||(n=!0,p(t,e))})}catch(e){if(n)return;n=!0,p(t,e)}}function m(e,t){return t={exports:{}},e(t,t.exports),t.exports}n("MCp7");var g=setTimeout;s.prototype["catch"]=function(e){return this.then(null,e)},s.prototype.then=function(e,n){var r=new this.constructor(t);return l(this,new u(e,n,r)),r},s.prototype["finally"]=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})},s.all=function(e){return new s(function(t,n){function r(e,i){try{if(i&&("object"==typeof i||"function"==typeof i)){var l=i.then;if("function"==typeof l)return void l.call(i,function(t){r(e,t)},n)}o[e]=i,0==--s&&t(o)}catch(e){n(e)}}if(!e||"undefined"==typeof e.length)throw new TypeError("Promise.all accepts an array");var o=Array.prototype.slice.call(e);if(0===o.length)return t([]);for(var s=o.length,l=0;l<o.length;l++)r(l,o[l])})},s.resolve=function(e){return e&&"object"==typeof e&&e.constructor===s?e:new s(function(t){t(e)})},s.reject=function(e){return new s(function(t,n){n(e)})},s.race=function(e){return new s(function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)})},s._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){g(e,0)},s._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var y=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof e)return e;throw new Error("unable to locate global object")}();y.Promise||(y.Promise=s);var b=m(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),x=m(function(e){var t=e.exports={version:"2.5.5"};"number"==typeof __e&&(__e=t)}),v=x.version,w=function(e){return"object"==typeof e?null!==e:"function"==typeof e},S=function(e){if(!w(e))throw TypeError(e+" is not an object!");return e},C=function(e){try{return!!e()}catch(t){return!0}},T=!C(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),_=b.document,E=w(_)&&w(_.createElement),A=function(e){return E?_.createElement(e):{}},I=!T&&!C(function(){return 7!=Object.defineProperty(A("div"),"a",{get:function(){return 7}}).a}),N=function(e,t){if(!w(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!w(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!w(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!w(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},L=Object.defineProperty,O=T?Object.defineProperty:function(e,t,n){if(S(e),t=N(t,!0),S(n),I)try{return L(e,t,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e},M={f:O},R=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},D=T?function(e,t,n){return M.f(e,t,R(1,n))}:function(e,t,n){return e[t]=n,e},P={}.hasOwnProperty,B=function(e,t){return P.call(e,t)},F=0,U=Math.random(),z=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++F+U).toString(36))},q=m(function(e){var t=z("src"),n="toString",r=Function[n],o=(""+r).split(n);x.inspectSource=function(e){return r.call(e)},(e.exports=function(e,n,r,i){var s="function"==typeof r;s&&(B(r,"name")||D(r,"name",n)),e[n]===r||(s&&(B(r,t)||D(r,t,e[n]?""+e[n]:o.join(n+""))),e===b?e[n]=r:i?e[n]?e[n]=r:D(e,n,r):(delete e[n],D(e,n,r)))})(Function.prototype,n,function(){return"function"==typeof this&&this[t]||r.call(this)})}),V=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},W=function(e,t,n){return(V(e),void 0===t)?e:1===n?function(n){return e.call(t,n)}:2===n?function(n,r){return e.call(t,n,r)}:3===n?function(n,r,o){return e.call(t,n,r,o)}:function(){return e.apply(t,arguments)}},H="prototype",K=function e(t,n,r){var o=t&e.F,i=t&e.G,s=t&e.S,l=t&e.P,d=t&e.B,p=i?b:s?b[n]||(b[n]={}):(b[n]||{})[H],c=i?x:x[n]||(x[n]={}),u=c[H]||(c[H]={}),h,m,g,f;for(h in i&&(r=n),r)m=!o&&p&&void 0!==p[h],g=(m?p:r)[h],f=d&&m?W(g,b):l&&"function"==typeof g?W(Function.call,g):g,p&&q(p,h,g,t&e.U),c[h]!=g&&D(c,h,f),l&&u[h]!=g&&(u[h]=g)};b.core=x,K.F=1,K.G=2,K.S=4,K.P=8,K.B=16,K.W=32,K.U=64,K.R=128;var G=K,X={}.toString,Q=function(e){return X.call(e).slice(8,-1)},Y=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==Q(e)?e.split(""):Object(e)},J=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e},$=function(e){return Object(J(e))},Z=Math.ceil,ee=Math.floor,te=function(e){return isNaN(e=+e)?0:(0<e?ee:Z)(e)},ne=function(e){return 0<e?r(te(e),9007199254740991):0},re=Array.isArray||function(e){return"Array"==Q(e)},oe="__core-js_shared__",ae=b[oe]||(b[oe]={}),ie=function(e){return ae[e]||(ae[e]={})},se=m(function(e){var t=ie("wks"),n=b.Symbol,r="function"==typeof n,o=e.exports=function(e){return t[e]||(t[e]=r&&n[e]||(r?n:z)("Symbol."+e))};o.store=t}),le=se("species"),de=function(e){var t;return re(e)&&(t=e.constructor,"function"==typeof t&&(t===Array||re(t.prototype))&&(t=void 0),w(t)&&(t=t[le],null===t&&(t=void 0))),void 0===t?Array:t},pe=function(e,t){return new(de(e))(t)},ce=function(e,t){var n=1==e,r=4==e,o=6==e,i=t||pe;return function(t,s,l){for(var d=$(t),p=Y(d),c=W(s,l,3),u=ne(p.length),h=0,m=n?i(t,u):2==e?i(t,0):void 0,g,f;u>h;h++)if((5==e||o||h in p)&&(g=p[h],f=c(g,h,d),e))if(n)m[h]=f;else if(f)switch(e){case 3:return!0;case 5:return g;case 6:return h;case 2:m.push(g);}else if(r)return!1;return o?-1:3==e||r?r:m}},ue=se("unscopables"),he=Array.prototype;void 0==he[ue]&&D(he,ue,{});var me=function(e){he[ue][e]=!0},ge=ce(5),fe="find",ye=!0;fe in[]&&[,][fe](function(){ye=!1}),G(G.P+G.F*ye,"Array",{find:function(e){return ge(this,e,1<arguments.length?arguments[1]:void 0)}}),me(fe);var be=x.Array.find,xe=ce(6),ve="findIndex",ke=!0;ve in[]&&[,][ve](function(){ke=!1}),G(G.P+G.F*ke,"Array",{findIndex:function(e){return xe(this,e,1<arguments.length?arguments[1]:void 0)}}),me(ve);var Se=x.Array.findIndex,we=function(e){return Y(J(e))},Ce=Math.max,Te=function(e,t){return e=te(e),0>e?Ce(e+t,0):r(e,t)},_e=ie("keys"),Ee=function(e){return _e[e]||(_e[e]=z(e))},Ae=function(e){return function(t,n,r){var o=we(t),i=ne(o.length),s=Te(r,i),l;if(e&&n!=n){for(;i>s;)if(l=o[s++],l!=l)return!0;}else for(;i>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}}(!1),Ie=Ee("IE_PROTO"),Ne=function(e,t){var n=we(e),r=0,o=[],i;for(i in n)i!=Ie&&B(n,i)&&o.push(i);for(;t.length>r;)B(n,i=t[r++])&&(~Ae(o,i)||o.push(i));return o},Le=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Oe=Object.keys||function(e){return Ne(e,Le)},Me=Object.getOwnPropertySymbols,De={f:Me},Re={}.propertyIsEnumerable,Pe={f:Re},Be=Object.assign,Fe=!Be||C(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=Be({},e)[n]||Object.keys(Be({},t)).join("")!=r})?function(e){for(var t=$(e),n=arguments.length,r=1,o=De.f,i=Pe.f;n>r;)for(var s=Y(arguments[r++]),l=o?Oe(s).concat(o(s)):Oe(s),d=l.length,p=0,c;d>p;)i.call(s,c=l[p++])&&(t[c]=s[c]);return t}:Be;G(G.S+G.F,"Object",{assign:Fe});var Ue=x.Object.assign,ze=se("match"),je=function(e){var t;return w(e)&&(void 0===(t=e[ze])?"RegExp"==Q(e):!!t)},qe=function(e,t,n){if(je(t))throw TypeError("String#"+n+" doesn't accept regex!");return J(e)+""},Ve=se("match"),We="startsWith",He=""[We];G(G.P+G.F*function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Ve]=!1,!"/./"[e](t)}catch(e){}}return!0}(We),"String",{startsWith:function(e){var t=qe(this,e,We),n=ne(r(1<arguments.length?arguments[1]:void 0,t.length)),o=e+"";return t.slice(n,n+o.length)===o}});var Ke=x.String.startsWith;G(G.P,"String",{repeat:function(e){var t=J(this)+"",r="",o=te(e);if(0>o||o==Infinity)throw RangeError("Count can't be negative");for(;0<o;(o>>>=1)&&(t+=t))1&o&&(r+=t);return r}});var Ge=x.String.repeat,Xe=m(function(e){var t=z("meta"),n=M.f,r=0,o=Object.isExtensible||function(){return!0},i=!C(function(){return o(Object.preventExtensions({}))}),s=function(e){n(e,t,{value:{i:"O"+ ++r,w:{}}})},l=e.exports={KEY:t,NEED:!1,fastKey:function(e,n){if(!w(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!B(e,t)){if(!o(e))return"F";if(!n)return"E";s(e)}return e[t].i},getWeak:function(e,n){if(!B(e,t)){if(!o(e))return!0;if(!n)return!1;s(e)}return e[t].w},onFreeze:function(e){return i&&l.NEED&&o(e)&&!B(e,t)&&s(e),e}}}),Qe=Xe.KEY,Ye=Xe.NEED,Je=Xe.fastKey,$e=Xe.getWeak,Ze=Xe.onFreeze,et=M.f,tt=se("toStringTag"),nt=function(e,t,n){e&&!B(e=n?e:e.prototype,tt)&&et(e,tt,{configurable:!0,value:t})},rt={f:se},ot=!1,at=M.f,it=function(e){var t=x.Symbol||(x.Symbol=b.Symbol||{});"_"==e.charAt(0)||e in t||at(t,e,{value:rt.f(e)})},st=function(e){var t=Oe(e),n=De.f;if(n)for(var r=n(e),o=Pe.f,s=0,i;r.length>s;)o.call(e,i=r[s++])&&t.push(i);return t},lt=T?Object.defineProperties:function(e,t){S(e);for(var n=Oe(t),r=n.length,o=0,i;r>o;)M.f(e,i=n[o++],t[i]);return e},dt=b.document,pt=dt&&dt.documentElement,ct=Ee("IE_PROTO"),ut=function(){},ht="prototype",mt=function(){var e=A("iframe"),t=Le.length,n="<",r=">",o;for(e.style.display="none",pt.appendChild(e),e.src="javascript:",o=e.contentWindow.document,o.open(),o.write(n+"script"+r+"document.F=Object"+n+"/script"+r),o.close(),mt=o.F;t--;)delete mt[ht][Le[t]];return mt()},gt=Object.create||function(e,t){var n;return null===e?n=mt():(ut[ht]=S(e),n=new ut,ut[ht]=null,n[ct]=e),void 0===t?n:lt(n,t)},ft=Le.concat("length","prototype"),yt=Object.getOwnPropertyNames||function(e){return Ne(e,ft)},bt={f:yt},xt=bt.f,vt={}.toString,kt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],St=function(e){try{return xt(e)}catch(t){return kt.slice()}},wt={f:function(e){return kt&&"[object Window]"==vt.call(e)?St(e):xt(we(e))}},Ct=Object.getOwnPropertyDescriptor,Tt=T?Ct:function(e,t){if(e=we(e),t=N(t,!0),I)try{return Ct(e,t)}catch(t){}return B(e,t)?R(!Pe.f.call(e,t),e[t]):void 0},_t={f:Tt},Et=Xe.KEY,At=_t.f,It=M.f,Nt=wt.f,Lt=b.Symbol,Ot=b.JSON,Mt=Ot&&Ot.stringify,Dt="prototype",Rt=se("_hidden"),Pt=se("toPrimitive"),Bt={}.propertyIsEnumerable,Ft=ie("symbol-registry"),Ut=ie("symbols"),zt=ie("op-symbols"),jt=Object[Dt],qt="function"==typeof Lt,Vt=b.QObject,Wt=!Vt||!Vt[Dt]||!Vt[Dt].findChild,Ht=T&&C(function(){return 7!=gt(It({},"a",{get:function(){return It(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=At(jt,t);r&&delete jt[t],It(e,t,n),r&&e!==jt&&It(jt,t,r)}:It,Kt=function(e){var t=Ut[e]=gt(Lt[Dt]);return t._k=e,t},Gt=qt&&"symbol"==typeof Lt.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof Lt},Xt=function(e,t,n){return e===jt&&Xt(zt,t,n),S(e),t=N(t,!0),S(n),B(Ut,t)?(n.enumerable?(B(e,Rt)&&e[Rt][t]&&(e[Rt][t]=!1),n=gt(n,{enumerable:R(0,!1)})):(!B(e,Rt)&&It(e,Rt,R(1,{})),e[Rt][t]=!0),Ht(e,t,n)):It(e,t,n)},Qt=function(e,t){S(e);for(var n=st(t=we(t)),r=0,o=n.length,i;o>r;)Xt(e,i=n[r++],t[i]);return e},Yt=function(e){var t=Bt.call(this,e=N(e,!0));return this===jt&&B(Ut,e)&&!B(zt,e)?!1:t||!B(this,e)||!B(Ut,e)||B(this,Rt)&&this[Rt][e]?t:!0},Jt=function(e,t){if(e=we(e),t=N(t,!0),e!==jt||!B(Ut,t)||B(zt,t)){var n=At(e,t);return n&&B(Ut,t)&&!(B(e,Rt)&&e[Rt][t])&&(n.enumerable=!0),n}},$t=function(e){for(var t=Nt(we(e)),n=[],r=0,o;t.length>r;)B(Ut,o=t[r++])||o==Rt||o==Et||n.push(o);return n},Zt=function(e){for(var t=e===jt,n=Nt(t?zt:we(e)),r=[],o=0,i;n.length>o;)B(Ut,i=n[o++])&&(!t||B(jt,i))&&r.push(Ut[i]);return r};qt||(Lt=function(){if(this instanceof Lt)throw TypeError("Symbol is not a constructor!");var e=z(0<arguments.length?arguments[0]:void 0);return T&&Wt&&Ht(jt,e,{configurable:!0,set:function t(n){this===jt&&t.call(zt,n),B(this,Rt)&&B(this[Rt],e)&&(this[Rt][e]=!1),Ht(this,e,R(1,n))}}),Kt(e)},q(Lt[Dt],"toString",function(){return this._k}),_t.f=Jt,M.f=Xt,bt.f=wt.f=$t,Pe.f=Yt,De.f=Zt,T&&!ot&&q(jt,"propertyIsEnumerable",Yt,!0),rt.f=function(e){return Kt(se(e))}),G(G.G+G.W+G.F*!qt,{Symbol:Lt});for(var en=["hasInstance","isConcatSpreadable","iterator","match","replace","search","species","split","toPrimitive","toStringTag","unscopables"],tn=0;en.length>tn;)se(en[tn++]);for(var j=Oe(se.store),nn=0;j.length>nn;)it(j[nn++]);G(G.S+G.F*!qt,"Symbol",{for:function(e){return B(Ft,e+="")?Ft[e]:Ft[e]=Lt(e)},keyFor:function(e){if(!Gt(e))throw TypeError(e+" is not a symbol!");for(var t in Ft)if(Ft[t]===e)return t},useSetter:function(){Wt=!0},useSimple:function(){Wt=!1}}),G(G.S+G.F*!qt,"Object",{create:function(e,t){return void 0===t?gt(e):Qt(gt(e),t)},defineProperty:Xt,defineProperties:Qt,getOwnPropertyDescriptor:Jt,getOwnPropertyNames:$t,getOwnPropertySymbols:Zt}),Ot&&G(G.S+G.F*(!qt||C(function(){var e=Lt();return"[null]"!=Mt([e])||"{}"!=Mt({a:e})||"{}"!=Mt(Object(e))})),"JSON",{stringify:function(e){for(var t=[e],n=1,r,o;arguments.length>n;)t.push(arguments[n++]);if(o=r=t[1],(w(r)||void 0!==e)&&!Gt(e))return re(r)||(r=function(e,t){if("function"==typeof o&&(t=o.call(this,e,t)),!Gt(t))return t}),t[1]=r,Mt.apply(Ot,t)}}),Lt[Dt][Pt]||D(Lt[Dt],Pt,Lt[Dt].valueOf),nt(Lt,"Symbol"),nt(Math,"Math",!0),nt(b.JSON,"JSON",!0);var k=se("toStringTag"),rn="Arguments"==Q(function(){return arguments}()),on=function(e,t){try{return e[t]}catch(t){}},an=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=on(t=Object(e),k))?n:rn?Q(t):"Object"==(r=Q(t))&&"function"==typeof t.callee?"Arguments":r};({})[se("toStringTag")]="z",q(Object.prototype,"toString",function(){return"[object "+an(this)+"]"},!0),it("asyncIterator"),it("observable");var sn=x.Symbol,ln={},dn={};D(dn,se("iterator"),function(){return this});var pn=function(e,t,n){e.prototype=gt(dn,{next:R(1,n)}),nt(e,t+" Iterator")},cn=Ee("IE_PROTO"),un=Object.prototype,hn=Object.getPrototypeOf||function(e){return e=$(e),B(e,cn)?e[cn]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?un:null},mn=se("iterator"),gn=!([].keys&&"next"in[].keys()),fn="keys",yn="values",bn=function(){return this},xn=function(e,t,n,r,o,i,s){pn(n,t,r);var l=function(e){return!gn&&e in u?u[e]:e===fn?function(){return new n(this,e)}:e===yn?function(){return new n(this,e)}:function(){return new n(this,e)}},d=t+" Iterator",p=o==yn,c=!1,u=e.prototype,h=u[mn]||u["@@iterator"]||o&&u[o],m=h||l(o),g=o?p?l("entries"):m:void 0,f="Array"==t?u.entries||h:h,y,b,x;if(f&&(x=hn(f.call(new e)),x!==Object.prototype&&x.next&&(nt(x,d,!0),"function"!=typeof x[mn]&&D(x,mn,bn))),p&&h&&h.name!==yn&&(c=!0,m=function(){return h.call(this)}),(gn||c||!u[mn])&&D(u,mn,m),ln[t]=m,ln[d]=bn,o)if(y={values:p?m:l(yn),keys:i?m:l(fn),entries:g},s)for(b in y)b in u||q(u,b,y[b]);else G(G.P+G.F*(gn||c),t,y);return y},vn=function(e){return function(t,n){var r=J(t)+"",o=te(n),i=r.length,s,l;return 0>o||o>=i?e?"":void 0:(s=r.charCodeAt(o),55296>s||56319<s||o+1===i||56320>(l=r.charCodeAt(o+1))||57343<l?e?r.charAt(o):s:e?r.slice(o,o+2):(s-55296<<10)+(l-56320)+65536)}}(!0);xn(String,"String",function(e){this._t=e+"",this._i=0},function(){var e=this._t,t=this._i,n;return t>=e.length?{value:void 0,done:!0}:(n=vn(e,t),this._i+=n.length,{value:n,done:!1})});var kn=function(e,t){return{value:t,done:!!e}},Sn=xn(Array,"Array",function(e,t){this._t=we(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,kn(1)):"keys"==t?kn(0,n):"values"==t?kn(0,e[n]):kn(0,[n,e[n]])},"values");ln.Arguments=ln.Array,me("keys"),me("values"),me("entries");for(var wn=se("iterator"),Cn=se("toStringTag"),Tn=ln.Array,_n={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},En=Oe(_n),An=0;An<En.length;An++){var i=En[An],In=_n[i],Nn=b[i],Ln=Nn&&Nn.prototype,On;if(Ln&&(Ln[wn]||D(Ln,wn,Tn),Ln[Cn]||D(Ln,Cn,i),ln[i]=Tn,In))for(On in Sn)Ln[On]||q(Ln,On,Sn[On],!0)}rt.f("iterator")}).call(t,n("h6ac"))},wOgZ:function(e,t,n){"use strict";function r(e){o.call(this,e)}var o=n("ML/b"),i=n("dvMn");i.inherits(r,o),r.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},r.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},r.prototype.readAndCheckSignature=function(e){var t=this.readData(4);return e===t},r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},"wl+m":function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){e.copy(t,n)}var s=n("38Wu").Buffer,i=n(1);e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};0<this.length?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return s.alloc(0);if(1===this.length)return this.head.data;for(var t=s.allocUnsafe(e>>>0),n=this.head,r=0;n;)o(n.data,t,r),r+=n.data.length,n=n.next;return t},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},xUUw:function(e){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},xdvC:function(e,t,n){"use strict";(function(e){e(n("tQq4"),n("1JcR"))})(function(e){function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation(function(){if(t(n),!n.somethingSelected()){var r=n.getCursor(),o=n.getViewport();o.from=Math.min(o.from,r.line),o.to=Math.max(r.line+1,o.to);var i=e.findMatchingTag(n,r,o);if(i){if(n.state.matchBothTags){var s="open"==i.at?i.open:i.close;s&&(n.state.tagHit=n.markText(s.from,s.to,{className:"CodeMirror-matchingtag"}))}var l="close"==i.at?i.open:i.close;l?n.state.tagOther=n.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}})}function r(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,function(o,i,s){s&&s!=e.Init&&(o.off("cursorActivity",n),o.off("viewportChange",r),t(o)),i&&(o.state.matchBothTags="object"==typeof i&&i.bothTags,o.on("cursorActivity",n),o.on("viewportChange",r),n(o))}),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var r="close"==n.at?n.open:n.close;r&&t.extendSelection(r.to,r.from)}}})},xtj2:function(e,t,n){"use strict";function r(e,t,n,r){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var o=n("dvMn"),s=n("ZKdc"),i=n("Sm7/"),l=n("cvyR"),d=n("Ctqd"),p=function(e,t){var n="",r;for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n},c=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16},u=function(e){return 63&(e||0)},h=function(e,t,n,r,s,h){var m=e.file,g=e.compression,f=h!==i.utf8encode,y=o.transformTo("string",h(m.name)),b=o.transformTo("string",i.utf8encode(m.name)),x=m.comment,v=o.transformTo("string",h(x)),k=o.transformTo("string",i.utf8encode(x)),S=b.length!==m.name.length,w=k.length!==x.length,C="",T="",_="",E=m.dir,A=m.date,I={crc32:0,compressedSize:0,uncompressedSize:0},N,L;(!t||n)&&(I.crc32=e.crc32,I.compressedSize=e.compressedSize,I.uncompressedSize=e.uncompressedSize);var O=0;t&&(O|=8),!f&&(S||w)&&(O|=2048);var M=0,D=0;E&&(M|=16),"UNIX"===s?(D=798,M|=c(m.unixPermissions,E)):(D=20,M|=u(m.dosPermissions,E)),N=A.getUTCHours(),N<<=6,N|=A.getUTCMinutes(),N<<=5,N|=A.getUTCSeconds()/2,L=A.getUTCFullYear()-1980,L<<=4,L|=A.getUTCMonth()+1,L<<=5,L|=A.getUTCDate(),S&&(T=p(1,1)+p(l(y),4)+b,C+="up"+p(T.length,2)+T),w&&(_=p(1,1)+p(l(v),4)+k,C+="uc"+p(_.length,2)+_);var R="";R+="\n\0",R+=p(O,2),R+=g.magic,R+=p(N,2),R+=p(L,2),R+=p(I.crc32,4),R+=p(I.compressedSize,4),R+=p(I.uncompressedSize,4),R+=p(y.length,2),R+=p(C.length,2);var P=d.LOCAL_FILE_HEADER+R+y+C,B=d.CENTRAL_FILE_HEADER+p(D,2)+R+p(v.length,2)+"\0\0\0\0"+p(M,4)+p(r,4)+y+C+v;return{fileRecord:P,dirRecord:B}},m=function(e,t,n,r,i){var s="",l=o.transformTo("string",i(r));return s=d.CENTRAL_DIRECTORY_END+"\0\0\0\0"+p(e,2)+p(e,2)+p(t,4)+p(n,4)+p(l.length,2)+l,s},g=function(e){var t="";return t=d.DATA_DESCRIPTOR+p(e.crc32,4)+p(e.compressedSize,4)+p(e.uncompressedSize,4),t};o.inherits(r,s),r.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},r.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=h(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},r.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=h(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:g(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},r.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,r=m(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})},r.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},r.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(n){t.error(n)}),this},r.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},r.prototype.error=function(t){var e=this._sources;if(!s.prototype.error.call(this,t))return!1;for(var n=0;n<e.length;n++)try{e[n].error(t)}catch(t){}return!0},r.prototype.lock=function(){s.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},e.exports=r},xz3w:function(e,t,n){"use strict";function r(){}function o(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,e!==r&&d(this,e)}function i(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function s(t,e,n){c(function(){var r;try{r=e(n)}catch(n){return u.reject(t,n)}r===t?u.reject(t,new TypeError("Cannot resolve promise with itself")):u.resolve(t,r)})}function l(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function d(e,t){function n(t){o||(o=!0,u.reject(e,t))}function r(t){o||(o=!0,u.resolve(e,t))}var o=!1,i=p(function(){t(r,n)});"error"===i.status&&n(i.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(t){n.status="error",n.value=t}return n}var c=n("uUPe"),u={},h=["REJECTED"],m=["FULFILLED"],g=["PENDING"];e.exports=o,o.prototype["catch"]=function(e){return this.then(null,e)},o.prototype.then=function(e,t){if("function"!=typeof e&&this.state===m||"function"!=typeof t&&this.state===h)return this;var n=new this.constructor(r);if(this.state!==g){var o=this.state===m?e:t;s(n,o,this.outcome)}else this.queue.push(new i(n,e,t));return n},i.prototype.callFulfilled=function(e){u.resolve(this.promise,e)},i.prototype.otherCallFulfilled=function(e){s(this.promise,this.onFulfilled,e)},i.prototype.callRejected=function(e){u.reject(this.promise,e)},i.prototype.otherCallRejected=function(e){s(this.promise,this.onRejected,e)},u.resolve=function(e,t){var n=p(l,t);if("error"===n.status)return u.reject(e,n.value);var r=n.value;if(r)d(e,r);else{e.state=m,e.outcome=t;for(var o=-1,i=e.queue.length;++o<i;)e.queue[o].callFulfilled(t)}return e},u.reject=function(e,t){e.state=h,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},o.resolve=function(e){return e instanceof this?e:u.resolve(new this(r),e)},o.reject=function(e){var t=new this(r);return u.reject(t,e)},o.all=function(e){function t(e,t){n.resolve(e).then(function(e){l[t]=e,++d!==o||s||(s=!0,u.resolve(c,l))},function(e){s||(s=!0,u.reject(c,e))})}var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var o=e.length,s=!1;if(!o)return this.resolve([]);for(var l=Array(o),d=0,p=-1,c=new this(r);++p<o;)t(e[p],p);return c},o.race=function(e){function t(e){n.resolve(e).then(function(e){s||(s=!0,u.resolve(i,e))},function(e){s||(s=!0,u.reject(i,e))})}var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var o=e.length,s=!1;if(!o)return this.resolve([]);for(var l=-1,i=new this(r);++l<o;)t(e[l]);return i}},yLr7:function(e,t,n){"use strict";var r=Math.abs,o=Math.floor,s=String.fromCharCode,l=Math.min,d=Math.max;(function(e){e(n("tQq4"),n("29F7"),n("4e7A"),n("uQIK"))})(function(t){var e=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:"\"<character>",type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],n=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],p=t.Pos;t.Vim=function(){function i(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),t.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",pt),D(e),t.on(e.getInputField(),"paste",v(e))}function c(e){e.setOption("disableInput",!1),e.off("cursorActivity",pt),t.off(e.getInputField(),"paste",v(e)),e.state.vim=null}function u(e,n){this==t.keyMap.vim&&(t.rmClass(e.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==e.getOption("inputStyle")&&null!=document.body.style.caretColor&&(y(e),e.getInputField().style.caretColor="")),n&&n.attach==h||c(e)}function h(e,n){this==t.keyMap.vim&&(t.addClass(e.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==e.getOption("inputStyle")&&null!=document.body.style.caretColor&&(f(e),e.getInputField().style.caretColor="transparent")),n&&n.attach==h||i(e)}function m(e){for(var t=e.listSelections(),n=[],r=0,o;r<t.length;r++)if(o=t[r],o.empty())if(o.anchor.ch<e.getLine(o.anchor.line).length)n.push(e.markText(o.anchor,p(o.anchor.line,o.anchor.ch+1),{className:"cm-fat-cursor-mark"}));else{var i=document.createElement("span");i.textContent="\xA0",i.className="cm-fat-cursor-mark",n.push(e.setBookmark(o.anchor,{widget:i}))}return n}function g(e){var t=e.state.fatCursorMarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();e.state.fatCursorMarks=m(e)}function f(e){e.state.fatCursorMarks=m(e),e.on("cursorActivity",g)}function y(e){var t=e.state.fatCursorMarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();e.state.fatCursorMarks=null,e.off("cursorActivity",g)}function b(e,n){if(n){if(this[e])return this[e];var r=x(e);if(!r)return!1;var o=t.Vim.findKey(n,r);return"function"==typeof o&&t.signal(n,"vim-keypress",r),o}}function x(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),n=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==n.length)return!1;for(var r=!1,o=0,i;o<t.length;o++)i=t[o],i in yt?t[o]=yt[i]:r=!0,i in bt&&(t[o]=bt[i]);return!!r&&(_(n)&&(t[t.length-1]=n.toLowerCase()),"<"+t.join("-")+">")}function v(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(W(e.getCursor(),0,1)),Rt.enterInsertMode(e,{},t))}),t.onPasteFn}function k(e,t){for(var n=[],r=e;r<e+t;r++)n.push(s(r));return n}function S(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function w(e){return /^[a-z]$/.test(e)}function C(e){return-1!="()[]{}".indexOf(e)}function T(e){return xt.test(e)}function _(e){return /^[A-Z]$/.test(e)}function E(e){return /^\s*$/.test(e)}function A(e){return-1!=".?!".indexOf(e)}function I(e,t){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}function N(e,t,n,r,o){if(void 0===t&&!o)throw Error("defaultValue is required unless callback is provided");if(n||(n="string"),Et[e]={type:n,defaultValue:t,callback:o},r)for(var s=0;s<r.length;s++)Et[r[s]]=Et[e];t&&L(e,t)}function L(e,t,n,r){var o=Et[e];r=r||{};var i=r.scope;if(!o)return new Error("Unknown option: "+e);if("boolean"==o.type){if(t&&!0!==t)return new Error("Invalid argument: "+e+"="+t);!1!==t&&(t=!0)}o.callback?("local"!==i&&o.callback(t,void 0),"global"!==i&&n&&o.callback(t,n)):("local"!==i&&(o.value="boolean"==o.type?!!t:t),"global"!==i&&n&&(n.state.vim.options[e]={value:t}))}function O(e,t,n){var r=Et[e];n=n||{};var o=n.scope;if(!r)return new Error("Unknown option: "+e);if(r.callback){var i=t&&r.callback(void 0,t);return"global"!==o&&void 0!==i?i:"local"===o?void 0:r.callback()}var i="global"!==o&&t&&t.state.vim.options[e];return(i||"local"!==o&&r||{}).value}function M(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=It()}function D(e){return e.state.vim||(e.state.vim={inputState:new P,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function R(){for(var e in Nt={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:At(),macroModeState:new M,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new U({}),searchHistoryController:new z,exCommandHistoryController:new z},Et){var t=Et[e];t.value=t.defaultValue}}function P(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function B(e,n){e.state.vim.inputState=new P,t.signal(e,"vim-command-done",n)}function F(e,t,n){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}function U(e){this.registers=e,this.unnamedRegister=e["\""]=new F,e["."]=new F,e[":"]=new F,e["/"]=new F}function z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function j(e,t){for(var n=[],r=0;r<t;r++)n.push(e);return n}function q(e,t,n){var r=l(d(e.firstLine(),t.line),e.lastLine()),o=ne(e,r)-1;o=n?o+1:o;var i=l(d(0,t.ch),o);return p(r,i)}function V(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function W(e,t,n){return"object"==typeof t&&(n=t.ch,t=t.line),p(e.line+t,e.ch+n)}function H(e,t){return{line:t.line-e.line,ch:t.line-e.line}}function K(e,t,n,r){for(var o=[],s=[],l=0,i,d;l<t.length;l++)(d=t[l],!("insert"==n&&"insert"!=d.context||d.context&&d.context!=n||r.operator&&"action"==d.type||!(i=G(e,d.keys))))&&("partial"==i&&o.push(d),"full"==i&&s.push(d));return{partial:o.length&&o,full:s.length&&s}}function G(e,t){if("<character>"==t.slice(-11)){var n=t.length-11,r=e.slice(0,n),o=t.slice(0,n);return r==o&&e.length>n?"full":0==o.indexOf(r)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function X(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);return 1<n.length&&(n="<CR>"===n?"\n":"<Space>"===n?" ":""),n}function Q(e,t,n){return function(){for(var r=0;r<n;r++)t(e)}}function Y(e){return p(e.line,e.ch)}function J(e,t){return e.ch==t.ch&&e.line==t.line}function $(e,t){return!!(e.line<t.line)||e.line==t.line&&e.ch<t.ch}function Z(e,t){return 2<arguments.length&&(t=Z.apply(void 0,Array.prototype.slice.call(arguments,1))),$(e,t)?e:t}function ee(e,t){return 2<arguments.length&&(t=ee.apply(void 0,Array.prototype.slice.call(arguments,1))),$(e,t)?t:e}function te(e,t,n){var r=$(e,t),o=$(t,n);return r&&o}function ne(e,t){return e.getLine(t).length}function re(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function oe(e){return e.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function ae(e,t,n){var r=ne(e,t),o=Array(n-r+1).join(" ");e.setCursor(p(t,r)),e.replaceRange(o,e.getCursor())}function ie(e,t){var n=[],r=e.listSelections(),o=Y(e.clipPos(t)),i=!J(t,o),s=e.getCursor("head"),c=le(r,s),u=J(r[c].head,r[c].anchor),h=r.length-1,m=h-c>c?h:0,g=r[m].anchor,f=l(g.line,o.line),y=d(g.line,o.line),b=g.ch,x=o.ch,v=r[m].head.ch-b,k=x-b;0<v&&0>=k?(b++,!i&&x--):0>v&&0<=k?(b--,!u&&x++):0>v&&-1==k&&(b--,x++);for(var S=f,w;S<=y;S++)w={anchor:new p(S,b),head:new p(S,x)},n.push(w);return e.setSelections(n),t.ch=x,g.ch=b,g}function se(e,t,n){for(var r=[],o=0,i;o<n;o++)i=W(t,o,0),r.push({anchor:i,head:i});e.setSelections(r,0)}function le(e,t,n){for(var r=0;r<e.length;r++){var o="head"!=n&&J(e[r].anchor,t),i="anchor"!=n&&J(e[r].head,t);if(o||i)return r}return-1}function de(e,t){var n=t.lastSelection;return t.visualMode?function(){var t=e.listSelections(),n=t[0],r=t[t.length-1],o=$(n.anchor,n.head)?n.anchor:n.head,i=$(r.anchor,r.head)?r.head:r.anchor;return[o,i]}():function(){var t=e.getCursor(),r=e.getCursor(),o=n.visualBlock;if(o){var s=o.width,l=o.height;r=p(t.line+l,t.ch+s);for(var d=[],c=t.line;c<r.line;c++){var i=p(c,t.ch),u=p(c,r.ch);d.push({anchor:i,head:u})}e.setSelections(d)}else{var h=n.anchorMark.find(),m=n.headMark.find(),g=m.line-h.line,f=m.ch-h.ch;r={line:r.line+g,ch:g?r.ch:f+r.ch},n.visualLine&&(t=p(t.line,0),r=p(r.line,ne(e,r.line))),e.setSelection(t,r)}return[t,r]}()}function pe(e,t){var n=t.sel.anchor,r=t.sel.head;t.lastPastedText&&(r=e.posFromIndex(e.indexFromPos(n)+t.lastPastedText.length),t.lastPastedText=null),t.lastSelection={anchorMark:e.setBookmark(n),headMark:e.setBookmark(r),anchor:Y(n),head:Y(r),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function ce(e,t,n){var r=e.state.vim.sel,o=r.head,i=r.anchor,s;return $(n,t)&&(s=n,n=t,t=s),$(o,i)?(o=Z(t,o),i=ee(i,n)):(i=Z(t,i),o=ee(o,n),o=W(o,0,-1),-1==o.ch&&o.line!=e.firstLine()&&(o=p(o.line-1,ne(e,o.line-1)))),[i,o]}function ue(e,t,n){var r=e.state.vim;t=t||r.sel;var n=n||r.visualLine?"line":r.visualBlock?"block":"char",o=he(e,t,n);e.setSelections(o.ranges,o.primary),ct(e)}function he(e,t,n,r){var o=Y(t.head),s=Y(t.anchor);if("char"==n){var c=r||$(t.head,t.anchor)?0:1,u=$(t.head,t.anchor)?1:0;return o=W(t.head,0,c),s=W(t.anchor,0,u),{ranges:[{anchor:s,head:o}],primary:0}}if("line"==n){if(!$(t.head,t.anchor)){s.ch=0;var h=e.lastLine();o.line>h&&(o.line=h),o.ch=ne(e,o.line)}else o.ch=0,s.ch=ne(e,s.line);return{ranges:[{anchor:s,head:o}],primary:0}}if("block"==n){for(var m=l(s.line,o.line),g=l(s.ch,o.ch),f=d(s.line,o.line),y=d(s.ch,o.ch)+1,b=f-m+1,x=o.line==m?0:b-1,v=[],k=0;k<b;k++)v.push({anchor:p(m+k,g),head:p(m+k,y)});return{ranges:v,primary:x}}}function me(e){var t=e.getCursor("head");return 1==e.getSelection().length&&(t=Z(t,e.getCursor("anchor"))),t}function ge(e,n){var r=e.state.vim;!1!==n&&e.setCursor(q(e,r.sel.head)),pe(e,r),r.visualMode=!1,r.visualLine=!1,r.visualBlock=!1,t.signal(e,"vim-mode-change",{mode:"normal"}),r.fakeCursor&&r.fakeCursor.clear()}function fe(e,t,n){var r=e.getRange(t,n);if(/\n\s*$/.test(r)){var o=r.split("\n");o.pop();for(var i=o.pop(),i;0<o.length&&i&&E(i);i=o.pop())n.line--,n.ch=0;i?(n.line--,n.ch=ne(e,n.line)):n.ch=0}}function ye(e,t,n){t.ch=0,n.ch=0,n.line++}function be(e){if(!e)return 0;var t=e.search(/\S/);return-1==t?e.length:t}function xe(e,t,n,r,o){for(var i=me(e),s=e.getLine(i.line),l=i.ch,d=o?vt[0]:kt[0];!d(s.charAt(l));)if(l++,l>=s.length)return null;r?d=kt[0]:(d=vt[0],!d(s.charAt(l))&&(d=vt[1]));for(var c=l,u=l;d(s.charAt(c))&&c<s.length;)c++;for(;d(s.charAt(u))&&0<=u;)u--;if(u++,t){for(var h=c;/\s/.test(s.charAt(c))&&c<s.length;)c++;if(h==c){for(var m=u;/\s/.test(s.charAt(u-1))&&0<u;)u--;u||(u=m)}}return{start:p(i.line,u),end:p(i.line,c)}}function ve(e,t,n){J(t,n)||Nt.jumpList.add(e,t,n)}function ke(e,t){Nt.lastCharacterSearch.increment=e,Nt.lastCharacterSearch.forward=t.forward,Nt.lastCharacterSearch.selectedCharacter=t.selectedCharacter}function Se(e,t,n,r){var o=Y(e.getCursor()),i=n?1:-1,s=n?e.lineCount():-1,l=o.ch,d=o.line,c=e.getLine(d),u={lineText:c,nextCh:c.charAt(l),lastCh:null,index:l,symb:r,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[r],forward:n,depth:0,curMoveThrough:!1},h=Pt[r];if(!h)return o;var m=Bt[h].init,g=Bt[h].isComplete;for(m&&m(u);d!==s&&t;){if(u.index+=i,u.nextCh=u.lineText.charAt(u.index),!u.nextCh){if(d+=i,u.lineText=e.getLine(d)||"",0<i)u.index=0;else{var f=u.lineText.length;u.index=0<f?f-1:0}u.nextCh=u.lineText.charAt(u.index)}g(u)&&(o.line=d,o.ch=u.index,t--)}return u.nextCh||u.curMoveThrough?p(d,u.index):o}function we(e,t,n,r,o){var s=t.line,p=t.ch,c=e.getLine(s),u=n?1:-1,h=r?kt:vt;if(o&&""==c){if(s+=u,c=e.getLine(s),!S(e,s))return null;p=n?0:c.length}for(;;){if(o&&""==c)return{from:0,to:0,line:s};for(var m=0<u?c.length:-1,g=m,f=m;p!=m;){for(var y=!1,b=0;b<h.length&&!y;++b)if(h[b](c.charAt(p))){for(g=p;p!=m&&h[b](c.charAt(p));)p+=u;if(f=p,y=g!=f,g==t.ch&&s==t.line&&f==g+u)continue;else return{from:l(g,f+1),to:d(g,f),line:s}}y||(p+=u)}if(s+=u,!S(e,s))return null;c=e.getLine(s),p=0<u?0:c.length}}function Ce(e,t,n,r,o,s){var l=Y(t),d=[];(r&&!o||!r&&o)&&n++;for(var c=0,i;c<n;c++){if(i=we(e,t,r,s,!(r&&o)),!i){var u=ne(e,e.lastLine());d.push(r?{line:e.lastLine(),from:u,to:u}:{line:0,from:0,to:0});break}d.push(i),t=p(i.line,r?i.to-1:i.from)}var h=d.length!=n,m=d[0],g=d.pop();return r&&!o?(h||m.from==l.ch&&m.line==l.line||(g=d.pop()),p(g.line,g.from)):r&&o?p(g.line,g.to-1):!r&&o?(h||m.to==l.ch&&m.line==l.line||(g=d.pop()),p(g.line,g.to)):p(g.line,g.from)}function Te(e,t,n,r){for(var o=e.getCursor(),s=o.ch,l=0,i,d;l<t;l++){if(d=e.getLine(o.line),i=Ae(s,d,r,n,!0),-1==i)return null;s=i}return p(e.getCursor().line,i)}function _e(e,t){var n=e.getCursor().line;return q(e,p(n,t-1))}function Ee(e,t,n,r){I(n,Tt)&&(t.marks[n]&&t.marks[n].clear(),t.marks[n]=e.setBookmark(r))}function Ae(e,t,n,r,o){var i;return r?(i=t.indexOf(n,e+1),-1!=i&&!o&&(i-=1)):(i=t.lastIndexOf(n,e-1),-1!=i&&!o&&(i+=1)),i}function Ie(e,t,n,r,o){function s(t){return!e.getLine(t)}function l(e,t,n){return n?s(e)!=s(e+t):!s(e)&&s(e+t)}var d=t.line,c=e.firstLine(),u=e.lastLine(),h=d,i,m;if(r){for(;c<=h&&h<=u&&0<n;)l(h,r)&&n--,h+=r;return new p(h,0)}var g=e.state.vim;if(g.visualLine&&l(d,1,!0)){var f=g.sel.anchor;l(f.line,-1,!0)&&(!o||f.line!=d)&&(d+=1)}var y=s(d);for(h=d;h<=u&&n;h++)l(h,1,!0)&&(o&&s(h)==y||n--);for(m=new p(h,0),h>u&&!y?y=!0:o=!1,h=d;h>c&&(o&&s(h)!=y&&h!=d||!l(h,-1,!0));h--);return i=new p(h,0),{start:i,end:m}}function Ne(e,t,n,r){function o(e,t){if(0>t.pos+t.dir||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!S(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=0<t.dir?0:t.line.length-1}else t.pos+=t.dir}function i(e,t,n,r){var s=e.getLine(t),l=""===s,d={line:s,ln:t,pos:n,dir:r},p={ln:d.ln,pos:d.pos},c=""===d.line;for(o(e,d);null!==d.line;){if(p.ln=d.ln,p.pos=d.pos,""===d.line&&!c)return{ln:d.ln,pos:d.pos};if(l&&""!==d.line&&!E(d.line[d.pos]))return{ln:d.ln,pos:d.pos};A(d.line[d.pos])&&!l&&(d.pos===d.line.length-1||E(d.line[d.pos+1]))&&(l=!0),o(e,d)}var s=e.getLine(p.ln);p.pos=0;for(var u=s.length-1;0<=u;--u)if(!E(s[u])){p.pos=u;break}return p}function s(e,t,n,r){var s=e.getLine(t),l={line:s,ln:t,pos:n,dir:r},d={ln:l.ln,pos:null},p=""===l.line;for(o(e,l);null!==l.line;){if(""===l.line&&!p)return null===d.pos?{ln:l.ln,pos:l.pos}:d;if(A(l.line[l.pos])&&null!==d.pos&&(l.ln!==d.ln||l.pos+1!==d.pos))return d;""===l.line||E(l.line[l.pos])||(p=!1,d={ln:l.ln,pos:l.pos}),o(e,l)}var s=e.getLine(d.ln);d.pos=0;for(var c=0;c<s.length;++c)if(!E(s[c])){d.pos=c;break}return d}for(var l={ln:t.line,pos:t.ch};0<n;)l=0>r?s(e,l.ln,l.pos,r):i(e,l.ln,l.pos,r),n--;return p(l.ln,l.pos)}function Le(e,t,n,r){var o=t,i={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/}[n],s={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{"}[n],l=e.getLine(o.line).charAt(o.ch),d=l===s?1:0,c,u;if(c=e.scanForBracket(p(o.line,o.ch+d),-1,void 0,{bracketRegex:i}),u=e.scanForBracket(p(o.line,o.ch+d),1,void 0,{bracketRegex:i}),!c||!u)return{start:o,end:o};if(c=c.pos,u=u.pos,c.line==u.line&&c.ch>u.ch||c.line>u.line){var h=c;c=u,u=h}return r?u.ch+=1:c.ch+=1,{start:c,end:u}}function Oe(e,t,n,r){var o=Y(t),s=e.getLine(o.line),l=s.split(""),d=l.indexOf(n),c,u,h,i;if(o.ch<d?o.ch=d:d<o.ch&&l[o.ch]==n&&(u=o.ch,--o.ch),l[o.ch]==n&&!u)c=o.ch+1;else for(h=o.ch;-1<h&&!c;h--)l[h]==n&&(c=h+1);if(c&&!u)for(h=c,i=l.length;h<i&&!u;h++)l[h]==n&&(u=h);return c&&u?(r&&(--c,++u),{start:p(o.line,c),end:p(o.line,u)}):{start:o,end:o}}function Me(){}function De(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new Me)}function Re(e,t,n,r,o){e.openDialog?e.openDialog(t,r,{bottom:!0,value:o.value,onKeyDown:o.onKeyDown,onKeyUp:o.onKeyUp,selectValueOnOpen:!1}):r(prompt(n,""))}function Pe(e){return Fe(e,"/")}function Be(e){return Ue(e,"/")}function Fe(e,t){var n=Ue(e,t)||[];if(!n.length)return[];var r=[];if(0===n[0]){for(var o=0;o<n.length;o++)"number"==typeof n[o]&&r.push(e.substring(n[o]+1,n[o+1]));return r}}function Ue(e,t){t||(t="/");for(var n=!1,r=[],o=0,i;o<e.length;o++)i=e.charAt(o),n||i!=t||r.push(o),n=!n&&"\\"==i;return r}function ze(e){for(var t=!1,r=[],o=-1;o<e.length;o++){var i=e.charAt(o)||"",s=e.charAt(o+1)||"",n=s&&-1!="|(){".indexOf(s);t?(("\\"!==i||!n)&&r.push(i),t=!1):"\\"===i?(t=!0,s&&-1!="}".indexOf(s)&&(n=!0),(!n||"\\"===s)&&r.push(i)):(r.push(i),n&&"\\"!==s&&r.push("\\"))}return r.join("")}function je(e){for(var t=!1,r=[],o=-1;o<e.length;o++){var i=e.charAt(o)||"",s=e.charAt(o+1)||"";Ft[i+s]?(r.push(Ft[i+s]),o++):t?(r.push(i),t=!1):"\\"===i?(t=!0,T(s)||"$"===s?r.push("$"):"/"!==s&&"\\"!==s&&r.push("\\")):("$"===i&&r.push("$"),r.push(i),"/"===s&&r.push("\\"))}return r.join("")}function qe(e){for(var n=new t.StringStream(e),r=[];!n.eol();){for(;n.peek()&&"\\"!=n.peek();)r.push(n.next());var o=!1;for(var i in Ut)if(n.match(i,!0)){o=!0,r.push(Ut[i]);break}o||r.push(n.next())}return r.join("")}function Ve(e,t,n){var r=Nt.registerController.getRegister("/");if(r.setText(e),e instanceof RegExp)return e;var o=Be(e),i,s;if(!o.length)i=e;else{i=e.substring(0,o[0]);var l=e.substring(o[0]);s=-1!=l.indexOf("i")}if(!i)return null;O("pcre")||(i=ze(i)),n&&(t=/^[^A-Z]*$/.test(i));var d=new RegExp(i,t||s?"i":void 0);return d}function We(e,t){e.openNotification?e.openNotification("<span style=\"color: red\">"+t+"</span>",{bottom:!0,duration:5e3}):alert(t)}function He(e,t){var n="<span style=\"font-family: monospace; white-space: pre\">"+(e||"")+"<input type=\"text\"></span>";return t&&(n+=" <span style=\"color: #888\">"+t+"</span>"),n}function Ke(e,t){var n=(t.prefix||"")+" "+(t.desc||""),r=He(t.prefix,t.desc);Re(e,r,n,t.onClose,t)}function Ge(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],r=0,o;r<n.length;r++)if(o=n[r],e[o]!==t[o])return!1;return!0}return!1}function Xe(e,t,n,r){if(t){var o=De(e),i=Ve(t,!!n,!!r);if(i)return(Ye(e,i),Ge(i,o.getQuery()))?i:(o.setQuery(i),i)}}function Qe(e){if("^"==e.source.charAt(0));return{token:function(t){if(!t.sol())return void t.skipToEnd();var n=t.match(e,!1);if(n)return 0==n[0].length?(t.next(),"searching"):!t.sol()&&(t.backUp(1),!e.exec(t.next()+n[0]))?(t.next(),null):(t.match(e),"searching");for(;!t.eol()&&(t.next(),!t.match(e,!1)););},query:e}}function Ye(e,t){var n=De(e),r=n.getOverlay();r&&t==r.query||(r&&e.removeOverlay(r),r=Qe(t),e.addOverlay(r),e.showMatchesOnScrollbar&&(n.getScrollbarAnnotate()&&n.getScrollbarAnnotate().clear(),n.setScrollbarAnnotate(e.showMatchesOnScrollbar(t))),n.setOverlay(r))}function Je(e,t,n,r){return void 0===r&&(r=1),e.operation(function(){for(var o=e.getCursor(),s=e.getSearchCursor(n,o),l=0,i;l<r;l++)if(i=s.find(t),0==l&&i&&J(s.from(),o)&&(i=s.find(t)),!i&&(s=e.getSearchCursor(n,t?p(e.lastLine()):p(e.firstLine(),0)),!s.find(t)))return;return s.from()})}function $e(e){var t=De(e);e.removeOverlay(De(e).getOverlay()),t.setOverlay(null),t.getScrollbarAnnotate()&&(t.getScrollbarAnnotate().clear(),t.setScrollbarAnnotate(null))}function Ze(e,t,n){return"number"!=typeof e&&(e=e.line),t instanceof Array?I(e,t):n?e>=t&&e<=n:e==t}function et(e){var t=e.getScrollInfo(),n=e.coordsChar({left:0,top:6+t.top},"local"),r=t.clientHeight-10+t.top,o=e.coordsChar({left:0,top:r},"local");return{top:n.line,bottom:o.line}}function tt(e,t,n){if("'"==n){var r=e.doc.history.done,o=r[r.length-2];return o&&o.ranges&&o.ranges[0].head}if("."==n){if(0==e.doc.history.lastModTime)return;var i=e.doc.history.done.filter(function(e){if(void 0!==e.changes)return e});i.reverse();var s=i[0].changes[0].to;return s}var l=t.marks[n];return l&&l.find()}function nt(e,n,r,o,i,s,l,d,p){function c(){e.operation(function(){for(;!g;)u(),h();m()})}function u(){var t=e.getRange(s.from(),s.to()),n=t.replace(l,d);s.replace(n)}function h(){for(;s.findNext()&&Ze(s.from(),o,i);)if(r||!f||s.from().line!=f.line)return e.scrollIntoView(s.from(),30),e.setSelection(s.from(),s.to()),f=s.from(),void(g=!1);g=!0}function m(t){if(t&&t(),e.focus(),f){e.setCursor(f);var n=e.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=f.ch}p&&p()}e.state.vim.exMode=!0;var g=!1,f=s.from();return h(),g?void We(e,"No matches for "+l.source):n?void Ke(e,{prefix:"replace with <strong>"+d+"</strong> (y/n/a/q/l)",onKeyDown:function(n,r,o){t.e_stop(n);var i=t.keyName(n);switch(i){case"Y":u(),h();break;case"N":h();break;case"A":var s=p;p=void 0,e.operation(c),p=s;break;case"L":u();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":m(o);}return g&&m(o),!0}}):(c(),void(p&&p()))}function rt(e){var n=e.state.vim,r=Nt.macroModeState,o=Nt.registerController.getRegister("."),s=r.isPlaying,l=r.lastInsertModeChanges,d=[];if(!s){for(var p=l.inVisualBlock&&n.lastSelection?n.lastSelection.visualBlock.height:1,c=l.changes,d=[],u=0;u<c.length;)d.push(c[u]),c[u]instanceof ht?u++:u+=p;l.changes=d,e.off("change",dt),t.off(e.getInputField(),"keydown",mt)}!s&&1<n.insertModeRepeat&&(gt(e,n,n.insertModeRepeat-1,!0),n.lastEditInputState.repeatOverride=n.insertModeRepeat),delete n.insertModeRepeat,n.insertMode=!1,e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),o.setText(l.changes.join("")),t.signal(e,"vim-mode-change",{mode:"normal"}),r.isRecording&&st(r)}function ot(t){e.unshift(t)}function at(e,n,r,o){var s=Nt.registerController.getRegister(o);if(":"==o)return s.keyBuffer[0]&&Vt.processCommand(e,s.keyBuffer[0]),void(r.isPlaying=!1);var l=s.keyBuffer,d=0;r.isPlaying=!0,r.replaySearchQueries=s.searchQueries.slice(0);for(var p=0;p<l.length;p++)for(var i=l[p],c,u;i;)if(c=/<\w+-.+?>|<\w+>|./.exec(i),u=c[0],i=i.substring(c.index+u.length),t.Vim.handleKey(e,u,"macro"),n.insertMode){var h=s.insertModeChanges[d++].changes;Nt.macroModeState.lastInsertModeChanges.changes=h,ft(e,h,1),rt(e)}r.isPlaying=!1}function it(e,t){if(!e.isPlaying){var n=e.latestRegister,r=Nt.registerController.getRegister(n);r&&r.pushText(t)}}function st(e){if(!e.isPlaying){var t=e.latestRegister,n=Nt.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}function lt(e,t){if(!e.isPlaying){var n=e.latestRegister,r=Nt.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}}function dt(e,t){var n=Nt.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(r.expectCursorActivityForChange=!0,"+input"==t.origin||"paste"==t.origin||void 0===t.origin){var o=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1),e.state.overwrite&&!/\n/.test(o)?r.changes.push([o]):r.changes.push(o)}t=t.next}}function pt(e){var t=e.state.vim;if(t.insertMode){var n=Nt.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:r.maybeReset=!0}else e.curOp.isVimOp||ut(e,t);t.visualMode&&ct(e)}function ct(e){var t=e.state.vim,n=q(e,Y(t.sel.head)),r=W(n,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(n,r,{className:"cm-animate-fat-cursor"})}function ut(e,n){var r=e.getCursor("anchor"),o=e.getCursor("head");if(n.visualMode&&!e.somethingSelected()?ge(e,!1):!n.visualMode&&!n.insertMode&&e.somethingSelected()&&(n.visualMode=!0,n.visualLine=!1,t.signal(e,"vim-mode-change",{mode:"visual"})),n.visualMode){var i=$(o,r)?0:-1,s=$(o,r)?-1:0;o=W(o,0,i),r=W(r,0,s),n.sel={anchor:r,head:o},Ee(e,n,"<",Z(o,r)),Ee(e,n,">",ee(o,r))}else n.insertMode||(n.lastHPos=e.getCursor().ch)}function ht(e){this.keyName=e}function mt(n){var e=Nt.macroModeState,r=e.lastInsertModeChanges,o=t.keyName(n);o&&(-1==o.indexOf("Delete")&&-1==o.indexOf("Backspace")||t.lookupKey(o,"vim-insert",function(){return r.maybeReset&&(r.changes=[],r.maybeReset=!1),r.changes.push(new ht(o)),!0}))}function gt(e,t,n,r){function o(){d?Ot.processAction(e,t,t.lastEditActionCommand):Ot.evalInput(e,t)}function s(n){if(0<l.lastInsertModeChanges.changes.length){n=t.lastEditActionCommand?n:1;var r=l.lastInsertModeChanges;ft(e,r.changes,n)}}var l=Nt.macroModeState;l.isPlaying=!0;var d=!!t.lastEditActionCommand,p=t.inputState;if(t.inputState=t.lastEditInputState,d&&t.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c<n;c++)o(),s(1);else r||o(),s(n);t.inputState=p,t.insertMode&&!r&&rt(e),l.isPlaying=!1}function ft(e,n,r){function o(n){return"string"==typeof n?t.commands[n](e):n(e),!0}var s=e.getCursor("head"),l=Nt.macroModeState.lastInsertModeChanges.inVisualBlock;if(l){var d=e.state.vim,p=d.lastSelection,c=H(p.anchor,p.head);se(e,s,c.line+1),r=e.listSelections().length,e.setCursor(s)}for(var u=0;u<r;u++){l&&e.setCursor(W(s,u,0));for(var i=0,h;i<n.length;i++)if(h=n[i],h instanceof ht)t.lookupKey(h.keyName,"vim-insert",o);else if("string"==typeof h){var m=e.getCursor();e.replaceRange(h,m,m)}else{var g=e.getCursor(),f=W(g,0,h[0].length);e.replaceRange(h[0],g,f)}}l&&e.setCursor(W(s,0,1))}t.defineOption("vimMode",!1,function(e,n,r){n&&"vim"!=e.getOption("keyMap")?e.setOption("keyMap","vim"):!n&&r!=t.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")});var yt={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A"},bt={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"},xt=/[\d]/,vt=[t.isWordChar,function(e){return e&&!t.isWordChar(e)&&!/\s/.test(e)}],kt=[function(e){return /\S/.test(e)}],St=k(65,26),wt=k(97,26),Ct=k(48,10),Tt=[].concat(St,wt,Ct,["<",">"]),_t=[].concat(St,wt,Ct,["-","\"",".",":","/"]),Et={};N("filetype",void 0,"string",["ft"],function(e,t){if(void 0!==t){if(void 0===e){var n=t.getOption("mode");return"null"==n?"":n}var n=""==e?"null":e;t.setOption("mode",n)}});var At=function(){var e=100,t=-1,n=0,r=0,o=Array(e);return{cachedCursor:void 0,add:function(i,s,l){function d(n){var r=++t%e,s=o[r];s&&s.clear(),o[r]=i.setBookmark(n)}var p=t%e,c=o[p];if(c){var u=c.find();u&&!J(u,s)&&d(s)}else d(s);d(l),n=t,r=t-e+1,0>r&&(r=0)},move:function(i,s){t+=s,t>n?t=n:t<r&&(t=r);var l=o[(e+t)%e];if(l&&!l.find()){var d=0<s?1:-1,p=i.getCursor(),c;do if(t+=d,l=o[(e+t)%e],l&&(c=l.find())&&!J(p,c))break;while(t<n&&t>r)}return l}}},It=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};M.prototype={exitMacroRecordMode:function(){var e=Nt.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=Nt.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var Nt,Lt;P.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},P.prototype.getRepeat=function(){var e=0;return(0<this.prefixRepeat.length||0<this.motionRepeat.length)&&(e=1,0<this.prefixRepeat.length&&(e*=parseInt(this.prefixRepeat.join(""),10)),0<this.motionRepeat.length&&(e*=parseInt(this.motionRepeat.join(""),10))),e},F.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(!this.linewise&&this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(It(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},U.prototype={pushText:function(e,t,n,r,o){r&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var i=this.isValidRegister(e)?this.getRegister(e):null;if(!i)return"yank"===t?this.registers[0]=new F(n,r,o):"delete"===t||"change"===t?-1==n.indexOf("\n")?this.registers["-"]=new F(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new F(n,r)):void 0,void this.unnamedRegister.setText(n,r,o);var s=_(e);s?i.pushText(n,r):i.setText(n,r,o),this.unnamedRegister.setText(i.toString(),r)},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new F),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&I(e,_t)},shiftNumericRegisters_:function(){for(var e=9;2<=e;e--)this.registers[e]=this.getRegister(""+(e-1))}},z.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var o=this.iterator+r,i;t?0<=o:o<n.length;o+=r){i=n[o];for(var s=0;s<=i.length;s++)if(this.initialPrefix==i.substring(0,s))return this.iterator=o,i}return o>=n.length?(this.iterator=n.length,this.initialPrefix):0>o?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);-1<t&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Ot={matchCommand:function(e,t,n,r){var o=K(e,t,r,n);if(!o.full&&!o.partial)return{type:"none"};if(!o.full&&o.partial)return{type:"partial"};for(var s=0,i,l;s<o.full.length;s++)l=o.full[s],i||(i=l);if("<character>"==i.keys.slice(-11)){var d=X(e);if(!d)return{type:"none"};n.selectedCharacter=d}return{type:"full",command:i}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n);break;default:}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=V(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator)return r.motion="expandToLine",r.motionArgs={linewise:!0},void this.evalInput(e,t);B(e)}r.operator=n.operator,r.operatorArgs=V(n.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,o=V(n.operatorMotionArgs);o&&r&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,o=r.getRepeat(),i=V(n.actionArgs)||{};r.selectedCharacter&&(i.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),i.repeat=o||1,i.repeatIsExplicit=!!o,i.registerName=r.registerName,B(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),Rt[n.action](e,i,t)},processSearch:function(n,e,r){function o(t,o,i){Nt.searchHistoryController.pushInput(t),Nt.searchHistoryController.reset();try{Xe(n,t,o,i)}catch(r){return We(n,"Invalid regex: "+t),void B(n)}Ot.processMotion(n,e,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}function i(e){n.scrollTo(m.left,m.top),o(e,!0,!0);var t=Nt.macroModeState;t.isRecording&<(t,e)}function s(r,e,o){var i=t.keyName(r),s,d;"Up"==i||"Down"==i?(s="Up"==i,d=r.target?r.target.selectionEnd:0,e=Nt.searchHistoryController.nextMatch(e,s)||"",o(e),d&&r.target&&(r.target.selectionEnd=r.target.selectionStart=l(d,r.target.value.length))):"Left"!=i&&"Right"!=i&&"Ctrl"!=i&&"Alt"!=i&&"Shift"!=i&&Nt.searchHistoryController.reset();var c;try{c=Xe(n,e,!0,!0)}catch(t){}c?n.scrollIntoView(Je(n,!p,c),30):($e(n),n.scrollTo(m.left,m.top))}function d(r,e,o){var i=t.keyName(r);"Esc"==i||"Ctrl-C"==i||"Ctrl-["==i||"Backspace"==i&&""==e?(Nt.searchHistoryController.pushInput(e),Nt.searchHistoryController.reset(),Xe(n,h),$e(n),n.scrollTo(m.left,m.top),t.e_stop(r),B(n),o(),n.focus()):"Up"==i||"Down"==i?t.e_stop(r):"Ctrl-U"==i&&(t.e_stop(r),o(""))}if(n.getSearchCursor){var p=r.searchArgs.forward,c=r.searchArgs.wholeWordOnly;De(n).setReversed(!p);var u=p?"/":"?",h=De(n).getQuery(),m=n.getScrollInfo();switch(r.searchArgs.querySrc){case"prompt":var g=Nt.macroModeState;if(g.isPlaying){var f=g.replaySearchQueries.shift();o(f,!0,!1)}else Ke(n,{onClose:i,prefix:u,desc:zt,onKeyUp:s,onKeyDown:d});break;case"wordUnderCursor":var y=xe(n,!1,!0,!1,!0),b=!0;if(y||(y=xe(n,!1,!0,!1,!1),b=!1),!y)return;var f=n.getLine(y.start.line).substring(y.start.ch,y.end.ch);f=b&&c?"\\b"+f+"\\b":oe(f),Nt.jumpList.cachedCursor=n.getCursor(),n.setCursor(y.start),o(f,!0,!1);}}},processEx:function(n,e,r){function o(e){Nt.exCommandHistoryController.pushInput(e),Nt.exCommandHistoryController.reset(),Vt.processCommand(n,e)}function i(r,e,o){var i=t.keyName(r),s,d;("Esc"==i||"Ctrl-C"==i||"Ctrl-["==i||"Backspace"==i&&""==e)&&(Nt.exCommandHistoryController.pushInput(e),Nt.exCommandHistoryController.reset(),t.e_stop(r),B(n),o(),n.focus()),"Up"==i||"Down"==i?(t.e_stop(r),s="Up"==i,d=r.target?r.target.selectionEnd:0,e=Nt.exCommandHistoryController.nextMatch(e,s)||"",o(e),d&&r.target&&(r.target.selectionEnd=r.target.selectionStart=l(d,r.target.value.length))):"Ctrl-U"==i?(t.e_stop(r),o("")):"Left"!=i&&"Right"!=i&&"Ctrl"!=i&&"Alt"!=i&&"Shift"!=i&&Nt.exCommandHistoryController.reset()}"keyToEx"==r.type?Vt.processCommand(n,r.exArgs.input):e.visualMode?Ke(n,{onClose:o,prefix:":",value:"'<,'>",onKeyDown:i,selectValueOnOpen:!1}):Ke(n,{onClose:o,prefix:":",onKeyDown:i})},evalInput:function(e,t){var n=t.inputState,o=n.motion,s=n.motionArgs||{},l=n.operator,d=n.operatorArgs||{},c=n.registerName,u=t.sel,h=Y(t.visualMode?q(e,u.head):e.getCursor("head")),m=Y(t.visualMode?q(e,u.anchor):e.getCursor("anchor")),g=Y(h),f=Y(m),y,b,x;if(l&&this.recordLastEdit(t,n),x=void 0===n.repeatOverride?n.getRepeat():n.repeatOverride,0<x&&s.explicitRepeat?s.repeatIsExplicit=!0:(s.noRepeat||!s.explicitRepeat&&0===x)&&(x=1,s.repeatIsExplicit=!1),n.selectedCharacter&&(s.selectedCharacter=d.selectedCharacter=n.selectedCharacter),s.repeat=x,B(e),o){var v=Mt[o](e,h,s,t);if(t.lastMotion=Mt[o],!v)return;if(s.toJumplist){var k=Nt.jumpList,S=k.cachedCursor;S?(ve(e,S,v),delete k.cachedCursor):ve(e,h,v)}v instanceof Array?(b=v[0],y=v[1]):y=v,y||(y=Y(h)),t.visualMode?(!(t.visualBlock&&y.ch===Infinity)&&(y=q(e,y,t.visualBlock)),b&&(b=q(e,b,!0)),b=b||f,u.anchor=b,u.head=y,ue(e),Ee(e,t,"<",$(b,y)?b:y),Ee(e,t,">",$(b,y)?y:b)):!l&&(y=q(e,y),e.setCursor(y.line,y.ch))}if(l){if(d.lastSel){b=f;var w=d.lastSel,C=r(w.head.line-w.anchor.line),T=r(w.head.ch-w.anchor.ch);y=w.visualLine?p(f.line+C,f.ch):w.visualBlock?p(f.line+C,f.ch+T):w.head.line==w.anchor.line?p(f.line,f.ch+T):p(f.line+C,f.ch),t.visualMode=!0,t.visualLine=w.visualLine,t.visualBlock=w.visualBlock,u=t.sel={anchor:b,head:y},ue(e)}else t.visualMode&&(d.lastSel={anchor:Y(u.anchor),head:Y(u.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var _,E,A,I,N;if(!t.visualMode){if(_=Y(b||f),E=Y(y||g),$(E,_)){var L=_;_=E,E=L}A=s.linewise||d.linewise,A?ye(e,_,E):s.forward&&fe(e,_,E),I="char";var O=!s.inclusive||A;N=he(e,{anchor:_,head:E},I,O)}else if(_=Z(u.head,u.anchor),E=ee(u.head,u.anchor),A=t.visualLine||d.linewise,I=t.visualBlock?"block":A?"line":"char",N=he(e,{anchor:_,head:E},I),A){var M=N.ranges;if("block"==I)for(var D=0;D<M.length;D++)M[D].head.ch=ne(e,M[D].head.line);else"line"==I&&(M[0].head=p(M[0].head.line+1,0))}e.setSelections(N.ranges,N.primary),t.lastMotion=null,d.repeat=x,d.registerName=c,d.linewise=A;var i=Dt[l](e,d,N.ranges,f,y);t.visualMode&&ge(e,null!=i),i&&e.setCursor(i)}},recordLastEdit:function(e,t,n){var r=Nt.macroModeState;r.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=n,r.lastInsertModeChanges.changes=[],r.lastInsertModeChanges.expectCursorActivityForChange=!1)}},Mt={moveToTopLine:function(e,t,n){var r=et(e).top+n.repeat-1;return p(r,be(e.getLine(r)))},moveToMiddleLine:function(e){var t=et(e),n=o(0.5*(t.top+t.bottom));return p(n,be(e.getLine(n)))},moveToBottomLine:function(e,t,n){var r=et(e).bottom-n.repeat+1;return p(r,be(e.getLine(r)))},expandToLine:function(e,t,n){return p(t.line+n.repeat-1,Infinity)},findNext:function(e,t,n){var r=De(e),o=r.getQuery();if(o){var i=!n.forward;return i=r.isReversed()?!i:i,Ye(e,o),Je(e,i,o,n.repeat)}},goToMark:function(e,t,n,r){var o=tt(e,r,n.selectedCharacter);return o?n.linewise?{line:o.line,ch:be(e.getLine(o.line))}:o:null},moveToOtherHighlightedEnd:function(e,t,n,r){if(r.visualBlock&&n.sameLine){var o=r.sel;return[q(e,p(o.anchor.line,o.head.ch)),q(e,p(o.head.line,o.anchor.ch))]}return[r.sel.head,r.sel.anchor]},jumpToMark:function(e,t,n,r){for(var o=t,s=0,i;s<n.repeat;s++)for(var l in i=o,r.marks)if(w(l)){var d=r.marks[l].find(),c=n.forward?$(d,i):$(i,d);if(!c&&!(n.linewise&&d.line==i.line)){var u=J(i,o),h=n.forward?te(i,d,o):te(o,d,i);(u||h)&&(o=d)}}return n.linewise&&(o=p(o.line,be(e.getLine(o.line)))),o},moveByCharacters:function(e,t,n){var r=t,o=n.repeat,i=n.forward?r.ch+o:r.ch-o;return p(r.line,i)},moveByLines:function(e,t,n,r){var o=t,i=o.ch;switch(r.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:i=r.lastHPos;break;default:r.lastHPos=i;}var s=n.repeat+(n.repeatOffset||0),l=n.forward?o.line+s:o.line-s,d=e.firstLine(),c=e.lastLine();return l<d&&o.line==d?this.moveToStartOfLine(e,t,n,r):l>c&&o.line==c?this.moveToEol(e,t,n,r):(n.toFirstChar&&(i=be(e.getLine(l)),r.lastHPos=i),r.lastHSPos=e.charCoords(p(l,i),"div").left,p(l,i))},moveByDisplayLines:function(e,t,n,r){var o=t;switch(r.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:r.lastHSPos=e.charCoords(o,"div").left;}var i=n.repeat,s=e.findPosV(o,n.forward?i:-i,"line",r.lastHSPos);if(s.hitSide)if(n.forward)var l=e.charCoords(s,"div"),d={top:l.top+8,left:r.lastHSPos},s=e.coordsChar(d,"div");else{var c=e.charCoords(p(e.firstLine(),0),"div");c.left=r.lastHSPos,s=e.coordsChar(c,"div")}return r.lastHPos=s.ch,s},moveByPage:function(e,t,n){var r=n.repeat;return e.findPosV(t,n.forward?r:-r,"page")},moveByParagraph:function(e,t,n){var r=n.forward?1:-1;return Ie(e,t,n.repeat,r)},moveBySentence:function(e,t,n){var r=n.forward?1:-1;return Ne(e,t,n.repeat,r)},moveByScroll:function(e,t,n,r){var o=e.getScrollInfo(),i=null,s=n.repeat;s||(s=o.clientHeight/(2*e.defaultTextHeight()));var l=e.charCoords(t,"local");n.repeat=s;var i=Mt.moveByDisplayLines(e,t,n,r);if(!i)return null;var d=e.charCoords(i,"local");return e.scrollTo(null,o.top+d.top-l.top),i},moveByWords:function(e,t,n){return Ce(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var r=n.repeat,o=Te(e,r,n.forward,n.selectedCharacter),i=n.forward?-1:1;return(ke(i,n),!o)?null:(o.ch+=i,o)},moveToCharacter:function(e,t,n){var r=n.repeat;return ke(0,n),Te(e,r,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){var r=n.repeat;return Se(e,r,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var o=n.repeat;return r.lastHPos=o-1,r.lastHSPos=e.charCoords(t,"div").left,_e(e,o)},moveToEol:function(e,t,n,r){r.lastHPos=Infinity;var o=p(t.line+n.repeat-1,Infinity),i=e.clipPos(o);return i.ch--,r.lastHSPos=e.charCoords(i,"div").left,o},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return p(n.line,be(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){for(var n=t,r=n.line,o=n.ch,i=e.getLine(r),s;o<i.length;o++)if(s=i.charAt(o),s&&C(s)){var l=e.getTokenTypeAt(p(r,o+1));if("string"!==l&&"comment"!==l)break}if(o<i.length){var d=e.findMatchingBracket(p(r,o));return d.to}return n},moveToStartOfLine:function(e,t){return p(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var r=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(r=n.repeat-e.getOption("firstLineNumber")),p(r,be(e.getLine(r)))},textObjectManipulation:function(e,t,n,r){var o=n.selectedCharacter;"b"==o?o="(":"B"==o&&(o="{");var i=!n.textObjectInner,s;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"["}[o])s=Le(e,t,o,i);else if({"'":!0,'"':!0}[o])s=Oe(e,t,o,i);else if("W"===o)s=xe(e,i,!0,!0);else if("w"===o)s=xe(e,i,!0,!1);else{if("p"!==o)return null;if(s=Ie(e,t,n.repeat,0,i),n.linewise=!0,r.visualMode)r.visualLine||(r.visualLine=!0);else{var l=r.inputState.operatorArgs;l&&(l.linewise=!0),s.end.line--}}return e.state.vim.visualMode?ce(e,s.start,s.end):[s.start,s.end]},repeatLastCharacterSearch:function(e,t,n){var r=Nt.lastCharacterSearch,o=n.repeat,i=n.forward===r.forward,s=(r.increment?1:0)*(i?-1:1);e.moveH(-s,"char"),n.inclusive=!!i;var l=Te(e,o,i,r.selectedCharacter);return l?(l.ch+=s,l):(e.moveH(s,"char"),t)}},Dt={change:function(e,n,r){var o=Number.MAX_VALUE,i=e.state.vim,s,l;if(Nt.macroModeState.lastInsertModeChanges.inVisualBlock=i.visualBlock,!i.visualMode){var d=r[0].anchor,c=r[0].head;l=e.getRange(d,c);var u=i.lastEditInputState||{};if("moveByWords"==u.motion&&!E(l)){var h=/\s+$/.exec(l);h&&u.motionArgs&&u.motionArgs.forward&&(c=W(c,0,-h[0].length),l=l.slice(0,-h[0].length))}var m=new p(d.line-1,o),g=e.firstLine()==e.lastLine();c.line>e.lastLine()&&n.linewise&&!g?e.replaceRange("",m,c):e.replaceRange("",d,c),n.linewise&&(!g&&(e.setCursor(m),t.commands.newlineAndIndent(e)),d.ch=o),s=d}else{l=e.getSelection();var f=j("",r.length);e.replaceSelections(f),s=Z(r[0].head,r[0].anchor)}Nt.registerController.pushText(n.registerName,"change",l,n.linewise,1<r.length),Rt.enterInsertMode(e,{head:s},e.state.vim)},delete:function(e,t,n){var r=e.state.vim,o,i;if(!r.visualBlock){var s=n[0].anchor,l=n[0].head;t.linewise&&l.line!=e.firstLine()&&s.line==e.lastLine()&&s.line==l.line-1&&(s.line==e.firstLine()?s.ch=0:s=p(s.line-1,ne(e,s.line-1))),i=e.getRange(s,l),e.replaceRange("",s,l),o=s,t.linewise&&(o=Mt.moveToFirstNonWhiteSpaceCharacter(e,s))}else{i=e.getSelection();var d=j("",n.length);e.replaceSelections(d),o=n[0].anchor}Nt.registerController.pushText(t.registerName,"delete",i,t.linewise,r.visualBlock);var c=r.insertMode;return q(e,o,c)},indent:function(e,t,n){var r=e.state.vim,o=n[0].anchor.line,s=r.visualBlock?n[n.length-1].anchor.line:n[0].head.line,l=r.visualMode?t.repeat:1;t.linewise&&s--;for(var d=o;d<=s;d++)for(var i=0;i<l;i++)e.indentLine(d,t.indentRight);return Mt.moveToFirstNonWhiteSpaceCharacter(e,n[0].anchor)},changeCase:function(e,t,n,r,o){for(var s=e.getSelections(),l=[],d=t.toLower,p=0;p<s.length;p++){var c=s[p],u="";if(!0===d)u=c.toLowerCase();else if(!1===d)u=c.toUpperCase();else for(var h=0,i;h<c.length;h++)i=c.charAt(h),u+=_(i)?i.toLowerCase():i.toUpperCase();l.push(u)}return e.replaceSelections(l),t.shouldMoveCursor?o:!e.state.vim.visualMode&&t.linewise&&n[0].anchor.line+1==n[0].head.line?Mt.moveToFirstNonWhiteSpaceCharacter(e,r):t.linewise?r:Z(n[0].anchor,n[0].head)},yank:function(e,t,n,r){var o=e.state.vim,i=e.getSelection(),s=o.visualMode?Z(o.sel.anchor,o.sel.head,n[0].head,n[0].anchor):r;return Nt.registerController.pushText(t.registerName,"yank",i,t.linewise,o.visualBlock),s}},Rt={jumpListWalk:function(e,t,n){if(!n.visualMode){var r=t.repeat,o=t.forward,i=Nt.jumpList,s=i.move(e,o?r:-r),l=s?s.find():void 0;l=l?l:e.getCursor(),e.setCursor(l)}},scroll:function(e,t,n){if(!n.visualMode){var r=t.repeat||1,i=e.defaultTextHeight(),s=e.getScrollInfo().top,l=i*r,d=t.forward?s+l:s-l,p=Y(e.getCursor()),c=e.charCoords(p,"local");if(t.forward)d>c.top?(p.line+=(d-c.top)/i,p.line=Math.ceil(p.line),e.setCursor(p),c=e.charCoords(p,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,d);else{var u=d+e.getScrollInfo().clientHeight;u<c.bottom?(p.line-=(c.bottom-u)/i,p.line=o(p.line),e.setCursor(p),c=e.charCoords(p,"local"),e.scrollTo(null,c.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,d)}}},scrollToCursor:function(e,t){var n=e.getCursor().line,r=e.charCoords(p(n,0),"local"),o=e.getScrollInfo().clientHeight,i=r.top,s=r.bottom-i;switch(t.position){case"center":i=i-o/2+s;break;case"bottom":i=i-o+s;}e.scrollTo(null,i)},replayMacro:function(e,t,n){var r=t.selectedCharacter,o=t.repeat,i=Nt.macroModeState;for("@"==r&&(r=i.latestRegister);o--;)at(e,n,i,r)},enterMacroRecordMode:function(e,t){var n=Nt.macroModeState,r=t.selectedCharacter;Nt.registerController.isValidRegister(r)&&n.enterMacroRecordMode(e,r)},toggleOverwrite:function(e){e.state.overwrite?(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),t.signal(e,"vim-mode-change",{mode:"insert"})):(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),t.signal(e,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(e,n,o){if(!e.getOption("readOnly")){o.insertMode=!0,o.insertModeRepeat=n&&n.repeat||1;var i=n?n.insertAt:null,s=o.sel,c=n.head||e.getCursor("head"),u=e.listSelections().length;if("eol"==i)c=p(c.line,ne(e,c.line));else if("charAfter"==i)c=W(c,0,1);else if("firstNonBlank"==i)c=Mt.moveToFirstNonWhiteSpaceCharacter(e,c);else if("startOfSelectedArea"==i)o.visualBlock?(c=p(l(s.head.line,s.anchor.line),l(s.head.ch,s.anchor.ch)),u=r(s.head.line-s.anchor.line)+1):s.head.line<s.anchor.line?c=s.head:c=p(s.anchor.line,0);else if("endOfSelectedArea"==i)o.visualBlock?(c=p(l(s.head.line,s.anchor.line),d(s.head.ch+1,s.anchor.ch)),u=r(s.head.line-s.anchor.line)+1):s.head.line>=s.anchor.line?c=W(s.head,0,1):c=p(s.anchor.line,0);else if("inplace"==i&&o.visualMode)return;e.setOption("disableInput",!1),n&&n.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),t.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),t.signal(e,"vim-mode-change",{mode:"insert"})),Nt.macroModeState.isPlaying||(e.on("change",dt),t.on(e.getInputField(),"keydown",mt)),o.visualMode&&ge(e),se(e,c,u)}},toggleVisualMode:function(e,n,r){var o=n.repeat,i=e.getCursor(),s;r.visualMode?r.visualLine^n.linewise||r.visualBlock^n.blockwise?(r.visualLine=!!n.linewise,r.visualBlock=!!n.blockwise,t.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),ue(e)):ge(e):(r.visualMode=!0,r.visualLine=!!n.linewise,r.visualBlock=!!n.blockwise,s=q(e,p(i.line,i.ch+o-1),!0),r.sel={anchor:i,head:s},t.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),ue(e),Ee(e,r,"<",Z(i,s)),Ee(e,r,">",ee(i,s)))},reselectLastSelection:function(e,n,r){var o=r.lastSelection;if(r.visualMode&&pe(e,r),o){var i=o.anchorMark.find(),s=o.headMark.find();if(!i||!s)return;r.sel={anchor:i,head:s},r.visualMode=!0,r.visualLine=o.visualLine,r.visualBlock=o.visualBlock,ue(e),Ee(e,r,"<",Z(i,s)),Ee(e,r,">",ee(i,s)),t.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var r,o;if(n.visualMode){if(r=e.getCursor("anchor"),o=e.getCursor("head"),$(o,r)){var s=o;o=r,r=s}o.ch=ne(e,o.line)-1}else{var l=d(t.repeat,2);r=e.getCursor(),o=q(e,p(r.line+l-1,Infinity))}for(var c=0,u=r.line;u<o.line;u++){c=ne(e,r.line);var s=p(r.line+1,ne(e,r.line+1)),i=e.getRange(r,s);i=i.replace(/\n\s*/g," "),e.replaceRange(i,r,s)}var h=p(r.line,c);n.visualMode&&ge(e,!1),e.setCursor(h)},newLineAndEnterInsertMode:function(e,n,r){r.insertMode=!0;var o=Y(e.getCursor());if(o.line===e.firstLine()&&!n.after)e.replaceRange("\n",p(e.firstLine(),0)),e.setCursor(e.firstLine(),0);else{o.line=n.after?o.line:o.line-1,o.ch=ne(e,o.line),e.setCursor(o);var i=t.commands.newlineAndIndentContinueComment||t.commands.newlineAndIndent;i(e)}this.enterInsertMode(e,{repeat:n.repeat},r)},paste:function(e,t,n){var r=Y(e.getCursor()),s=Nt.registerController.getRegister(t.registerName),l=s.toString();if(l){if(t.matchIndent){var d=e.getOption("tabSize"),c=function(e){var t=e.split("\t").length-1,n=e.split(" ").length-1;return t*d+1*n},u=e.getLine(e.getCursor().line),h=c(u.match(/^\s*/)[0]),m=l.replace(/\n$/,""),g=l!==m,f=c(l.match(/^\s*/)[0]),l=m.replace(/^\s*/gm,function(t){var n=h+(c(t)-f);if(0>n)return"";if(e.getOption("indentWithTabs")){var r=o(n/d);return Array(r+1).join("\t")}return Array(n+1).join(" ")});l+=g?"\n":""}if(1<t.repeat)var l=Array(t.repeat+1).join(l);var y=s.linewise,b=s.blockwise;if(y)n.visualMode?l=n.visualLine?l.slice(0,-1):"\n"+l.slice(0,l.length-1)+"\n":t.after?(l="\n"+l.slice(0,l.length-1),r.ch=ne(e,r.line)):r.ch=0;else{if(b){l=l.split("\n");for(var x=0;x<l.length;x++)l[x]=""==l[x]?" ":l[x]}r.ch+=t.after?1:0}var i,v;if(n.visualMode){n.lastPastedText=l;var k=de(e,n),S=k[0],w=k[1],C=e.getSelection(),T=e.listSelections(),_=Array(T.length).join("1").split("1"),E;n.lastSelection&&(E=n.lastSelection.headMark.find()),Nt.registerController.unnamedRegister.setText(C),b?(e.replaceSelections(_),w=p(S.line+l.length-1,S.ch),e.setCursor(S),ie(e,w),e.replaceSelections(l),i=S):n.visualBlock?(e.replaceSelections(_),e.setCursor(S),e.replaceRange(l,S,S),i=S):(e.replaceRange(l,S,w),i=e.posFromIndex(e.indexFromPos(S)+l.length-1)),E&&(n.lastSelection.headMark=e.setBookmark(E)),y&&(i.ch=0)}else if(b){e.setCursor(r);for(var x=0,A;x<l.length;x++){A=r.line+x,A>e.lastLine()&&e.replaceRange("\n",p(A,0));var I=ne(e,A);I<r.ch&&ae(e,A,r.ch)}e.setCursor(r),ie(e,p(r.line+l.length-1,r.ch)),e.replaceSelections(l),i=r}else e.replaceRange(l,r),y&&t.after?i=p(r.line+1,be(e.getLine(r.line+1))):y&&!t.after?i=p(r.line,be(e.getLine(r.line))):!y&&t.after?(v=e.indexFromPos(r),i=e.posFromIndex(v+l.length-1)):(v=e.indexFromPos(r),i=e.posFromIndex(v+l.length));n.visualMode&&ge(e,!1),e.setCursor(i)}},undo:function(e,n){e.operation(function(){Q(e,t.commands.undo,n.repeat)(),e.setCursor(e.getCursor("anchor"))})},redo:function(e,n){Q(e,t.commands.redo,n.repeat)()},setRegister:function(e,t,n){n.inputState.registerName=t.selectedCharacter},setMark:function(e,t,n){var r=t.selectedCharacter;Ee(e,n,r,e.getCursor())},replace:function(e,n,r){var o=n.selectedCharacter,i=e.getCursor(),s=e.listSelections(),l,d;if(r.visualMode)i=e.getCursor("start"),d=e.getCursor("end");else{var c=e.getLine(i.line);l=i.ch+n.repeat,l>c.length&&(l=c.length),d=p(i.line,l)}if("\n"==o)r.visualMode||e.replaceRange("",i,d),(t.commands.newlineAndIndentContinueComment||t.commands.newlineAndIndent)(e);else{var u=e.getRange(i,d);if(u=u.replace(/[^\n]/g,o),r.visualBlock){var h=Array(e.getOption("tabSize")+1).join(" ");u=e.getSelection(),u=u.replace(/\t/g,h).replace(/[^\n]/g,o).split("\n"),e.replaceSelections(u)}else e.replaceRange(u,i,d);r.visualMode?(i=$(s[0].anchor,s[0].head)?s[0].anchor:s[0].head,e.setCursor(i),ge(e,!1)):e.setCursor(W(d,0,-1))}},incrementNumberToken:function(e,t){for(var n=e.getCursor(),r=e.getLine(n.line),o=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,i,s,l,d;null!==(i=o.exec(r))&&(s=i.index,l=s+i[0].length,!(n.ch<l)););if(t.backtrack||!(l<=n.ch)){if(i){var c=i[2]||i[4],u=i[3]||i[5],h=t.increase?1:-1,m={0:8,"0b":2,"":10,"0x":16}[c.toLowerCase()],g=parseInt(i[1]+u,m)+h*t.repeat;d=g.toString(m);var f=c?Array(u.length-d.length+1+i[1].length).join("0"):"";d="-"===d.charAt(0)?"-"+c+f+d.substr(1):c+f+d;var y=p(n.line,s),b=p(n.line,l);e.replaceRange(d,y,b)}else return;e.setCursor(p(n.line,s+d.length-1))}},repeatLastEdit:function(e,t,n){var r=n.lastEditInputState;if(r){var o=t.repeat;o&&t.repeatIsExplicit?n.lastEditInputState.repeatOverride=o:o=n.lastEditInputState.repeatOverride||o,gt(e,n,o,!1)}},indent:function(e,t){e.indentLine(e.getCursor().line,t.indentRight)},exitInsertMode:rt},Pt={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Bt={bracket:{isComplete:function(e){if(e.nextCh!==e.symb)e.nextCh===e.reverseSymb&&e.depth--;else if(e.depth++,1<=e.depth)return!0;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};N("pcre",!0,"boolean"),Me.prototype={getQuery:function(){return Nt.query},setQuery:function(e){Nt.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return Nt.isReversed},setReversed:function(e){Nt.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var Ft={"\\n":"\n","\\r":"\r","\\t":"\t"},Ut={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t"},zt="(Javascript regexp)",jt=function(){this.buildCommandMap_()};jt.prototype={processCommand:function(e,t,n){var r=this;e.operation(function(){e.curOp.isVimOp=!0,r._processCommand(e,t,n)})},_processCommand:function(n,e,r){var o=n.state.vim,s=Nt.registerController.getRegister(":"),l=s.toString();o.visualMode&&ge(n);var d=new t.StringStream(e);s.setText(e);var p=r||{};p.input=e;try{this.parseInput_(n,d,p)}catch(t){throw We(n,t),t}var c,u;if(!p.commandName)void 0!==p.line&&(u="move");else if(c=this.matchCommand_(p.commandName),c){if(u=c.name,c.excludeFromCommandHistory&&s.setText(l),this.parseCommandArgs_(d,p,c),"exToKey"==c.type){for(var h=0;h<c.toKeys.length;h++)t.Vim.handleKey(n,c.toKeys[h],"mapping");return}if("exToEx"==c.type)return void this.processCommand(n,c.toInput)}if(!u)return void We(n,"Not an editor command \":"+e+"\"");try{qt[u](n,p),c&&c.possiblyAsync||!p.callback||p.callback()}catch(t){throw We(n,t),t}},parseInput_:function(e,t,n){t.eatWhile(":"),t.eat("%")?(n.line=e.firstLine(),n.lineEnd=e.lastLine()):(n.line=this.parseLineSpec_(e,t),void 0!==n.line&&t.eat(",")&&(n.lineEnd=this.parseLineSpec_(e,t)));var r=t.match(/^(\w+)/);return n.commandName=r?r[1]:t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var r=t.next(),o=tt(e,e.state.vim,r);if(!o)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,o.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1);}},parseLineSpecOffset_:function(e,t){var n=e.match(/^([+-])?(\d+)/);if(n){var r=parseInt(n[2],10);"-"==n[1]?t-=r:t+=r}return t},parseCommandArgs_:function(e,t,n){if(!e.eol()){t.argString=e.match(/.*/)[0];var r=n.argDelimiter||/\s+/,o=re(t.argString).split(r);o.length&&o[0]&&(t.args=o)}},matchCommand_:function(e){for(var t=e.length,n;0<t;t--)if(n=e.substring(0,t),this.commandMap_[n]){var r=this.commandMap_[n];if(0===r.name.indexOf(e))return r}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e<n.length;e++){var t=n[e],r=t.shortName||t.name;this.commandMap_[r]=t}},map:function(t,n,r){if(":"!=t&&":"==t.charAt(0)){if(r)throw Error("Mode not supported for ex mappings");var o=t.substring(1);this.commandMap_[o]=":"!=n&&":"==n.charAt(0)?{name:o,type:"exToEx",toInput:n.substring(1),user:!0}:{name:o,type:"exToKey",toKeys:n,user:!0}}else if(":"!=n&&":"==n.charAt(0)){var i={keys:t,type:"keyToEx",exArgs:{input:n.substring(1)}};r&&(i.context=r),e.unshift(i)}else{var i={keys:t,type:"keyToKey",toKeys:n};r&&(i.context=r),e.unshift(i)}},unmap:function(t,n){if(":"!=t&&":"==t.charAt(0)){if(n)throw Error("Mode not supported for ex mappings");var r=t.substring(1);if(this.commandMap_[r]&&this.commandMap_[r].user)return void delete this.commandMap_[r]}else for(var o=0;o<e.length;o++)if(t==e[o].keys&&e[o].context===n)return void e.splice(o,1);throw Error("No such mapping.")}};var qt={colorscheme:function(e,t){return!t.args||1>t.args.length?void We(e,e.getOption("theme")):void e.setOption("theme",t.args[0])},map:function(e,t,n){var r=t.args;return!r||2>r.length?void(e&&We(e,"Invalid mapping: "+t.input)):void Vt.map(r[0],r[1],n)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,n){var r=t.args;return!r||1>r.length?void(e&&We(e,"No such mapping: "+t.input)):void Vt.unmap(r[0],n)},move:function(e,t){Ot.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var n=t.args,r=t.setCfg||{};if(!n||1>n.length)return void(e&&We(e,"Invalid mapping: "+t.input));var o=n[0].split("="),i=o[0],s=o[1],l=!1;if("?"==i.charAt(i.length-1)){if(s)throw Error("Trailing characters: "+t.argString);i=i.substring(0,i.length-1),l=!0}void 0===s&&"no"==i.substring(0,2)&&(i=i.substring(2),s=!1);var d=Et[i]&&"boolean"==Et[i].type;if(d&&void 0==s&&(s=!0),!d&&void 0===s||l){var p=O(i,e,r);p instanceof Error?We(e,p.message):!0===p||!1===p?We(e," "+(p?"":"no")+i):We(e," "+i+"="+p)}else{var c=L(i,s,e,r);c instanceof Error&&We(e,c.message)}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,t){var n=t.args,r=Nt.registerController.registers,o="----------Registers----------<br><br>";if(!n)for(var s in r){var l=r[s].toString();l.length&&(o+="\""+s+" "+l+"<br>")}else{var s;n=n.join("");for(var d=0;d<n.length;d++)if(s=n.charAt(d),!!Nt.registerController.isValidRegister(s)){var i=r[s]||new F;o+="\""+s+" "+i.toString()+"<br>"}}We(e,o)},sort:function(e,n){function r(e,t){if(l){var n;n=e,e=t,t=n}d&&(e=e.toLowerCase(),t=t.toLowerCase());var r=u&&x.exec(e),o=u&&x.exec(t);return r?(r=parseInt((r[1]+r[2]).toLowerCase(),v),o=parseInt((o[1]+o[2]).toLowerCase(),v),r-o):e<t?-1:1}function o(e,t){if(l){var n;n=e,e=t,t=n}return d&&(e[0]=e[0].toLowerCase(),t[0]=t[0].toLowerCase()),e[0]<t[0]?-1:1}var s=function(){if(n.argString){var e=new t.StringStream(n.argString);if(e.eat("!")&&(l=!0),e.eol())return;if(!e.eatSpace())return"Invalid arguments";var r=e.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!r&&!e.eol())return"Invalid arguments";if(r[1]){d=-1!=r[1].indexOf("i"),c=-1!=r[1].indexOf("u");var o=-1!=r[1].indexOf("d")||-1!=r[1].indexOf("n")&&1,i=-1!=r[1].indexOf("x")&&1,s=-1!=r[1].indexOf("o")&&1;if(1<o+i+s)return"Invalid arguments";u=o&&"decimal"||i&&"hex"||s&&"octal"}r[2]&&(h=new RegExp(r[2].substr(1,r[2].length-2),d?"i":""))}}(),l,d,c,u,h;if(s)return void We(e,s+": "+n.argString);var m=n.line||e.firstLine(),g=n.lineEnd||n.line||e.lastLine();if(m!=g){var f=p(m,0),y=p(g,ne(e,g)),b=e.getRange(f,y).split("\n"),x=h?h:"decimal"==u?/(-?)([\d]+)/:"hex"==u?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==u?/([0-7]+)/:null,v="decimal"==u?10:"hex"==u?16:"octal"==u?8:null,k=[],S=[];if(u||h)for(var w=0,i;w<b.length;w++)i=h?b[w].match(h):null,i&&""!=i[0]?k.push(i):!h&&x.exec(b[w])?k.push(b[w]):S.push(b[w]);else S=b;if(k.sort(h?o:r),h)for(var w=0;w<k.length;w++)k[w]=k[w].input;else u||S.sort(r);if(b=l?k.concat(S):S.concat(k),c){var C=b,T;b=[];for(var w=0;w<C.length;w++)C[w]!=T&&b.push(C[w]),T=C[w]}e.replaceRange(b.join("\n"),f,y)}},global:function(e,t){var n=t.argString;if(!n)return void We(e,"Regular Expression missing from global");var r=void 0===t.line?e.firstLine():t.line,o=t.lineEnd||t.line||e.lastLine(),s=Pe(n),l=n,d;if(s.length&&(l=s[0],d=s.slice(1,s.length).join("/")),l)try{Xe(e,l,!0,!0)}catch(t){return void We(e,"Invalid regex: "+l)}for(var p=De(e).getQuery(),c=[],u="",h=r,i;h<=o;h++)i=p.test(e.getLine(h)),i&&(c.push(h+1),u+=e.getLine(h)+"<br>");if(!d)return void We(e,u);var m=0;(function t(){if(m<c.length){var n=c[m]+d;Vt.processCommand(e,n,{callback:t})}m++})()},substitute:function(e,t){if(!e.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var n=t.argString,r=n?Fe(n,n[0]):[],o="",i=!1,s=!1,l,d,c,u;if(r.length)l=r[0],o=r[1],l&&"$"===l[l.length-1]&&(l=l.slice(0,l.length-1)+"\\n",o=o?o+"\n":"\n"),void 0!==o&&(o=O("pcre")?qe(o):je(o),Nt.lastSubstituteReplacePart=o),d=r[2]?r[2].split(" "):[];else if(n&&n.length)return void We(e,"Substitutions should be of the form :s/pattern/replace/");if(d&&(c=d[0],u=parseInt(d[1]),c&&(-1!=c.indexOf("c")&&(i=!0,c.replace("c","")),-1!=c.indexOf("g")&&(s=!0,c.replace("g","")),l=l.replace(/\//g,"\\/")+"/"+c)),l)try{Xe(e,l,!0,!0)}catch(t){return void We(e,"Invalid regex: "+l)}if(o=o||Nt.lastSubstituteReplacePart,void 0===o)return void We(e,"No previous substitute regular expression");var h=De(e),m=h.getQuery(),g=void 0===t.line?e.getCursor().line:t.line,f=t.lineEnd||g;g==e.firstLine()&&f==e.lastLine()&&(f=Infinity),u&&(g=f,f=g+u-1);var y=q(e,p(g,0)),b=e.getSearchCursor(m,y);nt(e,i,s,g,f,b,m,o,t.callback)},redo:t.commands.redo,undo:t.commands.undo,write:function(e){t.commands.save?t.commands.save(e):e.save&&e.save()},nohlsearch:function(e){$e(e)},yank:function(e){var t=Y(e.getCursor()),n=t.line,r=e.getLine(n);Nt.registerController.pushText("0","yank",r,!0,!0)},delmarks:function(e,n){if(!n.argString||!re(n.argString))return void We(e,"Argument required");for(var r=e.state.vim,o=new t.StringStream(re(n.argString));!o.eol();){o.eatSpace();var i=o.pos;if(!o.match(/[a-zA-Z]/,!1))return void We(e,"Invalid argument: "+n.argString.substring(i));var l=o.next();if(o.match("-",!0)){if(!o.match(/[a-zA-Z]/,!1))return void We(e,"Invalid argument: "+n.argString.substring(i));var d=l,p=o.next();if(w(d)&&w(p)||_(d)&&_(p)){var c=d.charCodeAt(0),u=p.charCodeAt(0);if(c>=u)return void We(e,"Invalid argument: "+n.argString.substring(i));for(var h=0,m;h<=u-c;h++)m=s(c+h),delete r.marks[m]}else return void We(e,"Invalid argument: "+d+"-")}else delete r.marks[l]}}},Vt=new jt;return t.keyMap.vim={attach:h,detach:u,call:b},N("insertModeEscKeysTimeout",200,"number"),t.keyMap["vim-insert"]={fallthrough:["default"],attach:h,detach:u,call:b},t.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:h,detach:u,call:b},R(),{buildKeyMap:function(){},getRegisterController:function(){return Nt.registerController},resetVimGlobalState_:R,getVimGlobalState_:function(){return Nt},maybeInitVimState_:D,suppressErrorLogging:!1,InsertModeKey:ht,map:function(e,t,n){Vt.map(e,t,n)},unmap:function(e,t){Vt.unmap(e,t)},setOption:L,getOption:O,defineOption:N,defineEx:function(e,t,n){if(!t)t=e;else if(0!==e.indexOf(t))throw new Error("(Vim.defineEx) \""+t+"\" is not a prefix of \""+e+"\", command not registered");qt[e]=n,Vt.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if("function"==typeof r)return r()},findKey:function(n,r,o){function i(){var e=Nt.macroModeState;if(e.isRecording){if("q"==r)return e.exitMacroRecordMode(),B(n),!0;"mapping"!=o&&it(e,r)}}function s(){if("<Esc>"==r)return B(n),d.visualMode?ge(n):d.insertMode&&rt(n),!0}function l(e){for(var o;e;)o=/<\w+-.+?>|<\w+>|./.exec(e),r=o[0],e=e.substring(o.index+r.length),t.Vim.handleKey(n,r,"mapping")}var d=D(n),p;return p=d.insertMode?function(){if(s())return!0;for(var t=d.inputState.keyBuffer+=r,o=1==r.length,l=Ot.matchCommand(t,e,d.inputState,"insert");1<t.length&&"full"!=l.type;){var t=d.inputState.keyBuffer=t.slice(1),p=Ot.matchCommand(t,e,d.inputState,"insert");"none"!=p.type&&(l=p)}if("none"==l.type)return B(n),!1;if("partial"==l.type)return Lt&&window.clearTimeout(Lt),Lt=window.setTimeout(function(){d.insertMode&&d.inputState.keyBuffer&&B(n)},O("insertModeEscKeysTimeout")),!o;if(Lt&&window.clearTimeout(Lt),o){for(var c=n.listSelections(),u=0,i;u<c.length;u++)i=c[u].head,n.replaceRange("",W(i,0,-(t.length-1)),i,"+input");Nt.macroModeState.lastInsertModeChanges.changes.pop()}return B(n),l.command}():function(){if(i()||s())return!0;var t=d.inputState.keyBuffer+=r;if(/^[1-9]\d*$/.test(t))return!0;var o=/^(\d*)(.*)$/.exec(t);if(!o)return B(n),!1;var l=d.visualMode?"visual":"normal",p=Ot.matchCommand(o[2]||o[1],e,d.inputState,l);if("none"==p.type)return B(n),!1;if("partial"==p.type)return!0;d.inputState.keyBuffer="";var o=/^(\d*)(.*)$/.exec(t);return o[1]&&"0"!=o[1]&&d.inputState.pushRepeatDigit(o[1]),p.command}(),!1===p?d.insertMode||1!==r.length?void 0:function(){return!0}:!0===p?function(){return!0}:function(){return n.operation(function(){n.curOp.isVimOp=!0;try{"keyToKey"==p.type?l(p.toKeys):Ot.processCommand(n,d,p)}catch(r){throw n.state.vim=void 0,D(n),t.Vim.suppressErrorLogging||console.log(r),r}return!0})}},handleEx:function(e,t){Vt.processCommand(e,t)},defineMotion:function(e,t){Mt[e]=t},defineAction:function(e,t){Rt[e]=t},defineOperator:function(e,t){Dt[e]=t},mapCommand:function(e,t,n,r,o){var i={keys:e,type:t};for(var s in i[t]=n,i[t+"Args"]=r,o)i[s]=o[s];ot(i)},_mapCommand:ot,defineRegister:function(e,t){var n=Nt.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(n[e])throw Error("Register already defined "+e);n[e]=t,_t.push(e)},exitVisualMode:ge,exitInsertMode:rt}}()})},yM1o:function(e,t,n){"use strict";(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===(n+"").toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);else n("traceDeprecation")?console.trace(t):console.warn(t);r=!0}return e.apply(this,arguments)}}}).call(t,n("h6ac"))},yPXq:function(e,t,n){"use strict";function r(e){o.call(this,"ConvertWorker to "+e),this.destType=e}var o=n("ZKdc"),i=n("dvMn");i.inherits(r,o),r.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},e.exports=r},yh9p:function(e,t){"use strict";function n(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function r(e,t,n){return 3*(t+n)/4-n}function o(e){return l[63&e>>18]+l[63&e>>12]+l[63&e>>6]+l[63&e]}function s(e,t,n){for(var r=[],s=t,i;s<n;s+=3)i=(16711680&e[s]<<16)+(65280&e[s+1]<<8)+(255&e[s+2]),r.push(o(i));return r.join("")}t.byteLength=function(e){var t=n(e),r=t[0],o=t[1];return 3*(r+o)/4-o},t.toByteArray=function(e){for(var t=n(e),o=t[0],s=t[1],l=new p(r(e,o,s)),c=0,u=0<s?o-4:o,h=0,i;h<u;h+=4)i=d[e.charCodeAt(h)]<<18|d[e.charCodeAt(h+1)]<<12|d[e.charCodeAt(h+2)]<<6|d[e.charCodeAt(h+3)],l[c++]=255&i>>16,l[c++]=255&i>>8,l[c++]=255&i;return 2===s&&(i=d[e.charCodeAt(h)]<<2|d[e.charCodeAt(h+1)]>>4,l[c++]=255&i),1===s&&(i=d[e.charCodeAt(h)]<<10|d[e.charCodeAt(h+1)]<<4|d[e.charCodeAt(h+2)]>>2,l[c++]=255&i>>8,l[c++]=255&i),l},t.fromByteArray=function(e){for(var t=e.length,n=t%3,r=[],o=16383,d=0,i=t-n,p;d<i;d+=o)r.push(s(e,d,d+o>i?i:d+o));return 1==n?(p=e[t-1],r.push(l[p>>2]+l[63&p<<4]+"==")):2==n&&(p=(e[t-2]<<8)+e[t-1],r.push(l[p>>10]+l[63&p>>4]+l[63&p<<2]+"=")),r.join("")};for(var l=[],d=[],p="undefined"==typeof Uint8Array?Array:Uint8Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,i=c.length;u<i;++u)l[u]=c[u],d[c.charCodeAt(u)]=u;d[45]=62,d[95]=63},z3uY:function(e,t,n){"use strict";var r=n("4McY"),o=n("IDli"),i=n("8Agl"),s=Object.defineProperty;t.f=n("s0rf")?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return s(e,t,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},zH6J:function(e,t,n){"use strict";e.exports=n("3Vd+").document&&document.documentElement},zKjx:function(e,t,n){"use strict";n("RJVP")},zs1I:function(e,t,n){"use strict";var r=Math.min;(function(e){e(n("tQq4"))})(function(t){t.registerHelper("fold","brace",function(e,n){function o(r){for(var o=n.ch,i=0,d;;){if(d=0>=o?-1:l.lastIndexOf(r,o-1),-1==d){if(1==i)break;i=1,o=l.length;continue}if(1==i&&d<n.ch)break;if(u=e.getTokenTypeAt(t.Pos(s,d+1)),!/^(comment|string)/.test(u))return d+1;o=d-1}}var s=n.line,l=e.getLine(s),d="{",p="}",c=o("{"),u;if(null==c&&(d="[",p="]",c=o("[")),null!=c){var h=1,m=e.lastLine(),g,f;outer:for(var y=s;y<=m;++y)for(var i=e.getLine(y),b=y==s?c:0;;){var x=i.indexOf(d,b),v=i.indexOf(p,b);if(0>x&&(x=i.length),0>v&&(v=i.length),b=r(x,v),b==i.length)break;if(e.getTokenTypeAt(t.Pos(y,b+1))==u)if(b==x)++h;else if(! --h){g=y,f=b;break outer}++b}return null==g||s==g&&f==c?void 0:{from:t.Pos(s,c),to:t.Pos(g,f)}}}),t.registerHelper("fold","import",function(n,e){function o(o){if(o<n.firstLine()||o>n.lastLine())return null;var s=n.getTokenAt(t.Pos(o,1));if(/\S/.test(s.string)||(s=n.getTokenAt(t.Pos(o,s.end+1))),"keyword"!=s.type||"import"!=s.string)return null;for(var l=o,i=r(n.lastLine(),o+10);l<=i;++l){var e=n.getLine(l),d=e.indexOf(";");if(-1!=d)return{startCh:s.end,end:t.Pos(l,d)}}}var i=e.line,s=o(i),l;if(!s||o(i-1)||(l=o(i-2))&&l.end.line==i-1)return null;for(var d=s.end,p;;){if(p=o(d.line+1),null==p)break;d=p.end}return{from:n.clipPos(t.Pos(i,s.startCh+1)),to:d}}),t.registerHelper("fold","include",function(e,n){function r(n){if(n<e.firstLine()||n>e.lastLine())return null;var r=e.getTokenAt(t.Pos(n,1));if(/\S/.test(r.string)||(r=e.getTokenAt(t.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8))return r.start+8}var o=n.line,i=r(o);if(null==i||null!=r(o-1))return null;for(var s=o,l;;){if(l=r(s+1),null==l)break;++s}return{from:t.Pos(o,i+1),to:e.clipPos(t.Pos(s))}})})}}); |