h&&m.from=y)break;j>g&&l(Math.max(x,g),null==t&&x<=h,Math.min(j,y),null==n&&j>=p,w.dir)}}catch(S){k.e(S)}finally{k.f()}if((g=O.to+1)>=y)break}}}catch(S){v.e(S)}finally{v.f()}return 0==s.length&&l(h,null==t,p,null==n,e.textDirection),{top:o,bottom:a,horizontal:s}}function w(e,t){var n=a.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(t.view,e)})).reduce((function(e,t){return e.concat(t)})),o=[],a=Object(u.a)(n.selection.ranges);try{for(a.s();!(e=a.n()).done;){var s=e.value,l=s==n.selection.main;if(s.empty?!l||Or:r.drawRangeCursor){var c=Tr(this.view,s,l);c&&o.push(c)}}}catch(f){a.e(f)}finally{a.f()}return{rangePieces:i,cursors:o}}},{key:"drawSel",value:function(e){var t=this,n=e.rangePieces,r=e.cursors;if(n.length!=this.rangePieces.length||n.some((function(e,n){return!e.eq(t.rangePieces[n])}))){this.selectionLayer.textContent="";var i,o=Object(u.a)(n);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.selectionLayer.appendChild(a.draw())}}catch(d){o.e(d)}finally{o.f()}this.rangePieces=n}if(r.length!=this.cursors.length||r.some((function(e,n){return!e.eq(t.cursors[n])}))){var s=this.cursorLayer.children;if(s.length!==r.length){this.cursorLayer.textContent="";var l,c=Object(u.a)(r);try{for(c.s();!(l=c.n()).done;){var f=l.value;this.cursorLayer.appendChild(f.draw())}}catch(d){c.e(d)}finally{c.f()}}else r.forEach((function(e,t){return e.adjust(s[t])}));this.cursors=r}}},{key:"destroy",value:function(){this.selectionLayer.remove(),this.cursorLayer.remove()}}]),e}()),Sr={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};Or&&(Sr[".cm-line"].caretColor="transparent !important");var Er=h.i.override(tr.theme(Sr));function Cr(e){var t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==pt.LTR?t.left:t.right-e.scrollDOM.clientWidth)-e.scrollDOM.scrollLeft,top:t.top-e.scrollDOM.scrollTop}}function Mr(e,t,n){var r=h.e.cursor(t);return{from:Math.max(n.from,e.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,e.moveToLineBoundary(r,!0,!0).from),type:Ee.Text}}function Pr(e,t){var n=e.visualLineAt(t);if(Array.isArray(n.type)){var r,i=Object(u.a)(n.type);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.to>t||o.to==t&&(o.to==n.to||o.type==Ee.Text))return o}}catch(a){i.e(a)}finally{i.f()}}return n}function Tr(e,t,n){var r=e.coordsAtPos(t.head,t.assoc||1);if(!r)return null;var i=Cr(e);return new xr(r.left-i.left,r.top-i.top,-1,r.bottom-r.top,n?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary")}function Ar(e,t,n,r,i){t.lastIndex=0;for(var o,a=e.iterRange(n,r),s=n;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;o=t.exec(a.value);)i(s+o.index,s+o.index+o[0].length,o)}var Dr=function(){function e(t){Object(f.a)(this,e);var n=t.regexp,r=t.decoration,i=t.boundary;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");this.regexp=n,this.getDeco="function"==typeof r?r:function(){return r},this.boundary=i}return Object(d.a)(e,[{key:"createDeco",value:function(e){var t,n=this,r=new m.b,i=Object(u.a)(e.visibleRanges);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=o.from,s=o.to;Ar(e.state.doc,this.regexp,a,s,(function(t,i,o){return r.add(t,i,n.getDeco(o,e,t))}))}}catch(l){i.e(l)}finally{i.f()}return r.finish()}},{key:"updateDeco",value:function(e,t){var n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((function(t,i,o,a){a>e.view.viewport.from&&o1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}},{key:"updateRange",value:function(e,t,n,r){var i,o=this,a=Object(u.a)(e.visibleRanges);try{for(a.s();!(i=a.n()).done;){var s=i.value,l=Math.max(s.from,n),c=Math.min(s.to,r);c>l&&function(){var n=e.state.doc.lineAt(l),r=n.ton.from;l--)if(o.boundary.test(n.text[l-1-n.from])){i=l;break}for(;ca},add:u})}()}}catch(f){a.e(f)}finally{a.f()}return t}}]),e}(),Rr=null!=/x/.unicode?"gu":"g",Nr=new RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]",Rr),Lr={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},_r=null;var Ir=h.g.define({combine:function(e){var t=Object(h.m)(e,{render:null,specialChars:Nr,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==_r&&"undefined"!=typeof document&&document.body){var t=document.body.style;_r=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return _r||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,Rr)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,Rr)),t}});function $r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[Ir.of(e),zr()]}var Br=null;function zr(){return Br||(Br=Je.fromClass(function(){function e(t){Object(f.a)(this,e),this.view=t,this.decorations=Ce.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Ir)),this.decorations=this.decorator.createDeco(t)}return Object(d.a)(e,[{key:"makeDecorator",value:function(e){var t=this;return new Dr({regexp:e.specialChars,decoration:function(n,r,i){var o=r.state.doc,a=Object(p.b)(n[0],0);if(9==a){var s=o.lineAt(i),l=r.state.tabSize,c=Object(p.d)(s.text,l,i-s.from);return Ce.replace({widget:new Wr((l-c%l)*t.view.defaultCharacterWidth)})}return t.decorationCache[a]||(t.decorationCache[a]=Ce.replace({widget:new Fr(e,a)}))},boundary:e.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(e){var t=e.state.facet(Ir);e.startState.facet(Ir)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}}]),e}(),{decorations:function(e){return e.decorations}}))}var Fr=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(e,r){var i;return Object(f.a)(this,n),(i=t.call(this)).options=e,i.code=r,i}return Object(d.a)(n,[{key:"eq",value:function(e){return e.code==this.code}},{key:"toDOM",value:function(e){var t,n=(t=this.code)>=32?"\u2022":10==t?"\u2424":String.fromCharCode(9216+t),r=e.state.phrase("Control character")+" "+(Lr[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;var o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}},{key:"ignoreEvent",value:function(){return!1}}]),n}(Se),Wr=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this)).width=e,r}return Object(d.a)(n,[{key:"eq",value:function(e){return e.width==this.width}},{key:"toDOM",value:function(){var e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}},{key:"ignoreEvent",value:function(){return!1}}]),n}(Se);function Vr(){return Qr}var Hr=Ce.line({attributes:{class:"cm-activeLine"}}),Qr=Je.fromClass(function(){function e(t){Object(f.a)(this,e),this.decorations=this.getDeco(t)}return Object(d.a)(e,[{key:"update",value:function(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}},{key:"getDeco",value:function(e){var t,n=-1,r=[],i=Object(u.a)(e.state.selection.ranges);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(!o.empty)return Ce.none;var a=e.visualLineAt(o.head);a.from>n&&(r.push(Hr.range(a.from)),n=a.from)}}catch(s){i.e(s)}finally{i.f()}return Ce.set(r)}}]),e}(),{decorations:function(e){return e.decorations}})},function(e,t,n){"use strict";var r=n(1),i=n(7),o=n(0),a=n.n(o),s=(n(11),n(96)),l=n.n(s),c=n(211),u=n(241),f=n(156),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var o=t.defaultTheme,s=t.withTheme,d=void 0!==s&&s,h=t.name,p=Object(i.a)(t,["defaultTheme","withTheme","name"]);var v=h,m=Object(c.a)(e,Object(r.a)({defaultTheme:o,Component:n,name:h||n.displayName,classNamePrefix:v},p)),g=a.a.forwardRef((function(e,t){e.classes;var s,l=e.innerRef,c=Object(i.a)(e,["classes","innerRef"]),p=m(Object(r.a)({},n.defaultProps,e)),v=c;return("string"===typeof h||d)&&(s=Object(f.a)()||o,h&&(v=Object(u.a)({theme:s,name:h,props:c})),d&&!v.theme&&(v.theme=s)),a.a.createElement(n,Object(r.a)({ref:l||t,classes:p},v))}));return l()(g,n),g}},h=n(68);t.a=function(e,t){return d(e,Object(r.a)({defaultTheme:h.a},t))}},function(e,t,n){e.exports=n(182)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;te)return f[t-1]<=e;return!1}function p(e){return e>=127462&&e<=127487}function v(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(n?m:g)(e,t)}function m(e,t){if(t==e.length)return t;t&&y(e.charCodeAt(t))&&b(e.charCodeAt(t-1))&&t--;var n=O(e,t);for(t+=w(n);t=0&&p(O(e,o));)i++,o-=2;if(i%2==0)break;t+=2}}return t}function g(e,t){for(;t>0;){var n=m(e,t-2);if(n=56320&&e<57344}function b(e){return e>=55296&&e<56320}function O(e,t){var n=e.charCodeAt(t);if(!b(n)||t+1==e.length)return n;var r=e.charCodeAt(t+1);return y(r)?r-56320+(n-55296<<10)+65536:n}function k(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function w(e){return e<65536?1:2}function x(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,i=0;i=t)return i;if(i==e.length)break;o+=9==e.charCodeAt(i)?n-o%n:1,i=v(e,i)}return!0===r?-1:e.length}var S=function(){function e(){Object(c.a)(this,e)}return Object(u.a)(e,[{key:"lineAt",value:function(e){if(e<0||e>this.length)throw new RangeError("Invalid position ".concat(e," in document of length ").concat(this.length));return this.lineInner(e,!1,1,0)}},{key:"line",value:function(e){if(e<1||e>this.lines)throw new RangeError("Invalid line number ".concat(e," in ").concat(this.lines,"-line document"));return this.lineInner(e,!0,1,0)}},{key:"replace",value:function(e,t,n){var r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),C.from(r,this.length-(t-e)+n.length)}},{key:"append",value:function(e){return this.replace(this.length,this.length,e)}},{key:"slice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=[];return this.decompose(e,t,n,0),C.from(n,t-e)}},{key:"eq",value:function(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;for(var t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new A(this),i=new A(e),o=t,a=t;;){if(r.next(o),i.next(o),o=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}},{key:"iter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return new A(this,e)}},{key:"iterRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;return new D(this,e,t)}},{key:"iterLines",value:function(e,t){var n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);var r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new R(n)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var e=[];return this.flatten(e),e}}],[{key:"of",value:function(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new E(t):C.from(E.split(t,[])):e.empty}}]),e}(),E=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:M(e);return Object(c.a)(this,n),(r=t.call(this)).text=e,r.length=i,r}return Object(u.a)(n,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(e,t,n,r){for(var i=0;;i++){var o=this.text[i],a=r+o.length;if((t?n:a)>=e)return new N(r,a,n,o);r=a+1,n++}}},{key:"decompose",value:function(e,t,r,i){var o=e<=0&&t>=this.length?this:new n(T(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&i){var a=r.pop(),s=P(o.text,a.text.slice(),0,o.length);if(s.length<=32)r.push(new n(s,a.length+o.length));else{var l=s.length>>1;r.push(new n(s.slice(0,l)),new n(s.slice(l)))}}else r.push(o)}},{key:"replace",value:function(e,t,r){if(!(r instanceof n))return Object(o.a)(Object(a.a)(n.prototype),"replace",this).call(this,e,t,r);var i=P(this.text,P(r.text,T(this.text,0,e)),t),s=this.length+r.length-(t-e);return i.length<=32?new n(i,s):C.from(n.split(i,[]),s)}},{key:"sliceString",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r="",i=0,o=0;i<=t&&oe&&o&&(r+=n),ei&&(r+=a.slice(Math.max(0,e-i),t-i)),i=s+1}return r}},{key:"flatten",value:function(e){var t,n=Object(i.a)(this.text);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.push(r)}}catch(o){n.e(o)}finally{n.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(e,t){var r,o=[],a=-1,s=Object(i.a)(e);try{for(s.s();!(r=s.n()).done;){var l=r.value;o.push(l),a+=l.length+1,32==o.length&&(t.push(new n(o,a)),o=[],a=-1)}}catch(c){s.e(c)}finally{s.f()}return a>-1&&t.push(new n(o,a)),t}}]),n}(S),C=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r){var o;Object(c.a)(this,n),(o=t.call(this)).children=e,o.length=r,o.lines=0;var a,s=Object(i.a)(e);try{for(s.s();!(a=s.n()).done;){var l=a.value;o.lines+=l.lines}}catch(u){s.e(u)}finally{s.f()}return o}return Object(u.a)(n,[{key:"lineInner",value:function(e,t,n,r){for(var i=0;;i++){var o=this.children[i],a=r+o.length,s=n+o.lines-1;if((t?s:a)>=e)return o.lineInner(e,t,n,r);r=a+1,n=s+1}}},{key:"decompose",value:function(e,t,n,r){for(var i=0,o=0;o<=t&&i=o){var l=r&((o<=e?1:0)|(s>=t?2:0));o>=e&&s<=t&&!l?n.push(a):a.decompose(e-o,t-o,n,l)}o=s+1}}},{key:"replace",value:function(e,t,r){if(r.lines=s&&t<=c){var u=l.replace(e-s,t-s,r),f=this.lines-l.lines+u.lines;if(u.lines>4&&u.lines>f>>6){var d=this.children.slice();return d[i]=u,new n(d,this.length-(t-e)+r.length)}return Object(o.a)(Object(a.a)(n.prototype),"replace",this).call(this,s,c,u)}s=c+1}return Object(o.a)(Object(a.a)(n.prototype),"replace",this).call(this,e,t,r)}},{key:"sliceString",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r="",i=0,o=0;ie&&i&&(r+=n),eo&&(r+=a.sliceString(e-o,t-o,n)),o=s+1}return r}},{key:"flatten",value:function(e){var t,n=Object(i.a)(this.children);try{for(n.s();!(t=n.n()).done;){t.value.flatten(e)}}catch(r){n.e(r)}finally{n.f()}}},{key:"scanIdentical",value:function(e,t){if(!(e instanceof n))return 0;for(var i=0,o=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1],a=Object(r.a)(o,4),s=a[0],l=a[1],c=a[2],u=a[3];;s+=t,l+=t){if(s==c||l==u)return i;var f=this.children[s],d=e.children[l];if(f!=d)return i+f.scanIdentical(d,t);i+=f.length+1}}}],[{key:"from",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.reduce((function(e,t){return e+t.length+1}),-1),o=0,a=Object(i.a)(e);try{for(a.s();!(t=a.n()).done;){var s=t.value;o+=s.lines}}catch(j){a.e(j)}finally{a.f()}if(o<32){var l,c=[],u=Object(i.a)(e);try{for(u.s();!(l=u.n()).done;){var f=l.value;f.flatten(c)}}catch(j){u.e(j)}finally{u.f()}return new E(c,r)}var d=Math.max(32,o>>5),h=d<<1,p=d>>1,v=[],m=0,g=-1,y=[];function b(e){var t;if(e.lines>h&&e instanceof n){var r,o=Object(i.a)(e.children);try{for(o.s();!(r=o.n()).done;){b(r.value)}}catch(j){o.e(j)}finally{o.f()}}else e.lines>p&&(m>p||!m)?(O(),v.push(e)):e instanceof E&&m&&(t=y[y.length-1])instanceof E&&e.lines+t.lines<=32?(m+=e.lines,g+=e.length+1,y[y.length-1]=new E(t.text.concat(e.text),t.length+1+e.length)):(m+e.lines>d&&O(),m+=e.lines,g+=e.length+1,y.push(e))}function O(){0!=m&&(v.push(1==y.length?y[0]:n.from(y,g)),g=-1,m=y.length=0)}var k,w=Object(i.a)(e);try{for(w.s();!(k=w.n()).done;){var x=k.value;b(x)}}catch(j){w.e(j)}finally{w.f()}return O(),1==v.length?v[0]:new n(v,r)}}]),n}(S);function M(e){var t,n=-1,r=Object(i.a)(e);try{for(r.s();!(t=r.n()).done;){n+=t.value.length+1}}catch(o){r.e(o)}finally{r.f()}return n}function P(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,i=0,o=0,a=!0;o=n&&(l>r&&(s=s.slice(0,r-i)),i1&&void 0!==arguments[1]?arguments[1]:1;Object(c.a)(this,e),this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[n>0?1:(t instanceof E?t.text.length:t.children.length)<<1]}return Object(u.a)(e,[{key:"nextInner",value:function(e,t){for(this.done=this.lineBreak=!1;;){var n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],o=i>>1,a=r instanceof E?r.text.length:r.children.length;if(o==(t>0?a:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof E){var s=r.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,s.length>Math.max(0,e))return this.value=0==e?s:t>0?s.slice(e):s.slice(0,s.length-e),this;e-=s.length}else{var l=r.children[o+(t<0?-1:0)];e>l.length?(e-=l.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(l),this.offsets.push(t>0?1:(l instanceof E?l.text.length:l.children.length)<<1))}}}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}]),e}(),D=function(){function e(t,n,r){Object(c.a)(this,e),this.value="",this.done=!1,this.cursor=new A(t,n>r?-1:1),this.pos=n>r?t.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}return Object(u.a)(e,[{key:"nextInner",value:function(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);var n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;var r=this.cursor.next(e).value;return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),e}(),R=function(){function e(t){Object(c.a)(this,e),this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}return Object(u.a)(e,[{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.inner.next(e),n=t.done,r=t.lineBreak,i=t.value;return n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}},{key:"lineBreak",get:function(){return!1}}]),e}();"undefined"!=typeof Symbol&&(S.prototype[Symbol.iterator]=function(){return this.iter()},A.prototype[Symbol.iterator]=D.prototype[Symbol.iterator]=R.prototype[Symbol.iterator]=function(){return this});var N=function(){function e(t,n,r,i){Object(c.a)(this,e),this.from=t,this.to=n,this.number=r,this.text=i}return Object(u.a)(e,[{key:"length",get:function(){return this.to-this.from}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(157);function i(e){if("string"!==typeof e)throw new Error(Object(r.a)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(36);function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o=n(85);function a(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?Object(o.a)(e):t}function s(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Object(r.a)(e);if(t){var o=Object(r.a)(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return a(this,n)}}},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return A})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return W})),n.d(t,"d",(function(){return M})),n.d(t,"e",(function(){return T})),n.d(t,"f",(function(){return B})),n.d(t,"g",(function(){return P})),n.d(t,"h",(function(){return C})),n.d(t,"i",(function(){return S})),n.d(t,"j",(function(){return m}));var r=n(18),i=n(17),o=n(3),a=n(5),s=n(6),l=n(23),c=n(4),u=n(9),f=n(15),d=new l.b;var h=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];Object(a.a)(this,e),this.data=t,this.topNode=r,c.f.prototype.hasOwnProperty("tree")||Object.defineProperty(c.f.prototype,"tree",{get:function(){return m(this)}}),this.parser=n,this.extension=[S.of(this),c.f.languageData.of((function(e,t,n){return e.facet(p(e,t,n))}))].concat(i)}return Object(s.a)(e,[{key:"isActiveAt",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return p(e,t,n)==this.data}},{key:"findRegions",value:function(e){var t=this,n=e.facet(S);if((null===n||void 0===n?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];var r=[];return function e(n,i){if(n.prop(d)!=t.data){var a=n.prop(l.b.mounted);if(a){if(a.tree.prop(d)==t.data){if(a.overlay){var s,c=Object(o.a)(a.overlay);try{for(c.s();!(s=c.n()).done;){var u=s.value;r.push({from:u.from+i,to:u.to+i})}}catch(v){c.e(v)}finally{c.f()}}else r.push({from:i,to:i+n.length});return}if(a.overlay){var f=r.length;if(e(a.tree,a.overlay[0].from+i),r.length>f)return}}for(var h=0;h0}}],[{key:"define",value:function(e){var t,r=(t=e.languageData,c.g.define({combine:t?function(e){return e.concat(t)}:void 0}));return new n(r,e.parser.configure({props:[d.add((function(e){return e.isTop?r:void 0}))]}))}}]),n}(h);function m(e){var t=e.field(h.state,!1);return t?t.tree:l.f.empty}var g=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.length;Object(a.a)(this,e),this.doc=t,this.length=n,this.cursorPos=0,this.string="",this.cursor=t.iter()}return Object(s.a)(e,[{key:"syncTo",value:function(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}},{key:"chunk",value:function(e){return this.syncTo(e),this.string}},{key:"lineChunks",get:function(){return!0}},{key:"read",value:function(e,t){var n=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}]),e}(),y=null,b=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0,c=arguments.length>7?arguments[7]:void 0;Object(a.a)(this,e),this.parser=t,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=s,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}return Object(s.a)(e,[{key:"startParse",value:function(){return this.parser.startParse(new g(this.state.doc),this.fragments)}},{key:"work",value:function(e,t){var n=this;return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=l.f.empty&&this.isDone(null!==t&&void 0!==t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((function(){var r;n.parse||(n.parse=n.startParse()),null!=t&&(null==n.parse.stoppedAt||n.parse.stoppedAt>t)&&ti)return!1}}))}},{key:"takeTree",value:function(){var e,t,n=this;this.parse&&(e=this.parse.parsedPos)>this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((function(){for(;!(t=n.parse.advance()););})),this.tree=t,this.fragments=this.withoutTempSkipped(l.g.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(e){var t=y;y=this;try{return e()}finally{y=t}}},{key:"withoutTempSkipped",value:function(e){for(var t;t=this.tempSkipped.pop();)e=O(e,t.from,t.to);return e}},{key:"changes",value:function(t,n){var r=this.fragments,i=this.tree,a=this.treeLen,s=this.viewport,c=this.skipped;if(this.takeTree(),!t.empty){var u=[];if(t.iterChangedRanges((function(e,t,n,r){return u.push({fromA:e,toA:t,fromB:n,toB:r})})),r=l.g.applyChanges(r,u),i=l.f.empty,a=0,s={from:t.mapPos(s.from,-1),to:t.mapPos(s.to,1)},this.skipped.length){c=[];var f,d=Object(o.a)(this.skipped);try{for(d.s();!(f=d.n()).done;){var h=f.value,p=t.mapPos(h.from,1),v=t.mapPos(h.to,-1);pe.from&&(this.fragments=O(this.fragments,i,o),this.skipped.splice(n--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(e,t){this.skipped.push({from:e,to:t})}},{key:"movedPast",value:function(e){return this.treeLen=e}},{key:"isDone",value:function(e){var t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}}],[{key:"getSkippingParser",value:function(e){return new(function(t){Object(r.a)(c,t);var n=Object(i.a)(c);function c(){return Object(a.a)(this,c),n.apply(this,arguments)}return Object(s.a)(c,[{key:"createParse",value:function(t,n,r){var i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance:function(){var t=y;if(t){var n,s=Object(o.a)(r);try{for(s.s();!(n=s.n()).done;){var c=n.value;t.tempSkipped.push(c)}}catch(u){s.e(u)}finally{s.f()}e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=a,new l.f(l.d.none,[],[],a-i)},stoppedAt:null,stopAt:function(){}}}}]),c}(l.e))}},{key:"get",value:function(){return y}}]),e}();function O(e,t,n){return l.g.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var k=function(){function e(t){Object(a.a)(this,e),this.context=t,this.tree=t.tree}return Object(s.a)(e,[{key:"apply",value:function(t){if(!t.docChanged)return this;var n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(25,r)||n.takeTree(),new e(n)}}],[{key:"init",value:function(t){var n=new b(t.facet(S).parser,t,[],l.f.empty,0,{from:0,to:t.doc.length},[],null);return n.work(25)||n.takeTree(),new e(n)}}]),e}();h.state=c.k.define({create:k.init,update:function(e,t){var n,r=Object(o.a)(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.is(h.setState))return i.value}}catch(a){r.e(a)}finally{r.f()}return t.startState.facet(S)!=t.state.facet(S)?k.init(t.state):e.apply(t)}});var w="undefined"!=typeof window&&window.requestIdleCallback||function(e,t){var n=t.timeout;return setTimeout(e,n)},x="undefined"!=typeof window&&window.cancelIdleCallback||clearTimeout,j=u.f.fromClass(function(){function e(t){Object(a.a)(this,e),this.view=t,this.working=-1,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return Object(s.a)(e,[{key:"update",value:function(e){var t=this.view.state.field(h.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}},{key:"scheduleWork",value:function(){if(!(this.working>-1)){var e=this.view.state,t=e.field(h.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=w(this.work,{timeout:500}))}}},{key:"work",value:function(e){this.working=-1;var t=Date.now();if(this.chunkEnd=i+1e6)){var a=Math.min(this.chunkBudget,e?Math.max(25,e.timeRemaining()):100),s=o.context.work(a,i+1e6);this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0||o.context.movedPast(i))&&(o.context.takeTree(),this.view.dispatch({effects:h.setState.of(new k(o.context))})),!s&&this.chunkBudget>0&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}}}},{key:"checkAsyncSchedule",value:function(e){var t=this;e.scheduleOn&&(e.scheduleOn.then((function(){return t.scheduleWork()})),e.scheduleOn=null)}},{key:"destroy",value:function(){this.working>=0&&x(this.working)}}]),e}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),S=c.g.define({combine:function(e){return e.length?e[0]:null},enables:[h.state,j]}),E=c.g.define(),C=c.g.define({combine:function(e){if(!e.length)return" ";if(!/^(?: +|\t+)$/.test(e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return e[0]}});function M(e){var t=e.facet(C);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function P(e,t){var n="",r=e.tabSize;if(9==e.facet(C).charCodeAt(0))for(;t>=r;)n+="\t",t-=r;for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,e),this.state=t,this.options=n,this.unit=M(t)}return Object(s.a)(e,[{key:"lineAt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.state.doc.lineAt(e),r=this.options.simulateBreak;return null!=r&&r>=n.from&&r<=n.to?(t<0?r1&&void 0!==arguments[1]?arguments[1]:1;if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";var n=this.lineAt(e,t),r=n.text,i=n.from;return r.slice(e-i,Math.min(r.length,e+100-i))}},{key:"column",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.lineAt(e,t),r=n.text,i=n.from,o=this.countColumn(r,e-i),a=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return a>-1&&(o+=a-this.countColumn(r,r.search(/\S|$/))),o}},{key:"countColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return Object(f.d)(e,this.state.tabSize,t)}},{key:"lineIndent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.lineAt(e,t),r=n.text,i=n.from,o=this.options.overrideIndentation;if(o){var a=o(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),e}(),D=new l.b;function R(e){var t=e.type.prop(D);if(t)return t;var n,r=e.firstChild;if(r&&(n=r.type.prop(l.b.closedBy))){var i=e.lastChild,o=i&&n.indexOf(i.name)>-1;return function(e){return $(e,!0,1,void 0,o&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?i.from:void 0)}}return null==e.parent?L:null}function N(e,t,n){for(;e;e=e.parent){var r=R(e);if(r)return r(new _(n,t,e))}return null}function L(){return 0}var _=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(e,r,i){var o;return Object(a.a)(this,n),(o=t.call(this,e.state,e.options)).base=e,o.pos=r,o.node=i,o}return Object(s.a)(n,[{key:"textAfter",get:function(){return this.textAfterPos(this.pos)}},{key:"baseIndent",get:function(){for(var e=this.state.doc.lineAt(this.node.from);;){for(var t=this.node.resolve(e.from);t.parent&&t.parent.from==t.from;)t=t.parent;if(I(t,this.node))break;e=this.state.doc.lineAt(t.from)}return this.lineIndent(e.from)}},{key:"continue",value:function(){var e=this.node.parent;return e?N(e,this.pos,this.base):0}}]),n}(A);function I(e,t){for(var n=t;n;n=n.parent)if(e==n)return!0;return!1}function $(e,t,n,r,i){var o=e.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==e.pos+a,l=t?function(e){var t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;for(var i=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),a=null==i||i<=o.from?o.to:Math.min(o.to,i),s=n.to;;){var l=t.childAfter(s);if(!l||l==r)return null;if(!l.type.isSkipped)return l.fromi.from+200)return e;var a=n.sliceString(i.from,r);if(!t.some((function(e){return e.test(a)})))return e;var s,l=e.state,c=-1,u=[],f=Object(o.a)(l.selection.ranges);try{for(f.s();!(s=f.n()).done;){var d=s.value.head,h=l.doc.lineAt(d);if(h.from!=c){c=h.from;var p=T(l,h.from);if(null!=p){var v=/^\s*/.exec(h.text)[0],m=P(l,p);v!=m&&u.push({from:h.from,to:h.from+v.length,insert:m})}}}}catch(g){f.e(g)}finally{f.f()}return u.length?[e,{changes:u,sequential:!0}]:e}))}var z=c.g.define(),F=new l.b;function W(e,t,n){var r,i=Object(o.a)(e.facet(z));try{for(i.s();!(r=i.n()).done;){var a=(0,r.value)(e,t,n);if(a)return a}}catch(s){i.e(s)}finally{i.f()}return function(e,t,n){var r=m(e);if(0==r.length)return null;for(var i=null,o=r.resolveInner(n);o;o=o.parent)if(!(o.to<=n||o.from>n)){if(i&&o.from=t&&s.to>n&&(i=s)}}return i}(e,t,n)}},function(e,t,n){"use strict";n.d(t,"e",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return d})),n.d(t,"f",(function(){return h}));var r=n(157);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:n,values:i=i.map((function(e){return parseFloat(e)}))}}function a(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function s(e,t){var n=l(e),r=l(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function l(e){var t="hsl"===(e=o(e)).type?o(function(e){var t=(e=o(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-s*Math.max(Math.min(t-3,9-t,1),-1)},c="rgb",u=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),a({type:c,values:u})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return l(e)>.5?d(e,t):h(e,t)}function u(e,t){return f(e,t)}function f(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,a(e)}function d(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}function h(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return a(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return h})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return A})),n.d(t,"f",(function(){return v})),n.d(t,"g",(function(){return T}));var r=n(14),i=n(3),o=n(6),a=n(5),s=1024,l=0,c=function e(t,n){Object(a.a)(this,e),this.from=t,this.to=n},u=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this,e),this.id=l++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return Object(o.a)(e,[{key:"add",value:function(e){var t=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=d.match(e)),function(n){var r=e(n);return void 0===r?null:[t,r]}}}]),e}();u.closedBy=new u({deserialize:function(e){return e.split(" ")}}),u.openedBy=new u({deserialize:function(e){return e.split(" ")}}),u.group=new u({deserialize:function(e){return e.split(" ")}}),u.contextHash=new u({perNode:!0}),u.lookAhead=new u({perNode:!0}),u.mounted=new u({perNode:!0});var f=Object.create(null),d=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;Object(a.a)(this,e),this.name=t,this.props=n,this.id=r,this.flags=i}return Object(o.a)(e,[{key:"prop",value:function(e){return this.props[e.id]}},{key:"isTop",get:function(){return(1&this.flags)>0}},{key:"isSkipped",get:function(){return(2&this.flags)>0}},{key:"isError",get:function(){return(4&this.flags)>0}},{key:"isAnonymous",get:function(){return(8&this.flags)>0}},{key:"is",value:function(e){if("string"==typeof e){if(this.name==e)return!0;var t=this.prop(u.group);return!!t&&t.indexOf(e)>-1}return this.id==e}}],[{key:"define",value:function(t){var n=t.props&&t.props.length?Object.create(null):f,r=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),o=new e(t.name||"",n,t.id,r);if(t.props){var a,s=Object(i.a)(t.props);try{for(s.s();!(a=s.n()).done;){var l=a.value;if(Array.isArray(l)||(l=l(o)),l){if(l[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[l[0].id]=l[1]}}}catch(c){s.e(c)}finally{s.f()}}return o}},{key:"match",value:function(e){var t=Object.create(null);for(var n in e){var r,o=Object(i.a)(n.split(" "));try{for(o.s();!(r=o.n()).done;){var a=r.value;t[a]=e[n]}}catch(s){o.e(s)}finally{o.f()}}return function(e){for(var n=e.prop(u.group),r=-1;r<(n?n.length:0);r++){var i=t[r<0?e.name:n[r]];if(i)return i}}}}]),e}();d.none=new d("",Object.create(null),0,8);var h=function(){function e(t){Object(a.a)(this,e),this.types=t;for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0,n=null!=e&&p.get(this)||this.topNode,r=new j(n);return null!=e&&(r.moveTo(e,t),p.set(this,r._tree)),r}},{key:"fullCursor",value:function(){return new j(this.topNode,1)}},{key:"topNode",get:function(){return new O(this,0,0,null)}},{key:"resolve",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.cursor(e,t).node}},{key:"resolveInner",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.topNode;;){var r=n.enter(e,t);if(!r)return n;n=r}}},{key:"iterate",value:function(e){for(var t=e.enter,n=e.leave,r=e.from,i=void 0===r?0:r,o=e.to,a=void 0===o?this.length:o,s=this.cursor(),l=function(){return s.node};;){var c=!1;if(s.from<=a&&s.to>=i&&(s.type.isAnonymous||!1!==t(s.type,s.from,s.to,l))){if(s.firstChild())continue;s.type.isAnonymous||(c=!0)}for(;c&&n&&n(s.type,s.from,s.to,l),c=s.type.isAnonymous,!s.nextSibling();){if(!s.parent())return;c=!0}}}},{key:"prop",value:function(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}},{key:"propValues",get:function(){var e=[];if(this.props)for(var t in this.props)e.push([+t,this.props[t]]);return e}},{key:"balance",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.children.length<=8?this:P(this.type,this.children,this.positions,0,this.children.length,0,this.length,(function(n,r,i){return new e(t.type,n,r,i,t.propValues)}),n.makeTree||function(t,n,r){return new e(d.none,t,n,r)})}}],[{key:"build",value:function(e){return E(e)}}]),e}();v.empty=new v(d.none,[],[],0);var m=function(){function e(t,n){Object(a.a)(this,e),this.buffer=t,this.index=n}return Object(o.a)(e,[{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"pos",get:function(){return this.index}},{key:"next",value:function(){this.index-=4}},{key:"fork",value:function(){return new e(this.buffer,this.index)}}]),e}(),g=function(){function e(t,n,r){Object(a.a)(this,e),this.buffer=t,this.length=n,this.set=r}return Object(o.a)(e,[{key:"type",get:function(){return d.none}},{key:"toString",value:function(){for(var e=[],t=0;t0));s=o[s+3]);return a}},{key:"slice",value:function(t,n,r,i){for(var o=this.buffer,a=new Uint16Array(n-t),s=t,l=0;s=t&&nt;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function b(e,t){for(var n=e.childBefore(t);n;){var r=n.lastChild;if(!r||r.to!=n.to)break;r.type.isError&&r.from==r.to?(e=n,n=r.prevSibling):n=r}return e}var O=function(){function e(t,n,r,i){Object(a.a)(this,e),this.node=t,this._from=n,this.index=r,this._parent=i}return Object(o.a)(e,[{key:"type",get:function(){return this.node.type}},{key:"name",get:function(){return this.node.type.name}},{key:"from",get:function(){return this._from}},{key:"to",get:function(){return this._from+this.node.length}},{key:"nextChild",value:function(t,n,r,i){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=this;;){for(var s=a.node,l=s.children,c=s.positions,f=n>0?l.length:-1;t!=f;t+=n){var d=l[t],h=c[t]+a._from;if(y(i,r,h,h+d.length))if(d instanceof g){if(2&o)continue;var p=d.findChild(0,d.buffer.length,n,r-h,i);if(p>-1)return new x(new w(a,d,t,h),null,p)}else if(1&o||!d.type.isAnonymous||S(d)){var v=void 0;if(d.props&&(v=d.prop(u.mounted))&&!v.overlay)return new e(v.tree,h,t,a);var m=new e(d,h,t,a);return 1&o||!m.type.isAnonymous?m:m.nextChild(n<0?d.children.length-1:0,n,r,i)}}if(1&o||!a.type.isAnonymous)return null;if(t=a.index>=0?a.index+n:n<0?-1:a._parent.node.children.length,!(a=a._parent))return null}}},{key:"firstChild",get:function(){return this.nextChild(0,1,0,4)}},{key:"lastChild",get:function(){return this.nextChild(this.node.children.length-1,-1,0,4)}},{key:"childAfter",value:function(e){return this.nextChild(0,1,e,2)}},{key:"childBefore",value:function(e){return this.nextChild(this.node.children.length-1,-1,e,-2)}},{key:"enter",value:function(t,n){var r,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(o&&(r=this.node.prop(u.mounted))&&r.overlay){var s,l=t-this.from,c=Object(i.a)(r.overlay);try{for(c.s();!(s=c.n()).done;){var f=s.value,d=f.from,h=f.to;if((n>0?d<=l:d=l:h>l))return new e(r.tree,r.overlay[0].from+this.from,-1,this)}}catch(p){c.e(p)}finally{c.f()}}return this.nextChild(0,1,t,n,a?0:2)}},{key:"nextSignificantParent",value:function(){for(var e=this;e.type.isAnonymous&&e._parent;)e=e._parent;return e}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"cursor",get:function(){return new j(this)}},{key:"tree",get:function(){return this.node}},{key:"toTree",value:function(){return this.node}},{key:"resolve",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.cursor.moveTo(e,t).node}},{key:"enterUnfinishedNodesBefore",value:function(e){return b(this,e)}},{key:"getChild",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=k(this,e,t,n);return r.length?r[0]:null}},{key:"getChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return k(this,e,t,n)}},{key:"toString",value:function(){return this.node.toString()}}]),e}();function k(e,t,n,r){var i=e.cursor,o=[];if(!i.firstChild())return o;if(null!=n)for(;!i.type.is(n);)if(!i.nextSibling())return o;for(;;){if(null!=r&&i.type.is(r))return o;if(i.type.is(t)&&o.push(i.node),!i.nextSibling())return null==r?o:[]}}var w=function e(t,n,r,i){Object(a.a)(this,e),this.parent=t,this.buffer=n,this.index=r,this.start=i},x=function(){function e(t,n,r){Object(a.a)(this,e),this.context=t,this._parent=n,this.index=r,this.type=t.buffer.set.types[t.buffer.buffer[r]]}return Object(o.a)(e,[{key:"name",get:function(){return this.type.name}},{key:"from",get:function(){return this.context.start+this.context.buffer.buffer[this.index+1]}},{key:"to",get:function(){return this.context.start+this.context.buffer.buffer[this.index+2]}},{key:"child",value:function(t,n,r){var i=this.context.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return o<0?null:new e(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(e){return this.child(1,e,2)}},{key:"childBefore",value:function(e){return this.child(-1,e,-2)}},{key:"enter",value:function(t,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!i)return null;var o=this.context.buffer,a=o.findChild(this.index+4,o.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}},{key:"parent",get:function(){return this._parent||this.context.parent.nextSignificantParent()}},{key:"externalSibling",value:function(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}},{key:"nextSibling",get:function(){var t=this.context.buffer,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}},{key:"prevSibling",get:function(){var t=this.context.buffer,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}},{key:"cursor",get:function(){return new j(this)}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var e=[],t=[],n=this.context.buffer,r=this.index+4,i=n.buffer[this.index+3];if(i>r){var o=n.buffer[this.index+1],a=n.buffer[this.index+2];e.push(n.slice(r,i,o,a)),t.push(0)}return new v(this.type,e,t,this.to-this.from)}},{key:"resolve",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.cursor.moveTo(e,t).node}},{key:"enterUnfinishedNodesBefore",value:function(e){return b(this,e)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=k(this,e,t,n);return r.length?r[0]:null}},{key:"getChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return k(this,e,t,n)}}]),e}(),j=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(Object(a.a)(this,e),this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof O)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(var r=t._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=t,this.yieldBuf(t.index)}}return Object(o.a)(e,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}},{key:"yieldBuf",value:function(e,t){this.index=e;var n=this.buffer,r=n.start,i=n.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}},{key:"yield",value:function(e){return!!e&&(e instanceof O?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree.node.children.length-1:0,e,t,n,this.mode));var r=this.buffer.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}},{key:"firstChild",value:function(){return this.enterChild(1,0,4)}},{key:"lastChild",value:function(){return this.enterChild(-1,0,4)}},{key:"childAfter",value:function(e){return this.enterChild(1,e,2)}},{key:"childBefore",value:function(e){return this.enterChild(-1,e,-2)}},{key:"enter",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this.buffer?!!r&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n,r))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(1&this.mode?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var e=1&this.mode?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}},{key:"sibling",value:function(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));var t=this.buffer.buffer,n=this.stack.length-1;if(e<0){var r=n<0?0:this.stack[n]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{var i=t.buffer[this.index+3];if(i<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(i)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(e){var t,n,r=this.buffer;if(r){if(e>0){if(this.index-1)for(var s=t+e,l=e<0?-1:n.node.children.length;s!=l;s+=e){var c=n.node.children[s];if(1&this.mode||c instanceof g||!c.type.isAnonymous||S(c))return!1}}return!0}},{key:"move",value:function(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}},{key:"next",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(1,e)}},{key:"prev",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(-1,e)}},{key:"moveTo",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(var o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,n=i+1;break e}r=this.stack[--i]}for(var a=n;ac;){var u=n.size;if(n.id==t&&u>=0)l.size=r,l.start=i,l.skip=a,a+=4,r+=4,n.next();else{var h=n.pos-u;if(u<0||h=f?4:0,v=n.start;for(n.next();n.pos>h;){if(n.size<0){if(-3!=n.size)break e;p+=4}else n.id>=f&&(p+=4);n.next()}i=v,r+=u,a+=p}}(t<0||r==e)&&(l.size=r,l.start=i,l.skip=a);return l.size>4?l:void 0}(d.pos-t,a))){for(var A=new Uint16Array(C.size-C.skip),D=d.pos-C.size,R=A.length;d.pos>D;)R=w(C.start,A,R);E=new g(A,m-C.start,r),T=C.start-e}else{var N=d.pos-x;d.next();for(var L=[],_=[],I=s>=f?s:-1,$=0,B=m;d.pos>N;)I>=0&&d.id==I&&d.size>=0?(d.end<=B-o&&(O(L,_,c,$,d.end,B,I,j),$=L.length,B=d.end),d.next()):b(c,N,L,_,I);if(I>=0&&$>0&&$-1&&$>0){var z=function(e){return function(t,n,r){var i,o,a=0,s=t.length-1;if(s>=0&&(i=t[s])instanceof v){if(!s&&i.type==e&&i.length==r)return i;(o=i.prop(u.lookAhead))&&(a=n[s]+i.length+o)}return k(e,t,n,r,a)}}(M);E=P(M,L,_,0,L.length,0,m-c,z,z)}else E=k(M,L,_,m-c,j-m)}n.push(E),i.push(T)}function O(e,t,n,i,o,a,s,l){for(var c=[],u=[];e.length>i;)c.push(e.pop()),u.push(t.pop()+n-o);e.push(k(r.types[s],c,u,a-o,l-a)),t.push(o-n)}function k(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0;if(p){var a=[u.contextHash,p];o=o?[a].concat(o):[a]}if(i>25){var s=[u.lookAhead,i];o=o?[s].concat(o):[s]}return new v(e,t,n,r,o)}function w(e,t,n){var r=d.id,i=d.start,o=d.end,a=d.size;if(d.next(),a>=0&&r4)for(var l=d.pos-(a-4);d.pos>l;)n=w(e,t,n);t[--n]=s,t[--n]=o-e,t[--n]=i-e,t[--n]=r}else-3==a?p=r:-4==a&&(y=r);return n}for(var x=[],j=[];d.pos>0;)b(e.start||0,e.bufferStart||0,x,j,-1);var S=null!==(t=e.length)&&void 0!==t?t:x.length?j[0]+x[0].length:0;return new v(h[e.topID],x.reverse(),j.reverse(),S)}var C=new WeakMap;function M(e,t){if(!e.isAnonymous||t instanceof g||t.type!=e)return 1;var n=C.get(t);return null==n&&(n=t.children.reduce((function(t,n){return t+M(e,n)}),1),C.set(t,n)),n}function P(e,t,n,r,i,o,a,s,l){for(var c=0,u=r;u=f)break;v+=m}if(c==u+1){if(v>f){var g=n[u];t(g.children,g.positions,0,g.children.length,r[u]+s);continue}d.push(n[u])}else{var y=r[c-1]+n[c-1].length-p;d.push(P(e,n,r,u,c,p,y,null,l))}h.push(p+s-o)}}(t,n,r,i,0),(s||l)(d,h,a)}var T=function(){function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];Object(a.a)(this,e),this.from=t,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(s?2:0)}return Object(o.a)(e,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=[new e(0,t.length,t,0,!1,o)],s=Object(i.a)(r);try{for(s.s();!(n=s.n()).done;){var l=n.value;l.to>t.length&&a.push(l)}}catch(c){s.e(c)}finally{s.f()}return a}},{key:"applyChanges",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!n.length)return t;for(var i=[],o=1,a=t.length?t[0]:null,s=0,l=0,c=0;;s++){var u=s=r)for(;a&&a.from=d.from||f<=d.to||c){var h=Math.max(d.from,l)-c,p=Math.min(d.to,f)-c;d=h>=p?null:new e(h,p,d.tree,d.offset+c,s>0,!!u)}if(d&&i.push(d),a.to>f)break;a=o1&&void 0!==arguments[1]?arguments[1]:e;return new l(e,t,this)}}]),e}();s.prototype.startSide=s.prototype.endSide=0,s.prototype.point=!1,s.prototype.mapMode=a.h.TrackDel;var l=function e(t,n,r){Object(i.a)(this,e),this.from=t,this.to=n,this.value=r};function c(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var u=function(){function e(t,n,r,o){Object(i.a)(this,e),this.from=t,this.to=n,this.value=r,this.maxPoint=o}return Object(o.a)(e,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=n?this.to:this.from,o=r,a=i.length;;){if(o==a)return o;var s=o+a>>1,l=i[s]-e||(n?this.value[s].endSide:this.value[s].startSide)-t;if(s==o)return l>=0?o:a;l>=0?a=s:o=s+1}}},{key:"between",value:function(e,t,n,r){for(var i=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,i);i(h=n.mapPos(f,c.endSide))||d==h&&c.startSide>0&&c.endSide<=0)continue;(h-d||c.endSide-c.startSide)<0||(a<0&&(a=d),c.point&&(s=Math.max(s,h-d)),r.push(c),i.push(d-a),o.push(h-a))}return{mapped:r.length?new e(i,o,r,s):null,pos:a}}}]),e}(),f=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.empty,o=arguments.length>3?arguments[3]:void 0;Object(i.a)(this,e),this.chunkPos=t,this.chunk=n,this.nextLayer=r,this.maxPoint=o}return Object(o.a)(e,[{key:"length",get:function(){var e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var e,t=this.nextLayer.size,n=Object(r.a)(this.chunk);try{for(n.s();!(e=n.n()).done;){t+=e.value.value.length}}catch(i){n.e(i)}finally{n.f()}return t}},{key:"chunkEnd",value:function(e){return this.chunkPos[e]+this.chunk[e].length}},{key:"update",value:function(t){var n=t.add,r=void 0===n?[]:n,i=t.sort,o=void 0!==i&&i,a=t.filterFrom,s=void 0===a?0:a,u=t.filterTo,f=void 0===u?this.length:u,d=t.filter;if(0==r.length&&!d)return this;if(o&&r.slice().sort(c),this.isEmpty)return r.length?e.of(r):this;for(var p=new v(this,null,-1).goto(0),m=0,g=[],y=new h;p.value||m=0){var b=r[m++];y.addInner(b.from,b.to,b.value)||g.push(b)}else 1==p.rangeIndex&&p.chunkIndexthis.chunkEnd(p.chunkIndex)||fp.to||f=i&&e<=i+o.length&&!1===o.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}},{key:"iter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return m.from([this]).goto(e)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"iter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return m.from(e).goto(t)}},{key:"compare",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,o=e.filter((function(e){return e.maxPoint>=500||!e.isEmpty&&t.indexOf(e)<0&&e.maxPoint>=i})),a=t.filter((function(t){return t.maxPoint>=500||!t.isEmpty&&e.indexOf(t)<0&&t.maxPoint>=i})),s=p(o,a),l=new y(o,s,i),c=new y(a,s,i);n.iterGaps((function(e,t,n){return b(l,e,c,t,n,r)})),n.empty&&0==n.length&&b(l,0,c,0,0,r)}},{key:"eq",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=1e9);var i=e.filter((function(e){return!e.isEmpty&&t.indexOf(e)<0})),o=t.filter((function(t){return!t.isEmpty&&e.indexOf(t)<0}));if(i.length!=o.length)return!1;if(!i.length)return!0;for(var a=p(i,o),s=new y(i,a,0).goto(n),l=new y(o,a,0).goto(n);;){if(s.to!=l.to||!O(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>=r)return!0;s.next(),l.next()}}},{key:"spans",value:function(e,t,n,r){for(var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,o=new y(e,null,i).goto(t),a=t,s=o.openStart;;){var l=Math.min(o.to,n);if(o.point?(r.point(a,l,o.point,o.activeForPoint(o.to),s),s=o.openEnd(l)+(o.to>l?1:0)):l>a&&(r.span(a,l,o.active,s),s=o.openEnd(l)),o.to>n)break;a=o.to,o.next()}return s}},{key:"of",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=new h,o=Object(r.a)(e instanceof l?[e]:n?d(e):e);try{for(o.s();!(t=o.n()).done;){var a=t.value;i.add(a.from,a.to,a.value)}}catch(s){o.e(s)}finally{o.f()}return i.finish()}}]),e}();function d(e){if(e.length>1)for(var t=e[0],n=1;n0)return e.slice().sort(c);t=r}return e}f.empty=new f([],[],null,-1),f.empty.nextLayer=f.empty;var h=function(){function e(){Object(i.a)(this,e),this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}return Object(o.a)(e,[{key:"finishChunk",value:function(e){this.chunks.push(new u(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(t,n,r){this.addInner(t,n,r)||(this.nextLayer||(this.nextLayer=new e)).add(t,n,r)}},{key:"addInner",value:function(e,t,n){var r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}},{key:"addChunk",value:function(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);var n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}},{key:"finish",value:function(){return this.finishInner(f.empty)}},{key:"finishInner",value:function(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;var t=new f(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}]),e}();function p(e,t){var n,i=new Map,o=Object(r.a)(e);try{for(o.s();!(n=o.n()).done;)for(var a=n.value,s=0;s3&&void 0!==arguments[3]?arguments[3]:0;Object(i.a)(this,e),this.layer=t,this.skip=n,this.minPoint=r,this.rank=o}return Object(o.a)(e,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"endSide",get:function(){return this.value?this.value.endSide:0}},{key:"goto",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}},{key:"gotoInner",value:function(e,t,n){for(;this.chunkIndex=this.minPoint)break}}},{key:"setRangeIndex",value:function(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex1&&void 0!==arguments[1]?arguments[1]:-1e9,i=Object(r.a)(this.heap);try{for(i.s();!(t=i.n()).done;){var o=t.value;o.goto(e,n)}}catch(s){i.e(s)}finally{i.f()}for(var a=this.heap.length>>1;a>=0;a--)g(this.heap,a);return this.next(),this}},{key:"forward",value:function(e,t){var n,i=Object(r.a)(this.heap);try{for(i.s();!(n=i.n()).done;){n.value.forward(e,t)}}catch(a){i.e(a)}finally{i.f()}for(var o=this.heap.length>>1;o>=0;o--)g(this.heap,o);(this.to-e||this.value.endSide-t)<0&&this.next()}},{key:"next",value:function(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{var e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),g(this.heap,0)}}}],[{key:"from",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=[],o=0;o=r&&i.push(new v(a,n,r,o));return 1==i.length?i[0]:new e(i)}}]),e}();function g(e,t){for(var n=e[t];;){var r=1+(t<<1);if(r>=e.length)break;var i=e[r];if(r+1=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var y=function(){function e(t,n,r){Object(i.a)(this,e),this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=m.from(t,n,r)}return Object(o.a)(e,[{key:"goto",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}},{key:"forward",value:function(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}},{key:"removeActive",value:function(e){k(this.active,e),k(this.activeTo,e),k(this.activeRank,e),this.minActive=x(this.active,this.activeTo)}},{key:"addActive",value:function(e){for(var t=0,n=this.cursor,r=n.value,i=n.to,o=n.rank;t-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&k(n,i)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point){if(!(t&&this.cursor.to==this.to&&this.cursor.frome&&this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}if(n){for(var a=0;a=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}},{key:"openEnd",value:function(e){for(var t=0,n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}]),e}();function b(e,t,n,r,i,o){e.goto(t),n.goto(r);for(var a=r+i,s=r,l=r-t;;){var c=e.to+l-n.to||e.endSide-n.endSide,u=c<0?e.to+l:n.to,f=Math.min(u,a);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&O(e.activeForPoint(e.to+l),n.activeForPoint(n.to))||o.comparePoint(s,f,e.point,n.point):f>s&&!O(e.active,n.active)&&o.compareRange(s,f,e.active,n.active),u>a)break;s=u,c<=0&&e.next(),c>=0&&n.next()}}function O(e,t){if(e.length!=t.length)return!1;for(var n=0;n=t;r--)e[r+1]=e[r];e[t]=n}function x(e,t){for(var n=-1,r=1e9,i=0;i-1?t:v.get(t.base||t,t.modified.concat(e).sort((function(e,t){return e.id-t.id})))}}}]),e}(),p=0,v=function(){function e(){Object(i.a)(this,e),this.instances=[],this.id=p++}return Object(o.a)(e,null,[{key:"get",value:function(t,n){if(!n.length)return t;var i=n[0].instances.find((function(e){return e.base==t&&(r=n,i=e.modified,r.length==i.length&&r.every((function(e,t){return e==i[t]})));var r,i}));if(i)return i;var o,a=[],s=new h(a,t,n),l=Object(r.a)(n);try{for(l.s();!(o=l.n()).done;){o.value.instances.push(s)}}catch(y){l.e(y)}finally{l.f()}var c,u=m(n),f=Object(r.a)(t.set);try{for(f.s();!(c=f.n()).done;){var d,p=c.value,v=Object(r.a)(u);try{for(v.s();!(d=v.n()).done;){var g=d.value;a.push(e.get(p,g))}}catch(y){v.e(y)}finally{v.f()}}}catch(y){f.e(y)}finally{f.f()}return s}}]),e}();function m(e){for(var t=[e],n=0;n0&&f+3==s.length){c=1;break}var d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(u);if(!d)throw new RangeError("Invalid path: "+s);if(l.push("*"==d[0]?null:'"'==d[0][0]?JSON.parse(d[0]):d[0]),(f+=d[0].length)==s.length)break;var h=s[f++];if(f==s.length&&"!"==h){c=0;break}if("/"!=h)throw new RangeError("Invalid path: "+s);u=s.slice(f)}var p=l.length-1,v=l[p];if(!v)throw new RangeError("Invalid path: "+s);var m=new w(i,c,p>0?l.slice(0,p):null);t[v]=m.sort(t[v])}}}catch(g){a.e(g)}finally{a.f()}}return y.add(t)}var y=new a.b,b=c.g.define({combine:function(e){return e.length?x.combinedMatch(e):null}}),O=c.g.define({combine:function(e){return e.length?e[0].match:null}});function k(e){return e.facet(b)||e.facet(O)}var w=function(){function e(t,n,r,o){Object(i.a)(this,e),this.tags=t,this.mode=n,this.context=r,this.next=o}return Object(o.a)(e,[{key:"sort",value:function(e){return!e||e.depththis.at&&(this.at=e),this.class=t)}},{key:"flush",value:function(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}},{key:"highlightRange",value:function(e,t,n,i,o,s){var l=e.type,c=e.from,u=e.to;if(!(c>=n||u<=t)){E[o]=l.name,l.isTop&&(s=l);for(var f=i,d=l.prop(y),h=!1;d;){if(!d.context||P(d.context,E,o)){var p,v=Object(r.a)(d.tags);try{for(v.s();!(p=v.n()).done;){var m=p.value,g=this.style(m,s);g&&(f&&(f+=" "),f+=g,1==d.mode?i+=(i?" ":"")+g:0==d.mode&&(h=!0))}}catch(T){v.e(T)}finally{v.f()}break}d=d.next}if(this.startSpan(e.from,f),!h){var b=e.tree&&e.tree.prop(a.b.mounted);if(b&&b.overlay){for(var O=e.node.enter(b.overlay[0].from+c,1),k=e.firstChild(),w=0,x=c;;w++){var j=w=S)&&e.nextSibling()););if(!j||S>n)break;(x=j.to+c)>t&&(this.highlightRange(O.cursor,Math.max(t,j.from+c),Math.min(n,x),i,o,b.tree.type),this.startSpan(x,f))}k&&e.parent()}else if(e.firstChild()){do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,i,o+1,s),this.startSpan(Math.min(n,e.to),f)}}while(e.nextSibling());e.parent()}}}}}]),e}();function M(e,t,n,r,i){var o=new C(t,r,i);o.highlightRange(e.cursor(),t,n,"",0,e.type),o.flush(n)}function P(e,t,n){if(e.length>n-1)return!1;for(var r=n-1,i=e.length-1;i>=0;i--,r--){var o=e[i];if(o&&o!=t[r])return!1}return!0}var T=h.define,A=T(),D=T(),R=T(D),N=T(D),L=T(),_=T(L),I=T(L),$=T(),B=T($),z=T(),F=T(),W=T(),V=T(W),H=T(),Q={comment:A,lineComment:T(A),blockComment:T(A),docComment:T(A),name:D,variableName:T(D),typeName:R,tagName:T(R),propertyName:N,attributeName:T(N),className:T(D),labelName:T(D),namespace:T(D),macroName:T(D),literal:L,string:_,docString:T(_),character:T(_),attributeValue:T(_),number:I,integer:T(I),float:T(I),bool:T(L),regexp:T(L),escape:T(L),color:T(L),url:T(L),keyword:z,self:T(z),null:T(z),atom:T(z),unit:T(z),modifier:T(z),operatorKeyword:T(z),controlKeyword:T(z),definitionKeyword:T(z),operator:F,derefOperator:T(F),arithmeticOperator:T(F),logicOperator:T(F),bitwiseOperator:T(F),compareOperator:T(F),updateOperator:T(F),definitionOperator:T(F),typeOperator:T(F),controlOperator:T(F),punctuation:W,separator:T(W),bracket:V,angleBracket:T(V),squareBracket:T(V),paren:T(V),brace:T(V),content:$,heading:B,heading1:T(B),heading2:T(B),heading3:T(B),heading4:T(B),heading5:T(B),heading6:T(B),contentSeparator:T($),list:T($),quote:T($),emphasis:T($),strong:T($),link:T($),monospace:T($),strikethrough:T($),inserted:T(),deleted:T(),changed:T(),invalid:T(),meta:H,documentMeta:T(H),annotation:T(H),processingInstruction:T(H),definition:h.defineModifier(),constant:h.defineModifier(),function:h.defineModifier(),standard:h.defineModifier(),local:h.defineModifier(),special:h.defineModifier()},q=x.define([{tag:Q.link,textDecoration:"underline"},{tag:Q.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Q.emphasis,fontStyle:"italic"},{tag:Q.strong,fontWeight:"bold"},{tag:Q.strikethrough,textDecoration:"line-through"},{tag:Q.keyword,color:"#708"},{tag:[Q.atom,Q.bool,Q.url,Q.contentSeparator,Q.labelName],color:"#219"},{tag:[Q.literal,Q.inserted],color:"#164"},{tag:[Q.string,Q.deleted],color:"#a11"},{tag:[Q.regexp,Q.escape,Q.special(Q.string)],color:"#e40"},{tag:Q.definition(Q.variableName),color:"#00f"},{tag:Q.local(Q.variableName),color:"#30a"},{tag:[Q.typeName,Q.namespace],color:"#085"},{tag:Q.className,color:"#167"},{tag:[Q.special(Q.variableName),Q.macroName],color:"#256"},{tag:Q.definition(Q.propertyName),color:"#00c"},{tag:Q.comment,color:"#940"},{tag:Q.meta,color:"#7a757a"},{tag:Q.invalid,color:"#f00"}]);Q.link,Q.heading,Q.emphasis,Q.strong,Q.keyword,Q.atom,Q.bool,Q.url,Q.labelName,Q.inserted,Q.deleted,Q.literal,Q.string,Q.number,Q.regexp,Q.escape,Q.string,Q.variableName,Q.variableName,Q.variableName,Q.variableName,Q.typeName,Q.namespace,Q.macroName,Q.propertyName,Q.operator,Q.comment,Q.meta,Q.invalid,Q.punctuation},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(0),i=(n(11),Object(r.createContext)(null)),o=function(e){var t=e.utils,n=e.children,o=e.locale,a=e.libInstance,s=Object(r.useMemo)((function(){return new t({locale:o,instance:a})}),[t,a,o]);return Object(r.createElement)(i.Provider,{value:s,children:n})};function a(){var e=Object(r.useContext)(i);return function(e){if(!e)throw new Error("Can not find utils in context. You either a) forgot to wrap your component tree in MuiPickersUtilsProvider; or b) mixed named and direct file imports. Recommendation: use named imports from the module index.")}(e),e}},,function(e,t,n){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",i="second",o="minute",a="hour",s="day",l="week",c="month",u="quarter",f="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(i,2,"0")},m:function e(t,n){if(t.date()0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,s=void 0===n?o.standard:n,l=t.easing,c=void 0===l?i.easeInOut:l,u=t.delay,f=void 0===u?0:u;Object(r.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof s?s:a(s)," ").concat(c," ").concat("string"===typeof f?f:a(f))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},function(e,t,n){"use strict";function r(e,t){return function(){return null}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e}),{})}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";function r(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(84);var i=n(94),o=n(78);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(i.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o}));var r=n(0),i=r.createContext();function o(){return r.useContext(i)}t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(5),i=n(6),o="undefined"==typeof Symbol?"__\u037c":Symbol.for("\u037c"),a="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},l=function(){function e(t,n){Object(r.a)(this,e),this.rules=[];var i=(n||{}).finish;function o(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function a(e,t,n,r){var s=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return n.push(e[0]+";");for(var u in t){var f=t[u];if(/&/.test(u))a(u.split(/,\s*/).map((function(t){return e.map((function(e){return t.replace(/&/,e)}))})).reduce((function(e,t){return e.concat(t)})),f,n);else if(f&&"object"==typeof f){if(!l)throw new RangeError("The value of a property ("+u+") should be a primitive value.");a(o(u),f,s,c)}else null!=f&&s.push(u.replace(/_.*/,"").replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}))+": "+f+";")}(s.length||c)&&n.push((!i||l||r?e:e.map(i)).join(", ")+" {"+s.join(" ")+"}")}for(var s in t)a(o(s),t[s],this.rules)}return Object(i.a)(e,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var e=s[o]||1;return s[o]=e+1,"\u037c"+e.toString(36)}},{key:"mount",value:function(e,t){(e[a]||new u(e)).mount(Array.isArray(t)?t:[t])}}]),e}(),c=null,u=function(){function e(t){if(Object(r.a)(this,e),!t.head&&t.adoptedStyleSheets&&"undefined"!=typeof CSSStyleSheet){if(c)return t.adoptedStyleSheets=[c.sheet].concat(t.adoptedStyleSheets),t[a]=c;this.sheet=new CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(t.adoptedStyleSheets),c=this}else{this.styleTag=(t.ownerDocument||t).createElement("style");var n=t.head||t;n.insertBefore(this.styleTag,n.firstChild)}this.modules=[],t[a]=this}return Object(i.a)(e,[{key:"mount",value:function(e){for(var t=this.sheet,n=0,r=0,i=0;i-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,o),t)for(var s=0;s=48&&j<=57||j>=97&&j<=122?2:j>=65&&j<=90?1:0:(S=Object(f.g)(j))!=S.toLowerCase()?1:S!=S.toUpperCase()?2:0;(1==E&&O||0==x&&0!=E)&&(t[v]==j||n[v]==j&&(m=!0))&&(o[v++]=k),x=E,k+=Object(f.c)(j)}return v==l&&0==o[0]?this.result((m?-200:0)-100,o,e):g==l&&0==y?[-200,0,b]:s>-1?[-700,s,s+this.pattern.length]:g==l?[-900,y,b]:v==l?this.result((m?-200:0)-100-700,o,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}},{key:"result",value:function(e,t,n){var r,i=[e],o=1,a=Object(s.a)(t);try{for(a.s();!(r=a.n()).done;){var l=r.value,c=l+(this.astral?Object(f.c)(Object(f.b)(n,l)):1);o>1&&i[o-1]==l?i[o-1]=c:(i[o++]=l,i[o++]=c)}}catch(u){a.e(u)}finally{a.f()}return i}}]),e}(),S=u.g.define({combine:function(e){return Object(u.m)(e,{activateOnTyping:!0,override:null,maxRenderedOptions:100,defaultKeymap:!0,optionClass:function(){return""},icons:!0,addToOptions:[]},{defaultKeymap:function(e,t){return e&&t},icons:function(e,t){return e&&t},optionClass:function(e,t){return function(n){return function(e,t){return e?t?e+" "+t:e:t}(e(n),t(n))}},addToOptions:function(e,t){return e.concat(t)}})}});var E=d.d.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{cursor:"pointer",padding:"1px 1em 1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#39e",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25cb'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25cc'"}},".cm-completionIcon-variable":{"&:after":{content:"'\ud835\udc65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\ud835\udc36'"}},".cm-completionIcon-type":{"&:after":{content:"'\ud835\udc61'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222a'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25a1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\ud83d\udd11\ufe0e'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25a2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});function C(e,t,n){if(e<=n)return{from:0,to:e};if(t<=e>>1){var r=Math.floor(t/n);return{from:r*n,to:(r+1)*n}}var i=Math.floor((e-t)/n);return{from:e-(i+1)*n,to:e-i*n}}var M=function(){function e(t,n){var r=this;Object(l.a)(this,e),this.view=t,this.stateField=n,this.info=null,this.placeInfo={read:function(){return r.measureInfo()},write:function(e){return r.positionInfo(e)},key:this};var i=t.state.field(n),a=i.open,s=a.options,c=a.selected,u=t.state.facet(S);this.optionContent=function(e){var t=e.addToOptions.slice();return e.icons&&t.push({render:function(e){var t,n=document.createElement("div");return n.classList.add("cm-completionIcon"),e.type&&(t=n.classList).add.apply(t,Object(o.a)(e.type.split(/\s+/g).map((function(e){return"cm-completionIcon-"+e})))),n.setAttribute("aria-hidden","true"),n},position:20}),t.push({render:function(e,t,n){var r=document.createElement("span");r.className="cm-completionLabel";for(var i=e.label,o=0,a=1;ao&&r.appendChild(document.createTextNode(i.slice(o,s)));var c=r.appendChild(document.createElement("span"));c.appendChild(document.createTextNode(i.slice(s,l))),c.className="cm-completionMatchedText",o=l}return o=this.range.to)&&(this.range=C(n.options.length,n.selected,this.view.state.facet(S).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(n.options,t.id,this.range)),this.list.addEventListener("scroll",(function(){e.info&&e.view.requestMeasure(e.placeInfo)}))),this.updateSelectedOption(n.selected)){this.info&&(this.info.remove(),this.info=null);var r=n.options[n.selected];r.completion.info&&(this.info=this.dom.appendChild(function(e,t){var n=document.createElement("div");n.className="cm-tooltip cm-completionInfo";var r=e.completion.info;if("string"==typeof r)n.textContent=r;else{var i=r(e.completion);i.then?i.then((function(e){return n.appendChild(e)}),(function(e){return Object(d.l)(t.state,e,"completion info")})):n.appendChild(i)}return n}(r,this.view)),this.view.requestMeasure(this.placeInfo))}}},{key:"updateSelectedOption",value:function(e){for(var t=null,n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return t&&function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect();r.topn.bottom&&(e.scrollTop+=r.bottom-n.bottom)}(this.list,t),t}},{key:"measureInfo",value:function(){var e=this.dom.querySelector("[aria-selected]");if(!e)return null;var t=this.dom.getBoundingClientRect(),n=e.getBoundingClientRect().top-t.top;if(n<0||n>this.list.clientHeight-10)return null;var r=this.view.textDirection==d.c.RTL,i=t.left,o=innerWidth-t.right;return r&&i=this.options.length?this:new e(this.options,R(n,t),this.tooltip,this.timestamp,t)}},{key:"map",value:function(t){return new e(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}],[{key:"build",value:function(t,n,r,i){var o=function(e,t){var n,r=[],i=0,o=Object(s.a)(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.hasResult())if(!1===a.result.filter){var l,c=Object(s.a)(a.result.options);try{for(c.s();!(l=c.n()).done;){var u=l.value;r.push(new y(u,a,[1e9-i++]))}}catch(w){c.e(w)}finally{c.f()}}else{var f,d=new j(t.sliceDoc(a.from,a.to)),h=void 0,p=Object(s.a)(a.result.options);try{for(p.s();!(f=p.n()).done;){var v=f.value;(h=d.match(v.label))&&(null!=v.boost&&(h[0]+=v.boost),r.push(new y(v,a,h)))}}catch(w){p.e(w)}finally{p.f()}}}}catch(w){o.e(w)}finally{o.f()}r.sort(L);var m,g=[],b=null,O=Object(s.a)(r.sort(L));try{for(O.s();!(m=O.n()).done;){var k=m.value;if(300==g.length)break;b&&b.label==k.completion.label&&b.detail==k.completion.detail?P(k.completion)>P(b)&&(g[g.length-1]=k):g.push(k),b=k.completion}}catch(w){O.e(w)}finally{O.f()}return g}(t,n);if(!o.length)return null;var a,l=0;if(i&&i.selected)for(var c=i.options[i.selected].completion,u=0;u2&&void 0!==arguments[2]?arguments[2]:-1;Object(l.a)(this,e),this.source=t,this.state=n,this.explicitPos=r}return Object(c.a)(e,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(t,n){var r=_(t),i=this;r?i=i.handleUserEvent(t,r,n):t.docChanged?i=i.handleChange(t):t.selection&&0!=i.state&&(i=new e(i.source,0));var o,a=Object(s.a)(t.effects);try{for(a.s();!(o=a.n()).done;){var l=o.value;if(l.is(B))i=new e(i.source,1,l.value?b(t.state):-1);else if(l.is(z))i=new e(i.source,0);else if(l.is(F)){var c,u=Object(s.a)(l.value);try{for(u.s();!(c=u.n()).done;){var f=c.value;f.source==i.source&&(i=f)}}catch(d){u.e(d)}finally{u.f()}}}}catch(d){a.e(d)}finally{a.f()}return i}},{key:"handleUserEvent",value:function(t,n,r){return"delete"!=n&&r.activateOnTyping?new e(this.source,1):this.map(t.changes)}},{key:"handleChange",value:function(t){return t.changes.touchesRange(b(t.startState))?new e(this.source,0):this.map(t.changes)}},{key:"map",value:function(t){return t.empty||this.explicitPos<0?this:new e(this.source,this.state,t.mapPos(this.explicitPos))}}]),e}(),$=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(e,r,i,o,a,s){var c;return Object(l.a)(this,n),(c=t.call(this,e,2,r)).result=i,c.from=o,c.to=a,c.span=s,c}return Object(c.a)(n,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(e,t,r){var i=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=b(e.state);if((this.explicitPos>-1?ao)return new I(this.source,"input"==t&&r.activateOnTyping?1:0);var s=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return this.span&&(i==o||this.span.test(e.state.sliceDoc(i,o)))?new n(this.source,s,this.result,i,o,this.span):new I(this.source,1,s)}},{key:"handleChange",value:function(e){return e.changes.touchesRange(this.from,this.to)?new I(this.source,0):this.map(e.changes)}},{key:"map",value:function(e){return e.empty?this:new n(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1),this.span)}}]),n}(I),B=u.j.define(),z=u.j.define(),F=u.j.define({map:function(e,t){return e.map((function(e){return e.map(t)}))}}),W=u.j.define(),V=u.k.define({create:function(){return A.start()},update:function(e,t){return e.update(t)},provide:function(e){return[h.b.from(e,(function(e){return e.tooltip})),d.d.contentAttributes.from(e,(function(e){return e.attrs}))]}});function H(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(n){var r=n.state.field(V,!1);if(!r||!r.open||Date.now()-r.open.timestamp<75)return!1;var i,o=1;"page"==t&&(i=n.dom.querySelector(".cm-tooltip-autocomplete"))&&(o=Math.max(2,Math.floor(i.offsetHeight/i.firstChild.offsetHeight)));var a=r.open.selected+o*(e?1:-1),s=r.open.options.length;return a<0?a="page"==t?0:s-1:a>=s&&(a="page"==t?s-1:0),n.dispatch({effects:W.of(a)}),!0}}var Q=function e(t,n){Object(l.a)(this,e),this.active=t,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0},q=d.f.fromClass(function(){function e(t){Object(l.a)(this,e),this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var n,r=Object(s.a)(t.state.field(V).active);try{for(r.s();!(n=r.n()).done;){var i=n.value;1==i.state&&this.startQuery(i)}}catch(o){r.e(o)}finally{r.f()}}return Object(c.a)(e,[{key:"update",value:function(e){var t=this,n=e.state.field(V);if(e.selectionSet||e.docChanged||e.startState.field(V)!=n){for(var r=e.transactions.some((function(e){return(e.selection||e.docChanged)&&!_(e)})),i=0;i50&&a.time-Date.now()>1e3){var l,c=Object(s.a)(a.context.abortListeners);try{for(c.s();!(l=c.n()).done;){var u=l.value;try{u()}catch(m){Object(d.l)(this.view.state,m)}}}catch(g){c.e(g)}finally{c.f()}a.context.abortListeners=null,this.running.splice(i--,1)}else{var f;(f=a.updates).push.apply(f,Object(o.a)(e.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=n.active.some((function(e){return 1==e.state&&!t.running.some((function(t){return t.active.source==e.source}))}))?setTimeout((function(){return t.startUpdate()}),50):-1,0!=this.composing){var h,p=Object(s.a)(e.transactions);try{for(p.s();!(h=p.n()).done;){var v=h.value;"input"==_(v)?this.composing=2:2==this.composing&&v.selection&&(this.composing=3)}}catch(g){p.e(g)}finally{p.f()}}}}},{key:"startUpdate",value:function(){var e=this;this.debounceUpdate=-1;var t,n=this.view.state.field(V),r=Object(s.a)(n.active);try{var i=function(){var n=t.value;1!=n.state||e.running.some((function(e){return e.active.source==n.source}))||e.startQuery(n)};for(r.s();!(t=r.n()).done;)i()}catch(o){r.e(o)}finally{r.f()}}},{key:"startQuery",value:function(e){var t=this,n=this.view.state,r=b(n),i=new v(n,r,e.explicitPos==r),o=new Q(e,i);this.running.push(o),Promise.resolve(e.source(i)).then((function(e){o.context.aborted||(o.done=e||null,t.scheduleAccept())}),(function(e){t.view.dispatch({effects:z.of(null)}),Object(d.l)(t.view.state,e)}))}},{key:"scheduleAccept",value:function(){var e=this;this.running.every((function(e){return void 0!==e.done}))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((function(){return e.accept()}),50))}},{key:"accept",value:function(){var e,t=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var n=[],r=this.view.state.facet(S),i=function(i){var a=t.running[i];if(void 0===a.done)return o=i,"continue";if(t.running.splice(i--,1),a.done){var l,c=new $(a.active.source,a.active.explicitPos,a.done,a.done.from,null!==(e=a.done.to)&&void 0!==e?e:b(a.updates.length?a.updates[0].startState:t.view.state),a.done.span&&!1!==a.done.filter?O(a.done.span,!0):null),u=Object(s.a)(a.updates);try{for(u.s();!(l=u.n()).done;){var f=l.value;c=c.update(f,r)}}catch(g){u.e(g)}finally{u.f()}if(c.hasResult())return n.push(c),o=i,"continue"}var d=t.view.state.field(V).active.find((function(e){return e.source==a.active.source}));if(d&&1==d.state)if(null==a.done){var h,p=new I(a.active.source,0),v=Object(s.a)(a.updates);try{for(v.s();!(h=v.n()).done;){var m=h.value;p=p.update(m,r)}}catch(g){v.e(g)}finally{v.f()}1!=p.state&&n.push(p)}else t.startQuery(d);o=i},o=0;o=d&&g.field++}}catch(y){m.e(y)}finally{m.f()}}a.push(new U(d,o.length,n.index,n.index+f.length)),c=c.slice(0,n.index)+f+c.slice(n.index+n[0].length)}o.push(c)}}catch(y){l.e(y)}finally{l.f()}return new e(o,a)}}]),e}(),G=d.b.widget({widget:new(function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(l.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"toDOM",value:function(){var e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}},{key:"ignoreEvent",value:function(){return!1}}]),n}(d.g))}),K=d.b.mark({class:"cm-snippetField"}),J=function(){function e(t,n){Object(l.a)(this,e),this.ranges=t,this.active=n,this.deco=d.b.set(t.map((function(e){return(e.from==e.to?G:K).range(e.from,e.to)})))}return Object(c.a)(e,[{key:"map",value:function(t){return new e(this.ranges.map((function(e){return e.map(t)})),this.active)}},{key:"selectionInsideField",value:function(e){var t=this;return e.ranges.every((function(e){return t.ranges.some((function(n){return n.field==t.active&&n.from<=e.from&&n.to>=e.to}))}))}}]),e}(),Z=u.j.define({map:function(e,t){return e&&e.map(t)}}),ee=u.j.define(),te=u.k.define({create:function(){return null},update:function(e,t){var n,r=Object(s.a)(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.is(Z))return i.value;if(i.is(ee)&&e)return new J(e.ranges,i.value)}}catch(o){r.e(o)}finally{r.f()}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:function(e){return d.d.decorations.from(e,(function(e){return e?e.deco:d.b.none}))}});function ne(e,t){return u.e.create(e.filter((function(e){return e.field==t})).map((function(e){return u.e.range(e.from,e.to)})))}function re(e){var t=Y.parse(e);return function(e,n,r,i){var o=t.instantiate(e.state,r),a=o.text,s=o.ranges,l={changes:{from:r,to:i,insert:f.a.of(a)}};if(s.length&&(l.selection=ne(s,0)),s.length>1){var c=new J(s,0),d=l.effects=[Z.of(c)];void 0===e.state.field(te,!1)&&d.push(u.j.appendConfig.of([te.init((function(){return c})),se,le,E]))}e.dispatch(e.state.update(l))}}function ie(e){return function(t){var n=t.state,r=t.dispatch,i=n.field(te,!1);if(!i||e<0&&0==i.active)return!1;var o=i.active+e,a=e>0&&!i.ranges.some((function(t){return t.field==o+e}));return r(n.update({selection:ne(i.ranges,o),effects:Z.of(a?null:new J(i.ranges,o))})),!0}}var oe=[{key:"Tab",run:ie(1),shift:ie(-1)},{key:"Escape",run:function(e){var t=e.state,n=e.dispatch;return!!t.field(te,!1)&&(n(t.update({effects:Z.of(null)})),!0)}}],ae=u.g.define({combine:function(e){return e.length?e[0]:oe}}),se=u.i.override(d.k.compute([ae],(function(e){return e.facet(ae)})));var le=d.d.domEventHandlers({mousedown:function(e,t){var n,r=t.state.field(te,!1);if(!r||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;var i=r.ranges.find((function(e){return e.from<=n&&e.to>=n}));return!(!i||i.field==r.active)&&(t.dispatch({selection:ne(r.ranges,i.field),effects:Z.of(r.ranges.some((function(e){return e.field>i.field}))?new J(r.ranges,i.field):null)}),!0)}});function ce(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[V,S.of(e),q,fe,E]}var ue=[{key:"Ctrl-Space",run:function(e){return!!e.state.field(V,!1)&&(e.dispatch({effects:B.of(!0)}),!0)}},{key:"Escape",run:function(e){var t=e.state.field(V,!1);return!(!t||!t.active.some((function(e){return 0!=e.state})))&&(e.dispatch({effects:z.of(null)}),!0)}},{key:"ArrowDown",run:H(!0)},{key:"ArrowUp",run:H(!1)},{key:"PageDown",run:H(!0,"page")},{key:"PageUp",run:H(!1,"page")},{key:"Enter",run:function(e){var t=e.state.field(V,!1);return!(e.state.readOnly||!t||!t.open||Date.now()-t.open.timestamp<75)&&(k(e,t.open.options[t.open.selected]),!0)}}],fe=u.i.override(d.k.computeN([S],(function(e){return e.facet(S).defaultKeymap?[ue]:[]})))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return p}));var r=n(5),i=n(6),o=n(3),a=n(9),s=n(4),l=s.g.define({combine:function(e){var t,n,r,i=Object(o.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;t=t||a.topContainer,n=n||a.bottomContainer}}catch(s){i.e(s)}finally{i.f()}return{topContainer:t,bottomContainer:n}}});function c(e,t){var n=e.plugin(u),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}var u=a.f.fromClass(function(){function e(t){Object(r.a)(this,e),this.input=t.state.facet(p),this.specs=this.input.filter((function(e){return e})),this.panels=this.specs.map((function(e){return e(t)}));var n=t.state.facet(l);this.top=new f(t,!0,n.topContainer),this.bottom=new f(t,!1,n.bottomContainer),this.top.sync(this.panels.filter((function(e){return e.top}))),this.bottom.sync(this.panels.filter((function(e){return!e.top})));var i,a=Object(o.a)(this.panels);try{for(a.s();!(i=a.n()).done;){var s=i.value;s.dom.classList.add("cm-panel"),s.mount&&s.mount()}}catch(c){a.e(c)}finally{a.f()}}return Object(i.a)(e,[{key:"update",value:function(e){var t=e.state.facet(l);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new f(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new f(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var n=e.state.facet(p);if(n!=this.input){var r,i=n.filter((function(e){return e})),a=[],s=[],c=[],u=[],d=Object(o.a)(i);try{for(d.s();!(r=d.n()).done;){var h=r.value,v=this.specs.indexOf(h),m=void 0;v<0?(m=h(e.view),u.push(m)):(m=this.panels[v]).update&&m.update(e),a.push(m),(m.top?s:c).push(m)}}catch(x){d.e(x)}finally{d.f()}this.specs=i,this.panels=a,this.top.sync(s),this.bottom.sync(c);for(var g=0,y=u;g0&&g(t.state,l.head-1,1,o)||o.afterCursor&&(g(t.state,l.head,1,o)||l.head0&&void 0!==arguments[0]?arguments[0]:{};return[f.of(e),p]}function m(e,t,n){var r=e.prop(t<0?s.b.openedBy:s.b.closedBy);if(r)return r;if(1==e.name.length){var i=n.indexOf(e.name);if(i>-1&&i%2==(t<0?1:0))return[n[i+t]]}return null}function g(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.maxScanDistance||c,a=r.brackets||u,s=Object(o.j)(e),l=s.resolveInner(t,n),f=l;f;f=f.parent){var d=m(f.type,n,a);if(d&&f.from=r.to){if(0==l&&i.indexOf(c.type.name)>-1&&c.from0)return null;for(var c={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),f=0,d=0;!u.next().done&&d<=o;){var h=u.value;n<0&&(d+=h.length);for(var p=t+d*n,v=n>0?0:h.length-1,m=n>0?h.length:-1;v!=m;v+=n){var g=a.indexOf(h[v]);if(!(g<0||r.resolve(p+v,1).type!=i))if(g%2==0==n>0)f++;else{if(1==f)return{start:c,end:{from:p+v,to:p+v+1},matched:g>>1==l>>1};f--}}n>0&&(d+=h.length)}return u.done?{start:c,matched:!1}:null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(0),i=n(27),o=!0,a=!1,s=null,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function u(){o=!1}function f(){"hidden"===this.visibilityState&&a&&(o=!0)}function d(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return o||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!l[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function h(){a=!0,window.clearTimeout(s),s=window.setTimeout((function(){a=!1}),100)}function p(){return{isFocusVisible:d,onBlurVisible:h,ref:r.useCallback((function(e){var t,n=i.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",f,!0))}),[])}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(30);function i(e){return Object(r.a)(e).defaultView||window}},function(e,t,n){"use strict";var r=n(154),i=Object(r.a)();t.a=i},function(e,t,n){"use strict";var r=n(0),i=r.createContext();t.a=i},,function(e,t,n){"use strict";function r(e){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function o(e){return e.startAdornment}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}))},,,function(e,t,n){"use strict";e.exports=n(197)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(83);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(84);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},function(e,t,n){"use strict";var r=n(0),i=n.n(r);t.a=i.a.createContext(null)},,,function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,i=void 0!==r&&r,o=t.center,s=void 0===o?a||t.pulsate:o,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&b.current)b.current=!1;else{"touchstart"===e.type&&(b.current=!0);var u,f,d,h=c?null:w.current,p=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(p.width/2),f=Math.round(p.height/2);else{var v=e.touches?e.touches[0]:e,m=v.clientX,g=v.clientY;u=Math.round(m-p.left),f=Math.round(g-p.top)}if(s)(d=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(d+=1);else{var y=2*Math.max(Math.abs((h?h.clientWidth:0)-u),u)+2,j=2*Math.max(Math.abs((h?h.clientHeight:0)-f),f)+2;d=Math.sqrt(Math.pow(y,2)+Math.pow(j,2))}e.touches?null===k.current&&(k.current=function(){x({pulsate:i,rippleX:u,rippleY:f,rippleSize:d,cb:n})},O.current=setTimeout((function(){k.current&&(k.current(),k.current=null)}),80)):x({pulsate:i,rippleX:u,rippleY:f,rippleSize:d,cb:n})}}),[a,x]),S=o.useCallback((function(){j({},{pulsate:!0})}),[j]),E=o.useCallback((function(e,t){if(clearTimeout(O.current),"touchend"===e.type&&k.current)return e.persist(),k.current(),k.current=null,void(O.current=setTimeout((function(){E(e,t)})));k.current=null,m((function(e){return e.length>0?e.slice(1):e})),y.current=t}),[]);return o.useImperativeHandle(t,(function(){return{pulsate:S,start:j,stop:E}}),[S,j,E]),o.createElement("span",Object(r.a)({className:Object(s.a)(l.root,c),ref:w},u),o.createElement(h.a,{component:null,exit:!0},p))})),g=Object(u.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(o.memo(m)),y=o.forwardRef((function(e,t){var n=e.action,u=e.buttonRef,d=e.centerRipple,h=void 0!==d&&d,p=e.children,v=e.classes,m=e.className,y=e.component,b=void 0===y?"button":y,O=e.disabled,k=void 0!==O&&O,w=e.disableRipple,x=void 0!==w&&w,j=e.disableTouchRipple,S=void 0!==j&&j,E=e.focusRipple,C=void 0!==E&&E,M=e.focusVisibleClassName,P=e.onBlur,T=e.onClick,A=e.onFocus,D=e.onFocusVisible,R=e.onKeyDown,N=e.onKeyUp,L=e.onMouseDown,_=e.onMouseLeave,I=e.onMouseUp,$=e.onTouchEnd,B=e.onTouchMove,z=e.onTouchStart,F=e.onDragLeave,W=e.tabIndex,V=void 0===W?0:W,H=e.TouchRippleProps,Q=e.type,q=void 0===Q?"button":Q,U=Object(i.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),X=o.useRef(null);var Y=o.useRef(null),G=o.useState(!1),K=G[0],J=G[1];k&&K&&J(!1);var Z=Object(f.a)(),ee=Z.isFocusVisible,te=Z.onBlurVisible,ne=Z.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S;return Object(c.a)((function(r){return t&&t(r),!n&&Y.current&&Y.current[e](r),!0}))}o.useImperativeHandle(n,(function(){return{focusVisible:function(){J(!0),X.current.focus()}}}),[]),o.useEffect((function(){K&&C&&!x&&Y.current.pulsate()}),[x,C,K]);var ie=re("start",L),oe=re("stop",F),ae=re("stop",I),se=re("stop",(function(e){K&&e.preventDefault(),_&&_(e)})),le=re("start",z),ce=re("stop",$),ue=re("stop",B),fe=re("stop",(function(e){K&&(te(e),J(!1)),P&&P(e)}),!1),de=Object(c.a)((function(e){X.current||(X.current=e.currentTarget),ee(e)&&(J(!0),D&&D(e)),A&&A(e)})),he=function(){var e=a.findDOMNode(X.current);return b&&"button"!==b&&!("A"===e.tagName&&e.href)},pe=o.useRef(!1),ve=Object(c.a)((function(e){C&&!pe.current&&K&&Y.current&&" "===e.key&&(pe.current=!0,e.persist(),Y.current.stop(e,(function(){Y.current.start(e)}))),e.target===e.currentTarget&&he()&&" "===e.key&&e.preventDefault(),R&&R(e),e.target===e.currentTarget&&he()&&"Enter"===e.key&&!k&&(e.preventDefault(),T&&T(e))})),me=Object(c.a)((function(e){C&&" "===e.key&&Y.current&&K&&!e.defaultPrevented&&(pe.current=!1,e.persist(),Y.current.stop(e,(function(){Y.current.pulsate(e)}))),N&&N(e),T&&e.target===e.currentTarget&&he()&&" "===e.key&&!e.defaultPrevented&&T(e)})),ge=b;"button"===ge&&U.href&&(ge="a");var ye={};"button"===ge?(ye.type=q,ye.disabled=k):("a"===ge&&U.href||(ye.role="button"),ye["aria-disabled"]=k);var be=Object(l.a)(u,t),Oe=Object(l.a)(ne,X),ke=Object(l.a)(be,Oe),we=o.useState(!1),xe=we[0],je=we[1];o.useEffect((function(){je(!0)}),[]);var Se=xe&&!x&&!k;return o.createElement(ge,Object(r.a)({className:Object(s.a)(v.root,m,K&&[v.focusVisible,M],k&&v.disabled),onBlur:fe,onClick:T,onFocus:de,onKeyDown:ve,onKeyUp:me,onMouseDown:ie,onMouseLeave:se,onMouseUp:ae,onDragLeave:oe,onTouchEnd:ce,onTouchMove:ue,onTouchStart:le,ref:ke,tabIndex:k?-1:V},ye,U),p,Se?o.createElement(g,Object(r.a)({ref:Y,center:h},H)):null)}));t.a=Object(u.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(y)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(e){var t=r.useState(e),n=t[0],i=t[1],o=e||n;return r.useEffect((function(){null==n&&i("mui-".concat(Math.round(1e5*Math.random())))}),[n]),o}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),i=n.n(r).a.createContext(null);t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));n(57),n(1);var r=n(71),i=(n(11),n(64),{xs:0,sm:600,md:960,lg:1280,xl:1920}),o={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(i[e],"px)")}};function a(e,t,n){if(Array.isArray(t)){var i=e.theme.breakpoints||o;return t.reduce((function(e,r,o){return e[i.up(i.keys[o])]=n(t[o]),e}),{})}if("object"===Object(r.a)(t)){var a=e.theme.breakpoints||o;return Object.keys(t).reduce((function(e,r){return e[a.up(r)]=n(t[r]),e}),{})}return n(t)}},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(e,t,n){"use strict";var r=n(184),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=h(n);i&&i!==p&&e(t,i,r)}var a=u(n);f&&(a=a.concat(f(n)));for(var s=l(t),v=l(n),m=0;m2),h="-10000px",p=function(){function e(t,n,r){Object(l.a)(this,e),this.facet=n,this.createTooltipView=r,this.input=t.state.facet(n),this.tooltips=this.input.filter((function(e){return e})),this.tooltipViews=this.tooltips.map(r)}return Object(c.a)(e,[{key:"update",value:function(e){var t=e.state.facet(this.facet),n=t.filter((function(e){return e}));if(t===this.input){var r,i=Object(s.a)(this.tooltipViews);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.update&&o.update(e)}}catch(g){i.e(g)}finally{i.f()}return{shouldMeasure:!1}}for(var a=[],l=0;l=t.bottom||l.right<=t.left||l.left>=t.right)a.style.top=h;else{var f=!!i.arrow,d=!!i.above,p=c.right-c.left,v=c.bottom-c.top+(f?7:0),m=this.view.textDirection==u.c.LTR?Math.min(l.left-(f?14:0),e.innerWidth-p):Math.max(0,l.left-p+(f?14:0));!i.strictSide&&(d?l.top-(c.bottom-c.top)<0:l.bottom+(c.bottom-c.top)>e.innerHeight)&&(d=!d);var g,y=d?l.top-v:l.bottom+(f?7:0),b=m+p,O=Object(s.a)(n);try{for(O.s();!(g=O.n()).done;){var k=g.value;k.leftm&&k.topy&&(y=d?k.top-v:k.bottom)}}catch(w){O.e(w)}finally{O.f()}"absolute"==this.position?(a.style.top=y-e.parent.top+"px",a.style.left=m-e.parent.left+"px"):(a.style.top=y+"px",a.style.left=m+"px"),n.push({left:m,top:y,right:b,bottom:y+v}),a.classList.toggle("cm-tooltip-above",d),a.classList.toggle("cm-tooltip-below",!d),o.positioned&&o.positioned()}}}},{key:"maybeMeasure",value:function(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView))){var e,t=Object(s.a)(this.manager.tooltipViews);try{for(t.s();!(e=t.n()).done;){e.value.dom.style.top=h}}catch(n){t.e(n)}finally{t.f()}}}}]),e}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),g="undefined"==typeof document||null!=(null===(i=document.body)||void 0===i?void 0:i.style.insetInlineStart)?"insetInlineStart":"left",y=u.d.baseTheme({".cm-tooltip":{zIndex:100},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip.cm-tooltip-arrow:before, .cm-tooltip.cm-tooltip-arrow:after":(r={position:"absolute",content:"''"},Object(a.a)(r,g,"".concat(7,"px")),Object(a.a)(r,"width",0),Object(a.a)(r,"height",0),Object(a.a)(r,"borderLeft","".concat(7,"px solid transparent")),Object(a.a)(r,"borderRight","".concat(7,"px solid transparent")),Object(a.a)(r,"zIndex",-1),r),".cm-tooltip-above.cm-tooltip-arrow:before":{borderTop:"".concat(7,"px solid #f5f5f5"),bottom:"-".concat(6,"px")},".cm-tooltip-below.cm-tooltip-arrow:before":{borderBottom:"".concat(7,"px solid #f5f5f5"),top:"-".concat(6,"px")},".cm-tooltip-above.cm-tooltip-arrow:after":{borderTop:"".concat(7,"px solid #bbb"),bottom:"-".concat(7,"px"),zIndex:-2},".cm-tooltip-below.cm-tooltip-arrow:after":{borderBottom:"".concat(7,"px solid #bbb"),top:"-".concat(7,"px"),zIndex:-2},"&dark .cm-tooltip.cm-tooltip-arrow:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&dark .cm-tooltip.cm-tooltip-arrow:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}),b=f.g.define({enables:[m,y]}),O=f.g.define(),k=function(){function e(t){var n=this;Object(l.a)(this,e),this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new p(t,O,(function(e){return n.createHostedView(e)}))}return Object(c.a)(e,[{key:"createHostedView",value:function(e){var t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}},{key:"mount",value:function(e){var t,n=Object(s.a)(this.manager.tooltipViews);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.mount&&r.mount(e)}}catch(i){n.e(i)}finally{n.f()}this.mounted=!0}},{key:"positioned",value:function(){var e,t=Object(s.a)(this.manager.tooltipViews);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.positioned&&n.positioned()}}catch(r){t.e(r)}finally{t.f()}}},{key:"update",value:function(e){this.manager.update(e)}}],[{key:"create",value:function(t){return new e(t)}}]),e}(),w=b.compute([O],(function(e){var t=e.facet(O).filter((function(e){return e}));return 0===t.length?null:{pos:Math.min.apply(Math,Object(o.a)(t.map((function(e){return e.pos})))),end:Math.max.apply(Math,Object(o.a)(t.filter((function(e){return null!=e.end})).map((function(e){return e.end})))),create:k.create,above:t[0].above,arrow:t.some((function(e){return e.arrow}))}})),x=function(){function e(t,n,r,i,o){Object(l.a)(this,e),this.view=t,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.lastMouseMove=null,this.lastMoveTime=0,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}return Object(c.a)(e,[{key:"update",value:function(){var e=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((function(){return e.startHover()}),20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active){var e=Date.now()-this.lastMoveTime;eo.bottom||r.xo.right+this.view.defaultCharacterWidth)){var a=this.view.bidiSpans(this.view.state.doc.lineAt(i)).find((function(e){return e.from<=i&&e.to>=i})),s=a&&a.dir==u.c.RTL?-1:1,l=this.source(this.view,i,r.x1&&void 0!==arguments[1]?arguments[1]:{},n=f.j.define(),r=f.k.define({create:function(){return null},update:function(e,r){if(e&&t.hideOnChange&&(r.docChanged||r.selection))return null;var i,o=Object(s.a)(r.effects);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(a.is(n))return a.value}}catch(u){o.e(u)}finally{o.f()}if(e&&r.docChanged){var l=r.changes.mapPos(e.pos,-1,f.h.TrackDel);if(null==l)return null;var c=Object.assign(Object.create(null),e);return c.pos=l,null!=e.end&&(c.end=r.changes.mapPos(e.end)),c}return e},provide:function(e){return O.from(e)}}),i=t.hoverTime||750;return[r,u.f.define((function(t){return new x(t,e,r,n,i)})),w]}},function(e,t,n){e.exports=n(207)},function(e,t,n){"use strict";n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return M}));var r=n(18),i=n(17),o=n(26),a=n(3),s=n(6),l=n(5),c=n(9),u=n(4),f=n(100),d=n(61),h=n(28),p=function e(t,n,r){Object(l.a)(this,e),this.from=t,this.to=n,this.diagnostic=r},v=function(){function e(t,n,r){Object(l.a)(this,e),this.diagnostics=t,this.panel=n,this.selected=r}return Object(s.a)(e,null,[{key:"init",value:function(t,n,r){var i=c.b.set(t.map((function(e){return e.from==e.to||e.from==e.to-1&&r.doc.lineAt(e.from).to==e.from?c.b.widget({widget:new A(e),diagnostic:e}).range(e.from):c.b.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity},diagnostic:e}).range(e.from,e.to)})),!0);return new e(i,n,m(i))}}]),e}();function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=null;return e.between(n,1e9,(function(e,n,i){var o=i.spec;if(!t||o.diagnostic==t)return r=new p(e,n,o.diagnostic),!1})),r}function g(e,t,n){return e.field(k,!1)?t:t.concat(u.j.appendConfig.of([k.init(n),c.d.decorations.compute([k],(function(e){var t=e.field(k),n=t.selected,r=t.panel;return n&&r&&n.from!=n.to?c.b.set([w.range(n.from,n.to)]):c.b.none})),Object(f.a)(x),L]))}var y=u.j.define(),b=u.j.define(),O=u.j.define(),k=u.k.define({create:function(){return new v(c.b.none,null,null)},update:function(e,t){if(t.docChanged){var n=e.diagnostics.map(t.changes),r=null;if(e.selected){var i=t.changes.mapPos(e.selected.from,1);r=m(n,e.selected.diagnostic,i)||m(n,null,i)}e=new v(n,e.panel,r)}var o,s=Object(a.a)(t.effects);try{for(s.s();!(o=s.n()).done;){var l=o.value;l.is(y)?e=v.init(l.value,e.panel,t.state):l.is(b)?e=new v(e.diagnostics,l.value?R.open:null,e.selected):l.is(O)&&(e=new v(e.diagnostics,e.panel,l.value))}}catch(c){s.e(c)}finally{s.f()}return e},provide:function(e){return[d.b.from(e,(function(e){return e.panel})),c.d.decorations.from(e,(function(e){return e.diagnostics}))]}});var w=c.b.mark({class:"cm-lintRange cm-lintRange-active"});function x(e,t,n){var r=e.state.field(k).diagnostics,i=[],o=2e8,a=0;return r.between(t-(n<0?1:0),t+(n>0?1:0),(function(e,r,s){var l=s.spec;t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t1&&void 0!==arguments[1]?arguments[1]:{};return C.of({source:e,delay:null!==(t=n.delay)&&void 0!==t?t:750})}function P(e){var t=[];if(e){var n,r=Object(a.a)(e);try{e:for(r.s();!(n=r.n()).done;){for(var i=n.value.name,o=function(e){var n=i[e];if(/[a-zA-Z]/.test(n)&&!t.some((function(e){return e.toLowerCase()==n.toLowerCase()})))return t.push(n),"continue|actions"},s=0;s=65&&e.keyCode<=90&&n.selectedIndex>=0))return;for(var r=n.items[n.selectedIndex].diagnostic,i=P(r.actions),o=0;oi&&(e.items.splice(i,u-i),o=!0)),r&&l.diagnostic==r.diagnostic?l.dom.hasAttribute("aria-selected")||(l.dom.setAttribute("aria-selected","true"),a=l):l.dom.hasAttribute("aria-selected")&&l.dom.removeAttribute("aria-selected"),i++}));ir.bottom&&(e.list.scrollTop+=n.bottom-r.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}},{key:"sync",value:function(){var e=this.list.firstChild;function t(){var t=e;e=t.nextSibling,t.remove()}var n,r=Object(a.a)(this.items);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e)}}catch(o){r.e(o)}finally{r.f()}for(;e;)t()}},{key:"moveSelection",value:function(e){if(!(this.selectedIndex<0)){var t=m(this.view.state.field(k).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:O.of(t)})}}}],[{key:"open",value:function(t){return new e(t)}}]),e}();function N(e){if("function"!=typeof btoa)return"none";var t='');return"url('data:image/svg+xml;base64,".concat(btoa(t),"')")}var L=c.d.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x"},".cm-lintRange-error":{backgroundImage:N("#d11")},".cm-lintRange-warning":{backgroundImage:N("orange")},".cm-lintRange-info":{backgroundImage:N("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return ce}));var r=n(3),i=n(4),o=n(15),a=n(9),s=n(65),l=n(21),c=n(23);function u(e,t){return i.e.create(e.ranges.map(t),e.mainIndex)}function f(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function d(e,t){var n=e.state,r=e.dispatch,i=u(n.selection,t);return!i.eq(n.selection)&&(r(f(n,i)),!0)}function h(e,t){return i.e.cursor(t?e.to:e.from)}function p(e,t){return d(e,(function(n){return n.empty?e.moveByChar(n,t):h(n,t)}))}var v=function(e){return p(e,e.textDirection!=a.c.LTR)},m=function(e){return p(e,e.textDirection==a.c.LTR)};function g(e,t){return d(e,(function(n){return n.empty?e.moveByGroup(n,t):h(n,t)}))}function y(e,t,n){if(t.type.prop(n))return!0;var r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function b(e,t,n){for(var r=Object(l.j)(e).resolveInner(t.head),o=n?c.b.closedBy:c.b.openedBy,a=t.head;;){var u=n?r.childAfter(a):r.childBefore(a);if(!u)break;y(e,u,o)?r=u:a=n?u.to:u.from}var f,d;return d=r.type.prop(o)&&(f=n?Object(s.b)(e,r.from,1):Object(s.b)(e,r.to,-1))&&f.matched?n?f.end.to:f.end.from:n?r.to:r.from,i.e.cursor(d,n?-1:1)}function O(e,t){return d(e,(function(n){if(!n.empty)return h(n,t);var r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}var k=function(e){return O(e,!1)},w=function(e){return O(e,!0)};function x(e,t){return d(e,(function(n){return n.empty?e.moveVertically(n,t,e.dom.clientHeight):h(n,t)}))}var j=function(e){return x(e,!1)},S=function(e){return x(e,!0)};function E(e,t,n){var r=e.visualLineAt(t.head),o=e.moveToLineBoundary(t,n);if(o.head==t.head&&o.head!=(n?r.to:r.from)&&(o=e.moveToLineBoundary(t,n,!1)),!n&&o.head==r.from&&r.length){var a=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;a&&t.head!=r.from+a&&(o=i.e.cursor(r.from+a))}return o}var C=function(e){return d(e,(function(t){return E(e,t,!0)}))},M=function(e){return d(e,(function(t){return E(e,t,!1)}))};function P(e,t,n){var r=!1,o=u(e.selection,(function(t){var o=Object(s.b)(e,t.head,-1)||Object(s.b)(e,t.head,1)||t.head>0&&Object(s.b)(e,t.head-1,1)||t.headn&&(o="delete.forward"),n=Math.min(n,a),r=Math.max(r,a)}return n==r?{range:e}:{changes:{from:n,to:r},range:i.e.cursor(n)}}));return!a.changes.empty&&(r(n.update(a,{scrollIntoView:!0,userEvent:o})),!0)}function X(e,t,n){if(e instanceof a.d){var i,o=Object(r.a)(e.pluginField(a.e.atomicRanges));try{for(o.s();!(i=o.n()).done;){i.value.between(t,t,(function(e,r){et&&(t=n?r:e)}))}}catch(s){o.e(s)}finally{o.f()}}return t}var Y=function(e,t){return U(e,(function(n){var r,i,a=e.state,s=a.doc.lineAt(n);if(!t&&n>s.from&&n=s.number){var c=n[n.length-1];c.to=l.to,c.ranges.push(a)}else n.push({from:s.from,to:l.to,ranges:[a]});i=l.number+1}}catch(u){o.e(u)}finally{o.f()}return n}function ne(e,t,n){if(e.readOnly)return!1;var o,a=[],s=[],l=Object(r.a)(te(e));try{for(l.s();!(o=l.n()).done;){var c=o.value;if(n?c.to!=e.doc.length:0!=c.from){var u=e.doc.lineAt(n?c.to+1:c.from-1),f=u.length+1;if(n){a.push({from:c.to,to:u.to},{from:c.from,insert:u.text+e.lineBreak});var d,h=Object(r.a)(c.ranges);try{for(h.s();!(d=h.n()).done;){var p=d.value;s.push(i.e.range(Math.min(e.doc.length,p.anchor+f),Math.min(e.doc.length,p.head+f)))}}catch(y){h.e(y)}finally{h.f()}}else{a.push({from:u.from,to:c.from},{from:c.to,insert:e.lineBreak+u.text});var v,m=Object(r.a)(c.ranges);try{for(m.s();!(v=m.n()).done;){var g=v.value;s.push(i.e.range(g.anchor-f,g.head-f))}}catch(y){m.e(y)}finally{m.f()}}}}}catch(y){l.e(y)}finally{l.f()}return!!a.length&&(t(e.update({changes:a,scrollIntoView:!0,selection:i.e.create(s,e.selection.mainIndex),userEvent:"move.line"})),!0)}function re(e,t,n){if(e.readOnly)return!1;var i,o=[],a=Object(r.a)(te(e));try{for(a.s();!(i=a.n()).done;){var s=i.value;n?o.push({from:s.from,insert:e.doc.slice(s.from,s.to)+e.lineBreak}):o.push({from:s.to,insert:e.lineBreak+e.doc.slice(s.from,s.to)})}}catch(l){a.e(l)}finally{a.f()}return t(e.update({changes:o,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var ie=oe(!1);function oe(e){return function(t){var n=t.state,r=t.dispatch;if(n.readOnly)return!1;var a=n.changeByRange((function(t){var r=t.from,a=t.to,s=n.doc.lineAt(r),u=!e&&r==a&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};var n,r=Object(l.j)(e).resolveInner(t),i=r.childBefore(t),o=r.childAfter(t);return i&&o&&i.to<=t&&o.from>=t&&(n=i.type.prop(c.b.closedBy))&&n.indexOf(o.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(o.from).from?{from:i.to,to:o.from}:null}(n,r);e&&(r=a=(a<=s.to?s:n.doc.lineAt(a)).to);var f=new l.a(n,{simulateBreak:r,simulateDoubleBreak:!!u}),d=Object(l.e)(f,r);for(null==d&&(d=/^\s*/.exec(n.doc.lineAt(r).text)[0].length);as.from&&rn&&(r.empty||r.to>s.from)&&(t(s,o,r),n=s.number),a=s.to+1}var l=e.changes(o);return{changes:o,range:i.e.range(l.mapPos(r.anchor,1),l.mapPos(r.head,1))}}))}var se=function(e){var t=e.state,n=e.dispatch;return!t.readOnly&&(n(t.update(ae(t,(function(e,n){n.push({from:e.from,insert:t.facet(l.h)})})),{userEvent:"input.indent"})),!0)},le=function(e){var t=e.state,n=e.dispatch;return!t.readOnly&&(n(t.update(ae(t,(function(e,n){var r=/^\s*/.exec(e.text)[0];if(r){for(var i=Object(o.d)(r,t.tabSize),a=0,s=Object(l.g)(t,Math.max(0,i-Object(l.d)(t)));a1?o=i.e.create([r.main]):r.main.empty||(o=i.e.create([i.e.cursor(r.main.head)])),!!o&&(n(f(t,o)),!0)}},{key:"Mod-Enter",run:oe(!0)},{key:"Alt-l",mac:"Ctrl-l",run:function(e){var t=e.state,n=e.dispatch,r=te(t).map((function(e){var n=e.from,r=e.to;return i.e.range(n,Math.min(r+1,t.doc.length))}));return n(t.update({selection:i.e.create(r),userEvent:"select"})),!0}},{key:"Mod-i",run:function(e){var t=e.state,n=e.dispatch,r=u(t.selection,(function(e){for(var n,r=Object(l.j)(t).resolveInner(e.head,1);!(r.from=e.to||r.to>e.to&&r.from<=e.from)&&(null===(n=r.parent)||void 0===n?void 0:n.parent);)r=r.parent;return i.e.range(r.to,r.from)}));return n(f(t,r)),!0},preventDefault:!0},{key:"Mod-[",run:le},{key:"Mod-]",run:se},{key:"Mod-Alt-\\",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=Object.create(null),i=new l.a(t,{overrideIndentation:function(e){var t=r[e];return null==t?-1:t}}),o=ae(t,(function(e,n,o){var a=Object(l.e)(i,e.from);if(null!=a){/\S/.test(e.text)||(a=0);var s=/^\s*/.exec(e.text)[0],c=Object(l.g)(t,a);(s!=c||o.from0?n--:rn?n:Math.max(0,t-1),!1)}))}},{mac:"Mod-Delete",run:ee}].concat([{key:"Ctrl-b",run:v,shift:D,preventDefault:!0},{key:"Ctrl-f",run:m,shift:R},{key:"Ctrl-p",run:k,shift:_},{key:"Ctrl-n",run:w,shift:I},{key:"Ctrl-a",run:function(e){return d(e,(function(t){return i.e.cursor(e.visualLineAt(t.head).from,1)}))},shift:function(e){return T(e,(function(t){return i.e.cursor(e.visualLineAt(t.head).from)}))}},{key:"Ctrl-e",run:function(e){return d(e,(function(t){return i.e.cursor(e.visualLineAt(t.head).to,-1)}))},shift:function(e){return T(e,(function(t){return i.e.cursor(e.visualLineAt(t.head).to)}))}},{key:"Ctrl-d",run:K},{key:"Ctrl-h",run:G},{key:"Ctrl-k",run:ee},{key:"Ctrl-Alt-h",run:Z},{key:"Ctrl-o",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=t.changeByRange((function(e){return{changes:{from:e.from,to:e.to,insert:o.a.of(["",""])},range:i.e.cursor(e.from)}}));return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=t.changeByRange((function(e){if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};var n=e.from,r=t.doc.lineAt(n),a=n==r.from?n-1:Object(o.e)(r.text,n-r.from,!1)+r.from,s=n==r.to?n+1:Object(o.e)(r.text,n-r.from,!0)+r.from;return{changes:{from:a,to:s,insert:t.doc.slice(n,s).append(t.doc.slice(a,n))},range:i.e.cursor(s)}}));return!r.changes.empty&&(n(t.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Alt-<",run:V},{key:"Alt->",run:H},{key:"Ctrl-v",run:S},{key:"Alt-v",run:j}].map((function(e){return{mac:e.key,run:e.run,shift:e.shift}}))))},function(e,t,n){"use strict";function r(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),i=r.createContext({});t.a=i},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(56),i=n(49),o=(n(11),n(0)),a=n.n(o),s=n(27),l=n.n(s),c=!1,u=n(80),f="unmounted",d="exited",h="entering",p="entered",v="exiting",m=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=d,r.appearStatus=h):i=p:i=t.unmountOnExit||t.mountOnEnter?f:d,r.state={status:i},r.nextCallback=null,r}Object(i.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===f?{status:d}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==h&&n!==p&&(t=h):n!==h&&n!==p||(t=v)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===h?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===d&&this.setState({status:f})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[l.a.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),u=r?s.appear:s.enter;!e&&!n||c?this.safeSetState({status:p},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:h},(function(){t.props.onEntering(o,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:p},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:l.a.findDOMNode(this);t&&!c?(this.props.onExit(r),this.safeSetState({status:v},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:d},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:d},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:l.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===f)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(r.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(u.a.Provider,{value:null},"function"===typeof n?n(e,i):a.a.cloneElement(a.a.Children.only(n),i))},t}(a.a.Component);function g(){}m.contextType=u.a,m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:g,onEntering:g,onEntered:g,onExit:g,onExiting:g,onExited:g},m.UNMOUNTED=f,m.EXITED=d,m.ENTERING=h,m.ENTERED=p,m.EXITING=v;t.a=m},,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),c=1;c1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');var n=E(e),r=n.length>0?n[0]:"",o=C("%"+r+"%",t),s=o.name,c=o.value,u=!1,f=o.alias;f&&(r=f[0],k(n,O([0,1],f)));for(var d=1,h=!0;d=n.length){var y=l(c,p);c=(h=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else h=b(c,p),c=c[p];h&&!u&&(v[s]=c)}}return c}},function(e,t,n){"use strict";var r=n(190);e.exports=Function.prototype.bind||r},function(e,t,n){"use strict";var r=String.prototype.replace,i=/%20/g,o="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return r.call(e,i,"+")},RFC3986:function(e){return String(e)}},RFC1738:o,RFC3986:a}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e){return function(){return null}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n,r,i){return null}n.d(t,"a",(function(){return r}))},function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){(function(t){var n="__lodash_hash_undefined__",r="[object Function]",i="[object GeneratorFunction]",o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,s=/^\./,l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,f="object"==typeof t&&t&&t.Object===Object&&t,d="object"==typeof self&&self&&self.Object===Object&&self,h=f||d||Function("return this")();var p=Array.prototype,v=Function.prototype,m=Object.prototype,g=h["__core-js_shared__"],y=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=v.toString,O=m.hasOwnProperty,k=m.toString,w=RegExp("^"+b.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=h.Symbol,j=p.splice,S=_(h,"Map"),E=_(Object,"create"),C=x?x.prototype:void 0,M=C?C.toString:void 0;function P(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},T.prototype.set=function(e,t){var n=this.__data__,r=D(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},A.prototype.clear=function(){this.__data__={hash:new P,map:new(S||T),string:new P}},A.prototype.delete=function(e){return L(this,e).delete(e)},A.prototype.get=function(e){return L(this,e).get(e)},A.prototype.has=function(e){return L(this,e).has(e)},A.prototype.set=function(e,t){return L(this,e).set(e,t),this};var I=B((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(W(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return s.test(e)&&n.push(""),e.replace(l,(function(e,t,r,i){n.push(r?i.replace(c,"$1"):t||e)})),n}));function $(e){if("string"==typeof e||W(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(B.Cache||A),n}B.Cache=A;var z=Array.isArray;function F(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function W(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==k.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:R(e,t);return void 0===r?n:r}}).call(this,n(113))},function(e,t,n){"use strict";var r=n(203),i=n(204),o=n(205),a=Symbol("max"),s=Symbol("length"),l=Symbol("lengthCalculator"),c=Symbol("allowStale"),u=Symbol("maxAge"),f=Symbol("dispose"),d=Symbol("noDisposeOnSet"),h=Symbol("lruList"),p=Symbol("cache"),v=Symbol("updateAgeOnGet"),m=function(){return 1},g=function(){function e(t){if(r(this,e),"number"===typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!==typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[a]=t.max||1/0;var n=t.length||m;if(this[l]="function"!==typeof n?m:n,this[c]=t.stale||!1,t.maxAge&&"number"!==typeof t.maxAge)throw new TypeError("maxAge must be a number");this[u]=t.maxAge||0,this[f]=t.dispose,this[d]=t.noDisposeOnSet||!1,this[v]=t.updateAgeOnGet||!1,this.reset()}return i(e,[{key:"max",get:function(){return this[a]},set:function(e){if("number"!==typeof e||e<0)throw new TypeError("max must be a non-negative number");this[a]=e||1/0,O(this)}},{key:"allowStale",get:function(){return this[c]},set:function(e){this[c]=!!e}},{key:"maxAge",get:function(){return this[u]},set:function(e){if("number"!==typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,O(this)}},{key:"lengthCalculator",get:function(){return this[l]},set:function(e){var t=this;"function"!==typeof e&&(e=m),e!==this[l]&&(this[l]=e,this[s]=0,this[h].forEach((function(e){e.length=t[l](e.value,e.key),t[s]+=e.length}))),O(this)}},{key:"length",get:function(){return this[s]}},{key:"itemCount",get:function(){return this[h].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var n=this[h].tail;null!==n;){var r=n.prev;x(this,e,n,t),n=r}}},{key:"forEach",value:function(e,t){t=t||this;for(var n=this[h].head;null!==n;){var r=n.next;x(this,e,n,t),n=r}}},{key:"keys",value:function(){return this[h].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[h].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[f]&&this[h]&&this[h].length&&this[h].forEach((function(t){return e[f](t.key,t.value)})),this[p]=new Map,this[h]=new o,this[s]=0}},{key:"dump",value:function(){var e=this;return this[h].map((function(t){return!b(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[h]}},{key:"set",value:function(e,t,n){if((n=n||this[u])&&"number"!==typeof n)throw new TypeError("maxAge must be a number");var r=n?Date.now():0,i=this[l](t,e);if(this[p].has(e)){if(i>this[a])return k(this,this[p].get(e)),!1;var o=this[p].get(e).value;return this[f]&&(this[d]||this[f](e,o.value)),o.now=r,o.maxAge=n,o.value=t,this[s]+=i-o.length,o.length=i,this.get(e),O(this),!0}var c=new w(e,t,i,r,n);return c.length>this[a]?(this[f]&&this[f](e,t),!1):(this[s]+=c.length,this[h].unshift(c),this[p].set(e,this[h].head),O(this),!0)}},{key:"has",value:function(e){if(!this[p].has(e))return!1;var t=this[p].get(e).value;return!b(this,t)}},{key:"get",value:function(e){return y(this,e,!0)}},{key:"peek",value:function(e){return y(this,e,!1)}},{key:"pop",value:function(){var e=this[h].tail;return e?(k(this,e),e.value):null}},{key:"del",value:function(e){k(this,this[p].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),n=e.length-1;n>=0;n--){var r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{var o=i-t;o>0&&this.set(r.k,r.v,o)}}}},{key:"prune",value:function(){var e=this;this[p].forEach((function(t,n){return y(e,n,!1)}))}}]),e}(),y=function(e,t,n){var r=e[p].get(t);if(r){var i=r.value;if(b(e,i)){if(k(e,r),!e[c])return}else n&&(e[v]&&(r.value.now=Date.now()),e[h].unshiftNode(r));return i.value}},b=function(e,t){if(!t||!t.maxAge&&!e[u])return!1;var n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[u]&&n>e[u]},O=function(e){if(e[s]>e[a])for(var t=e[h].tail;e[s]>e[a]&&null!==t;){var n=t.prev;k(e,t),t=n}},k=function(e,t){if(t){var n=t.value;e[f]&&e[f](n.key,n.value),e[s]-=n.length,e[p].delete(n.key),e[h].removeNode(t)}},w=function e(t,n,i,o,a){r(this,e),this.key=t,this.value=n,this.length=i,this.now=o,this.maxAge=a||0},x=function(e,t,n,r){var i=n.value;b(e,i)&&(k(e,n),e[c]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=g},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,c=s||l||Function("return this")(),u=Object.prototype.toString,f=Math.max,d=Math.min,h=function(){return c.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,l,c=0,u=!1,m=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function b(e){return c=e,s=setTimeout(k,t),u?y(e):a}function O(e){var n=e-l;return void 0===l||n>=t||n<0||m&&e-c>=o}function k(){var e=h();if(O(e))return w(e);s=setTimeout(k,function(e){var n=t-(e-l);return m?d(n,o-(e-c)):n}(e))}function w(e){return s=void 0,g&&r?y(e):(r=i=void 0,a)}function x(){var e=h(),n=O(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return b(l);if(m)return s=setTimeout(k,t),y(l)}return void 0===s&&(s=setTimeout(k,t)),a}return t=v(t)||0,p(n)&&(u=!!n.leading,o=(m="maxWait"in n)?f(v(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g),x.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},x.flush=function(){return void 0===s?a:w(h())},x}}).call(this,n(113))},,,,,,,,,,,function(e,t,n){"use strict";var r=n(112),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===r.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=a[u]:u<2048?l+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?l+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r=0)return 1;return 0}();var i=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function o(e){return e&&"[object Function]"==={}.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=a(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:l(s(e))}function c(e){return e&&e.referenceNode?e.referenceNode:e}var u=n&&!(!window.MSInputMethodContext||!document.documentMode),f=n&&/MSIE 10/.test(navigator.userAgent);function d(e){return 11===e?u:10===e?f:u||f}function h(e){if(!e)return document.documentElement;for(var t=d(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===a(n,"position")?h(n):n:e?e.ownerDocument.documentElement:document.documentElement}function p(e){return null!==e.parentNode?p(e.parentNode):e}function v(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a=o.commonAncestorContainer;if(e!==a&&t!==a||r.contains(i))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||h(e.firstElementChild)===e)}(a)?a:h(a);var s=p(e);return s.host?v(s.host,t):v(e,p(t).host)}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=m(t,"top"),i=m(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function y(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function b(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],d(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function O(e){var t=e.body,n=e.documentElement,r=d(10)&&getComputedStyle(n);return{height:b("Height",t,n,r),width:b("Width",t,n,r)}}var k=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},w=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=d(10),i="HTML"===t.nodeName,o=E(e),s=E(t),c=l(e),u=a(t),f=parseFloat(u.borderTopWidth),h=parseFloat(u.borderLeftWidth);n&&i&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var p=S({top:o.top-s.top-f,left:o.left-s.left-h,width:o.width,height:o.height});if(p.marginTop=0,p.marginLeft=0,!r&&i){var v=parseFloat(u.marginTop),m=parseFloat(u.marginLeft);p.top-=f-v,p.bottom-=f-v,p.left-=h-m,p.right-=h-m,p.marginTop=v,p.marginLeft=m}return(r&&!n?t.contains(c):t===c&&"BODY"!==c.nodeName)&&(p=g(p,t)),p}function M(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=C(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:m(n),s=t?0:m(n,"left"),l={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o};return S(l)}function P(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===a(e,"position"))return!0;var n=s(e);return!!n&&P(n)}function T(e){if(!e||!e.parentElement||d())return document.documentElement;for(var t=e.parentElement;t&&"none"===a(t,"transform");)t=t.parentElement;return t||document.documentElement}function A(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?T(e):v(e,c(t));if("viewport"===r)o=M(a,i);else{var u=void 0;"scrollParent"===r?"BODY"===(u=l(s(t))).nodeName&&(u=e.ownerDocument.documentElement):u="window"===r?e.ownerDocument.documentElement:r;var f=C(u,a,i);if("HTML"!==u.nodeName||P(a))o=f;else{var d=O(e.ownerDocument),h=d.height,p=d.width;o.top+=f.top-f.marginTop,o.bottom=h+f.top,o.left+=f.left-f.marginLeft,o.right=p+f.left}}var m="number"===typeof(n=n||0);return o.left+=m?n:n.left||0,o.top+=m?n:n.top||0,o.right-=m?n:n.right||0,o.bottom-=m?n:n.bottom||0,o}function D(e){return e.width*e.height}function R(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=A(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map((function(e){return j({key:e},s[e],{area:D(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,f=e.split("-")[1];return u+(f?"-"+f:"")}function N(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?T(t):v(t,c(n));return C(n,i,r)}function L(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function _(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function I(e,t,n){n=n.split("-")[0];var r=L(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return i[a]=t[a]+t[l]/2-r[l]/2,i[s]=n===s?t[s]-r[c]:t[_(s)],i}function $(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function B(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=$(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&o(n)&&(t.offsets.popper=S(t.offsets.popper),t.offsets.reference=S(t.offsets.reference),t=n(t,e))})),t}function z(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=N(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=R(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=I(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=B(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function F(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function W(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=ee.indexOf(e),r=ee.slice(n+1).concat(ee.slice(0,n));return t?r.reverse():r}var ne="flip",re="clockwise",ie="counterclockwise";function oe(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf($(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return c=c.map((function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){return S("%p"===a?n:r)[t]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(e,i,t,n)}))})),c.forEach((function(e,t){e.forEach((function(n,r){Y(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}var ae={shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:x({},l,o[l]),end:x({},l,o[l]+o[c]-a[c])};e.offsets.popper=j({},a,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],l=void 0;return l=Y(+n)?[+n,0]:oe(n,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||h(e.instance.popper);e.instance.reference===n&&(n=h(n));var r=W("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var l=A(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,f={primary:function(e){var n=u[e];return u[e]l[e]&&!t.escapeWithReference&&(r=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),x({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=j({},u,f[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]o(r[s])&&(e.offsets.popper[l]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!J(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"===typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,s=o.popper,l=o.reference,c=-1!==["left","right"].indexOf(i),u=c?"height":"width",f=c?"Top":"Left",d=f.toLowerCase(),h=c?"left":"top",p=c?"bottom":"right",v=L(r)[u];l[p]-vs[p]&&(e.offsets.popper[d]+=l[d]+v-s[p]),e.offsets.popper=S(e.offsets.popper);var m=l[d]+l[u]/2-v/2,g=a(e.instance.popper),y=parseFloat(g["margin"+f]),b=parseFloat(g["border"+f+"Width"]),O=m-e.offsets.popper[d]-y-b;return O=Math.max(Math.min(s[u]-v,O),0),e.arrowElement=r,e.offsets.arrow=(x(n={},d,Math.round(O)),x(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(F(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=A(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=_(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case ne:a=[r,i];break;case re:a=te(r);break;case ie:a=te(r,!0);break;default:a=t.behavior}return a.forEach((function(s,l){if(r!==s||a.length===l+1)return e;r=e.placement.split("-")[0],i=_(r);var c=e.offsets.popper,u=e.offsets.reference,f=Math.floor,d="left"===r&&f(c.right)>f(u.left)||"right"===r&&f(c.left)f(u.top)||"bottom"===r&&f(c.top)f(n.right),v=f(c.top)f(n.bottom),g="left"===r&&h||"right"===r&&p||"top"===r&&v||"bottom"===r&&m,y=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(y&&"start"===o&&h||y&&"end"===o&&p||!y&&"start"===o&&v||!y&&"end"===o&&m),O=!!t.flipVariationsByContent&&(y&&"start"===o&&p||y&&"end"===o&&h||!y&&"start"===o&&m||!y&&"end"===o&&v),k=b||O;(d||g||k)&&(e.flipped=!0,(d||g)&&(r=a[l+1]),k&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=j({},e.offsets.popper,I(e.instance.popper,e.offsets.reference,e.placement)),e=B(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=_(t),e.offsets.popper=S(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!J(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=$(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&void 0!==arguments[2]?arguments[2]:{};k(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=i(this.update.bind(this)),this.options=j({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(j({},e.Defaults.modifiers,a.modifiers)).forEach((function(t){r.options.modifiers[t]=j({},e.Defaults.modifiers[t]||{},a.modifiers?a.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return j({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&o(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return w(e,[{key:"update",value:function(){return z.call(this)}},{key:"destroy",value:function(){return V.call(this)}},{key:"enableEventListeners",value:function(){return U.call(this)}},{key:"disableEventListeners",value:function(){return X.call(this)}}]),e}();le.Utils=("undefined"!==typeof window?window:e).PopperUtils,le.placements=Z,le.Defaults=se,t.a=le}).call(this,n(113))},function(e,t,n){"use strict";var r=n(51),i=n(52);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(53)).default)(o.createElement("path",{d:"M10 20h4V4h-4v16zm-6 0h4v-8H4v8zM16 9v11h4V9h-4z"}),"Equalizer");t.default=a},function(e,t,n){"use strict";var r=n(51),i=n(52);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(53)).default)(o.createElement("path",{d:"M3.5 18.49l6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"}),"ShowChart");t.default=a},function(e,t,n){"use strict";var r=n(51),i=n(52);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(53)).default)(o.createElement("path",{d:"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"}),"Code");t.default=a},function(e,t,n){"use strict";var r=n(51),i=n(52);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=(0,r(n(53)).default)(o.createElement("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"}),"TableChart");t.default=a},function(e,t,n){var r;window,r=function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./react/uplot-react.tsx")}({"./common/index.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"optionsUpdateState",(function(){return i})),n.d(t,"dataMatch",(function(){return o}));var r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i=g&&!o||"t"===o?(m+=d.abbreviations.trillion,t/=g):a=y&&!o||"b"===o?(m+=d.abbreviations.billion,t/=y):a=b&&!o||"m"===o?(m+=d.abbreviations.million,t/=b):(a=O&&!o||"k"===o)&&(m+=d.abbreviations.thousand,t/=O)),e._.includes(n,"[.]")&&(p=!0,n=n.replace("[.]",".")),s=t.toString().split(".")[0],l=n.split(".")[1],u=n.indexOf(","),v=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,l?(e._.includes(l,"[")?(l=(l=l.replace("]","")).split("["),k=e._.toFixed(t,l[0].length+l[1].length,r,l[1].length)):k=e._.toFixed(t,l.length,r),s=k.split(".")[0],k=e._.includes(k,".")?d.delimiters.decimal+k.split(".")[1]:"",p&&0===Number(k.slice(1))&&(k="")):s=e._.toFixed(t,0,r),m&&!o&&Number(s)>=1e3&&m!==d.abbreviations.trillion)switch(s=String(Number(s)/1e3),m){case d.abbreviations.thousand:m=d.abbreviations.million;break;case d.abbreviations.million:m=d.abbreviations.billion;break;case d.abbreviations.billion:m=d.abbreviations.trillion}if(e._.includes(s,"-")&&(s=s.slice(1),w=!0),s.length0;x--)s="0"+s;return u>-1&&(s=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+d.delimiters.thousands)),0===n.indexOf(".")&&(s=""),f=s+k+(m||""),h?f=(h&&w?"(":"")+f+(h&&w?")":""):c>=0?f=0===c?(w?"-":"+")+f:f+(w?"-":"+"):w&&(f="-"+f),f},stringToNumber:function(e){var t,n,r,o=i[a.currentLocale],s=e,l={thousand:3,million:6,billion:9,trillion:12};if(a.zeroFormat&&e===a.zeroFormat)n=0;else if(a.nullFormat&&e===a.nullFormat||!e.replace(/[^0-9]+/g,"").length)n=null;else{for(t in n=1,"."!==o.delimiters.decimal&&(e=e.replace(/\./g,"").replace(o.delimiters.decimal,".")),l)if(r=new RegExp("[^a-zA-Z]"+o.abbreviations[t]+"(?:\\)|(\\"+o.currency.symbol+")?(?:\\))?)?$"),s.match(r)){n*=Math.pow(10,l[t]);break}n*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),n*=Number(e)}return n},isNaN:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return"number"===typeof e&&isNaN(e)})),includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,n){return e.slice(0,n)+t+e.slice(n)},reduce:function(e,t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!==typeof t)throw new TypeError(t+" is not a function");var n,r=Object(e),i=r.length>>>0,o=0;if(3===arguments.length)n=arguments[2];else{for(;o=i)throw new TypeError("Reduce of empty array with no initial value");n=r[o++]}for(;or?e:r}),1)},toFixed:function(e,t,n,r){var i,o,a,s,l=e.toString().split("."),c=t-(r||0);return i=2===l.length?Math.min(Math.max(l[1].length,c),t):c,a=Math.pow(10,i),s=(n(e+"e+"+i)/a).toFixed(i),r>t-i&&(o=new RegExp("\\.?0{1,"+(r-(t-i))+"}$"),s=s.replace(o,"")),s}},e.options=a,e.formats=r,e.locales=i,e.locale=function(e){return e&&(a.currentLocale=e.toLowerCase()),a.currentLocale},e.localeData=function(e){if(!e)return i[a.currentLocale];if(e=e.toLowerCase(),!i[e])throw new Error("Unknown locale : "+e);return i[e]},e.reset=function(){for(var e in o)a[e]=o[e]},e.zeroFormat=function(e){a.zeroFormat="string"===typeof e?e:null},e.nullFormat=function(e){a.nullFormat="string"===typeof e?e:null},e.defaultFormat=function(e){a.defaultFormat="string"===typeof e?e:"0.0"},e.register=function(e,t,n){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=n,n},e.validate=function(t,n){var r,i,o,a,s,l,c,u;if("string"!==typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;if(""===t)return!1;try{c=e.localeData(n)}catch(f){c=e.localeData(e.locale())}return o=c.currency.symbol,s=c.abbreviations,r=c.delimiters.decimal,i="."===c.delimiters.thousands?"\\.":c.delimiters.thousands,(null===(u=t.match(/^[^\d]+/))||(t=t.substr(1),u[0]===o))&&(null===(u=t.match(/[^\d]+$/))||(t=t.slice(0,-1),u[0]===s.thousand||u[0]===s.million||u[0]===s.billion||u[0]===s.trillion))&&(l=new RegExp(i+"{2}"),!t.match(/[^\d.,]/g)&&!((a=t.split(r)).length>2)&&(a.length<2?!!a[0].match(/^\d+.*\d$/)&&!a[0].match(l):1===a[0].length?!!a[0].match(/^\d+$/)&&!a[0].match(l)&&!!a[1].match(/^\d+$/):!!a[0].match(/^\d+.*\d$/)&&!a[0].match(l)&&!!a[1].match(/^\d+$/)))},e.fn=s.prototype={clone:function(){return e(this)},format:function(t,n){var i,o,s,l=this._value,c=t||a.defaultFormat;if(n=n||Math.round,0===l&&null!==a.zeroFormat)o=a.zeroFormat;else if(null===l&&null!==a.nullFormat)o=a.nullFormat;else{for(i in r)if(c.match(r[i].regexps.format)){s=r[i].format;break}o=(s=s||e._.numberToFormat)(l,c,n)}return o},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var n=t.correctionFactor.call(null,this._value,e);function r(e,t,r,i){return e+Math.round(n*t)}return this._value=t.reduce([this._value,e],r,0)/n,this},subtract:function(e){var n=t.correctionFactor.call(null,this._value,e);function r(e,t,r,i){return e-Math.round(n*t)}return this._value=t.reduce([e],r,Math.round(this._value*n))/n,this},multiply:function(e){function n(e,n,r,i){var o=t.correctionFactor(e,n);return Math.round(e*o)*Math.round(n*o)/Math.round(o*o)}return this._value=t.reduce([this._value,e],n,1),this},divide:function(e){function n(e,n,r,i){var o=t.correctionFactor(e,n);return Math.round(e*o)/Math.round(n*o)}return this._value=t.reduce([this._value,e],n),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(t,n,r){var i,o=e._.includes(n," BPS")?" ":"";return t*=1e4,n=n.replace(/\s?BPS/,""),i=e._.numberToFormat(t,n,r),e._.includes(i,")")?((i=i.split("")).splice(-1,0,o+"BPS"),i=i.join("")):i=i+o+"BPS",i},unformat:function(t){return+(1e-4*e._.stringToNumber(t)).toFixed(15)}}),function(){var t={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},n={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},r=t.suffixes.concat(n.suffixes.filter((function(e){return t.suffixes.indexOf(e)<0}))).join("|");r="("+r.replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(r)},format:function(r,i,o){var a,s,l,c=e._.includes(i,"ib")?n:t,u=e._.includes(i," b")||e._.includes(i," ib")?" ":"";for(i=i.replace(/\s?i?b/,""),a=0;a<=c.suffixes.length;a++)if(s=Math.pow(c.base,a),l=Math.pow(c.base,a+1),null===r||0===r||r>=s&&r0&&(r/=s);break}return e._.numberToFormat(r,i,o)+u},unformat:function(r){var i,o,a=e._.stringToNumber(r);if(a){for(i=t.suffixes.length-1;i>=0;i--){if(e._.includes(r,t.suffixes[i])){o=Math.pow(t.base,i);break}if(e._.includes(r,n.suffixes[i])){o=Math.pow(n.base,i);break}}a*=o||1}return a}})}(),e.register("format","currency",{regexps:{format:/(\$)/},format:function(t,n,r){var i,o,a=e.locales[e.options.currentLocale],s={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),i=e._.numberToFormat(t,n,r),t>=0?(s.before=s.before.replace(/[\-\(]/,""),s.after=s.after.replace(/[\-\)]/,"")):t<0&&!e._.includes(s.before,"-")&&!e._.includes(s.before,"(")&&(s.before="-"+s.before),o=0;o=0;o--)switch(s.after[o]){case"$":i=o===s.after.length-1?i+a.currency.symbol:e._.insert(i,a.currency.symbol,-(s.after.length-(1+o)));break;case" ":i=o===s.after.length-1?i+" ":e._.insert(i," ",-(s.after.length-(1+o)+a.currency.symbol.length-1))}return i}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(t,n,r){var i=("number"!==typeof t||e._.isNaN(t)?"0e+0":t.toExponential()).split("e");return n=n.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(i[0]),n,r)+"e"+i[1]},unformat:function(t){var n=e._.includes(t,"e+")?t.split("e+"):t.split("e-"),r=Number(n[0]),i=Number(n[1]);function o(t,n,r,i){var o=e._.correctionFactor(t,n);return t*o*(n*o)/(o*o)}return i=e._.includes(t,"e-")?i*=-1:i,e._.reduce([r,Math.pow(10,i)],o,1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(t,n,r){var i=e.locales[e.options.currentLocale],o=e._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),o+=i.ordinal(t),e._.numberToFormat(t,n,r)+o}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(t,n,r){var i,o=e._.includes(n," %")?" ":"";return e.options.scalePercentBy100&&(t*=100),n=n.replace(/\s?\%/,""),i=e._.numberToFormat(t,n,r),e._.includes(i,")")?((i=i.split("")).splice(-1,0,o+"%"),i=i.join("")):i=i+o+"%",i},unformat:function(t){var n=e._.stringToNumber(t);return e.options.scalePercentBy100?.01*n:n}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,t,n){var r=Math.floor(e/60/60),i=Math.floor((e-60*r*60)/60),o=Math.round(e-60*r*60-60*i);return r+":"+(i<10?"0"+i:i)+":"+(o<10?"0"+o:o)},unformat:function(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}}),e},void 0===(i="function"===typeof r?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return T}));var r,i=n(26),o=n(18),a=n(17),s=n(3),l=n(5),c=n(6),u=n(23),f=function(){function e(t,n,r,i,o,a,s,c,u){var f=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10?arguments[10]:void 0;Object(l.a)(this,e),this.p=t,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=c,this.curContext=u,this.lookAhead=f,this.parent=d}return Object(c.a)(e,[{key:"toString",value:function(){return"[".concat(this.stack.filter((function(e,t){return t%3==0})).concat(this.state),"]@").concat(this.pos).concat(this.score?"!"+this.score:"")}},{key:"context",get:function(){return this.curContext?this.curContext.context:null}},{key:"pushState",value:function(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}},{key:"reduce",value:function(e){var t=e>>19,n=65535&e,r=this.p.parser,i=r.dynamicPrecedence(n);if(i&&(this.score+=i),0==t)return no;)this.stack.pop();this.reduceContext(n,a)}},{key:"storeNode",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==e){var o=this,a=this.buffer.length;if(0==a&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&0==o.buffer[a-4]&&o.buffer[a-1]>-1){if(t==n)return;if(o.buffer[a-2]>=t)return void(o.buffer[a-2]=n)}}if(i&&this.pos!=n){var s=this.buffer.length;if(s>0&&0!=this.buffer[s-4])for(;s>0&&this.buffer[s-2]>n;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,r>4&&(r-=4);this.buffer[s]=e,this.buffer[s+1]=t,this.buffer[s+2]=n,this.buffer[s+3]=r}else this.buffer.push(e,t,n,r)}},{key:"shift",value:function(e,t,n){var r=this.pos;if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){var i=e,o=this.p.parser;(n>this.pos||t<=o.maxNode)&&(this.pos=n,o.stateFlag(i,1)||(this.reducePos=n)),this.pushState(i,r),this.shiftContext(t,r),t<=o.maxNode&&this.buffer.push(t,r,n,4)}else this.pos=n,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,n,4)}},{key:"apply",value:function(e,t,n){65536&e?this.reduce(e):this.shift(e,t,n)}},{key:"useNode",value:function(e,t){var n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);var r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}},{key:"split",value:function(){for(var t=this,n=t.buffer.length;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;for(var r=t.buffer.slice(n),i=t.bufferBase+n;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}},{key:"recoverByDelete",value:function(e,t){var n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}},{key:"canShift",value:function(e){for(var t=new h(this);;){var n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==(65536&n))return!0;if(0==n)return!1;t.reduce(n)}}},{key:"recoverByInsert",value:function(e){if(this.stack.length>=300)return[];var t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){for(var n,r=[],i=0;i>19,r=65535&e,i=this.stack.length-3*n;if(i<0||t.getGoto(this.stack[i],r,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reduce(e),!0}},{key:"forceAll",value:function(){for(;!this.p.parser.stateFlag(this.state,2)&&this.forceReduce(););return this}},{key:"deadEnd",get:function(){if(3!=this.stack.length)return!1;var e=this.p.parser;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}},{key:"restart",value:function(){this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(var t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}},{key:"close",value:function(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}],[{key:"start",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new d(i,i.start):null,0,null)}}]),e}(),d=function e(t,n){Object(l.a)(this,e),this.tracker=t,this.context=n,this.hash=t.strict?t.hash(n):0};!function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(r||(r={}));var h=function(){function e(t){Object(l.a)(this,e),this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}return Object(c.a)(e,[{key:"reduce",value:function(e){var t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);var r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}]),e}(),p=function(){function e(t,n,r){Object(l.a)(this,e),this.stack=t,this.pos=n,this.index=r,this.buffer=t.buffer,0==this.index&&this.maybeNext()}return Object(c.a)(e,[{key:"maybeNext",value:function(){var e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}},{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"next",value:function(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}},{key:"fork",value:function(){return new e(this.stack,this.pos,this.index)}}],[{key:"create",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.bufferBase+t.buffer.length;return new e(t,n,n-t.bufferBase)}}]),e}(),v=function e(){Object(l.a)(this,e),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0},m=new v,g=function(){function e(t,n){Object(l.a)(this,e),this.input=t,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=m,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}return Object(c.a)(e,[{key:"resolveOffset",value:function(e,t){for(var n=this.range,r=this.rangeIndex,i=this.pos+e;in.to:i>=n.to;){if(r==this.ranges.length-1)return null;var a=this.ranges[++r];i+=a.from-n.to,n=a}return i}},{key:"peek",value:function(e){var t,n,r=this.chunkOff+e;if(r>=0&&r=this.chunk2Pos&&ta.to&&(this.chunk2=this.chunk2.slice(0,a.to-t)),n=this.chunk2.charCodeAt(0)}}return t>this.token.lookAhead&&(this.token.lookAhead=t),n}},{key:"acceptToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?n.slice(0,this.range.to-this.pos):n,this.chunkPos=this.pos,this.chunkOff=0}}},{key:"readNext",value:function(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}},{key:"advance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>this.token.lookAhead&&(this.token.lookAhead=this.pos),this.readNext()}},{key:"setDone",value:function(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}},{key:"reset",value:function(e,t){if(t?(this.token=t,t.start=t.lookAhead=e,t.value=t.extended=-1):this.token=m,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e