From cbb298ece62b6bef4edf9540b64574013925bf99 Mon Sep 17 00:00:00 2001 From: Patrick Demian Date: Thu, 19 Nov 2020 07:49:42 -0500 Subject: [PATCH 01/11] Nightly build --- Readme.md | 2 +- docs/bundle.min.js | 10 +-- lib/generator.d.ts | 67 +++++++++++++++--- lib/generator.js | 138 +++++++++++++++++++++++++++++++----- lib/parser.js | 25 ++++++- lib/tokens.d.ts | 2 + lib/tokens.js | 26 ++----- lib/utilities.d.ts | 3 + lib/utilities.js | 3 + src/generator.ts | 150 +++++++++++++++++++++++++++++++++++----- src/parser.ts | 33 ++++++++- src/tokens.ts | 23 ++---- src/utilities.ts | 3 + tests/generator.spec.ts | 15 ++++ 14 files changed, 412 insertions(+), 88 deletions(-) diff --git a/Readme.md b/Readme.md index db640f6..884cd7c 100644 --- a/Readme.md +++ b/Readme.md @@ -81,6 +81,6 @@ The API reference is available [here](API.md) ## Todo -- Add more regex options such as back references, subroutines, lookahead/behind, and more character classes (eg, `[:alpha:]`) +- Add more regex options such as back references, subroutines, conditions, and lookahead/behind - Fix error messages (They sometimes point to the wrong location, off by 1 errors, etc) - Use a different/better static site generation method \ No newline at end of file diff --git a/docs/bundle.min.js b/docs/bundle.min.js index ff3b5b8..a76e6a4 100644 --- a/docs/bundle.min.js +++ b/docs/bundle.min.js @@ -1,7 +1,7 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(t,e,n){"use strict";function r(t){return t&&0===t.length}function i(t){return null==t?[]:Object.keys(t)}function o(t){for(var e=[],n=Object.keys(t),r=0;r=this.input.length)throw Error("Unexpected end of input");this.idx++},t.prototype.loc=function(t){return{begin:t,end:this.idx}};var e,n=/[0-9a-fA-F]/,r=/[0-9]/,i=/[1-9]/;function o(t){return t.charCodeAt(0)}function a(t,e){void 0!==t.length?t.forEach((function(t){e.push(t)})):e.push(t)}function s(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e]=!0}function c(t){if(void 0===t)throw Error("Internal Error - Should never get here!")}var l=[];for(e=o("0");e<=o("9");e++)l.push(e);var u=[o("_")].concat(l);for(e=o("a");e<=o("z");e++)u.push(e);for(e=o("A");e<=o("Z");e++)u.push(e);var h=[o(" "),o("\f"),o("\n"),o("\r"),o("\t"),o("\v"),o("\t"),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o("\u2028"),o("\u2029"),o(" "),o(" "),o(" "),o("\ufeff")];function f(){}return f.prototype.visitChildren=function(t){for(var e in t){var n=t[e];t.hasOwnProperty(e)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((function(t){this.visit(t)}),this))}},f.prototype.visit=function(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)},f.prototype.visitPattern=function(t){},f.prototype.visitFlags=function(t){},f.prototype.visitDisjunction=function(t){},f.prototype.visitAlternative=function(t){},f.prototype.visitStartAnchor=function(t){},f.prototype.visitEndAnchor=function(t){},f.prototype.visitWordBoundary=function(t){},f.prototype.visitNonWordBoundary=function(t){},f.prototype.visitLookahead=function(t){},f.prototype.visitNegativeLookahead=function(t){},f.prototype.visitCharacter=function(t){},f.prototype.visitSet=function(t){},f.prototype.visitGroup=function(t){},f.prototype.visitGroupBackReference=function(t){},f.prototype.visitQuantifier=function(t){},{RegExpParser:t,BaseRegExpVisitor:f,VERSION:"0.5.0"}})?r.apply(e,i):r)||(t.exports=o)},function(t,e,n){"use strict"; -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */Object.defineProperty(e,"__esModule",{value:!0}),e.CommonError=e.append=e.regexEscape=e.removeQuotes=e.findLastIndex=e.last=e.first=e.isSingleRegexCharacter=e.combineFlags=e.hasFlag=e.makeFlag=e.usefulConditional=e.unusedParameter=void 0,e.unusedParameter=function(t,e){},e.usefulConditional=function(t,e){return Boolean(t)},e.makeFlag=function(t){return 1<=0;n--)if(t[n]===e)return n;return-1},e.removeQuotes=function(t){return t.substring(1,t.length-1)},e.regexEscape=function(t){return t.replace(/([:\\\-\.\[\]\^\|\(\)\*\+\?\{\}\$\/])/g,"\\$1")},e.append=function(t,...e){for(const n of e)for(const e of n)t.push(e)};class r{constructor(t,e,n,r,i){this.type=t,this.start_line=e,this.start_column=n,this.length=r,this.message=i}static fromLexError(t){const e=t.message.replace(/(--?>|<--?)/g,"");return new r("Lexer Error",t.line,t.column,t.length,e)}static fromParseError(t){var e,n,i;const o=t.name+" - "+t.message.replace(/(--?>|<--?)/g,"");return new r("Parser Error",null!==(e=t.token.startLine)&&void 0!==e?e:NaN,null!==(n=t.token.startColumn)&&void 0!==n?n:NaN,null!==(i=t.token.endOffset)&&void 0!==i?i:NaN-t.token.startOffset,o)}static fromSemanticError(t){return new r("Semantic Error",t.startLine,t.startColumn,t.length,t.message)}toString(){return`${this.type} @ (${this.start_line}, ${this.start_column}): ${this.message}`}}e.CommonError=r},function(t,e,n){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),c=!o&&/WebKit\//.test(t),l=c&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),h=/Opera\//.test(t),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),d=/PhantomJS/.test(t),m=!o&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),g=/Android/.test(t),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=m||/Mac/.test(e),b=/\bCrOS\b/.test(t),T=/win/i.test(e),O=h&&t.match(/Version\/(\d*\.\d*)/);O&&(O=Number(O[1])),O&&O>=15&&(h=!1,c=!0);var S=y&&(l||h&&(null==O||O<12.11)),x=n||a&&s>=9;function E(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var C,k=function(t,e){var n=t.className,r=E(e).exec(n);if(r){var i=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function w(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function N(t,e){return w(t).appendChild(e)}function L(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}}m?P=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(P=function(t){try{t.select()}catch(t){}});var U=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function W(t,e){for(var n=0;n=e)return r+Math.min(a,e-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=e)return r}}var K=[""];function Y(t){for(;K.length<=t;)K.push(X(K)+" ");return K[t]}function X(t){return t[t.length-1]}function $(t,e){for(var n=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||Q.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&J(t))||e.test(t):J(t)}function et(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var nt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function rt(t){return t.charCodeAt(0)>=768&&nt.test(t)}function it(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var i=(e+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+r}}var at=null;function st(t,e,n){var r;at=null;for(var i=0;ie)return i;o.to==e&&(o.from!=o.to&&"before"==n?r=i:at=i),o.from==e&&(o.from!=o.to&&"before"!=n?r=i:at=i)}return null!=r?r:at}var ct=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(t,e,n){this.level=t,this.from=e,this.to=n}return function(a,s){var c="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!t.test(a))return!1;for(var l,u=a.length,h=[],f=0;f-1&&(r[e]=i.slice(0,o).concat(i.slice(o+1)))}}}function dt(t,e){var n=ft(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){pt(this,t,e)}}function bt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Tt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ot(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function St(t){bt(t),Tt(t)}function xt(t){return t.target||t.srcElement}function Et(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var Ct,kt,wt=function(){if(a&&s<9)return!1;var t=L("div");return"draggable"in t||"dragDrop"in t}();function Nt(t){if(null==Ct){var e=L("span","​");N(t,L("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Ct=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var n=Ct?L("span","​"):L("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Lt(t){if(null!=kt)return kt;var e=N(t,document.createTextNode("AخA")),n=C(e,0,1).getBoundingClientRect(),r=C(e,1,2).getBoundingClientRect();return w(t),!(!n||n.left==n.right)&&(kt=r.right-n.right<3)}var At,It=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var o=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=i+1)}return n}:function(t){return t.split(/\r\n?|\n/)},Rt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Mt="oncopy"in(At=L("div"))||(At.setAttribute("oncopy","return;"),"function"==typeof At.oncopy),_t=null,Pt={},jt={};function Dt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Pt[t]=e}function Ft(t){if("string"==typeof t&&jt.hasOwnProperty(t))t=jt[t];else if(t&&"string"==typeof t.name&&jt.hasOwnProperty(t.name)){var e=jt[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ft("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ft("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ut(t,e){e=Ft(e);var n=Pt[e.name];if(!n)return Ut(t,"text/plain");var r=n(t,e);if(Wt.hasOwnProperty(e.name)){var i=Wt[e.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)r[a]=e.modeProps[a];return r}var Wt={};function Bt(t,e){D(e,Wt.hasOwnProperty(t)?Wt[t]:Wt[t]={})}function Ht(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Gt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function zt(t,e,n){return!t.startState||t.startState(e,n)}var Vt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Kt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e=t.first&&en?te(n,Kt(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?te(t.line,e):n<0?te(t.line,0):t}(e,Kt(t,e.line).text.length)}function ce(t,e){for(var n=[],r=0;r=this.string.length},Vt.prototype.sol=function(){return this.pos==this.lineStart},Vt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vt.prototype.next=function(){if(this.pose},Vt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Vt.prototype.skipToEnd=function(){this.pos=this.string.length},Vt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Vt.prototype.backUp=function(t){this.pos-=t},Vt.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var i=function(t){return n?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},Vt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Vt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Vt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var le=function(t,e){this.state=t,this.lookAhead=e},ue=function(t,e,n,r){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function he(t,e,n,r){var i=[t.state.modeGen],o={};Te(t,e.text,t.doc.mode,n,(function(t,e){return i.push(t,e)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=t.state.overlays[r],c=1,l=0;n.state=!0,Te(t,e.text,s.mode,n,(function(t,e){for(var n=c;lt&&i.splice(c,1,t,i[c+1],r),c+=2,l=Math.min(t,r)}if(e)if(s.opaque)i.splice(n,c-n,t,"overlay "+e),c=n+2;else for(;nt.options.maxHighlightLength&&Ht(t.doc.mode,r.state),o=he(t,e,r);i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function pe(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return new ue(r,!0,e);var o=function(t,e,n){for(var r,i,o=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=o.first)return o.first;var c=Kt(o,s-1),l=c.stateAfter;if(l&&(!n||s+(l instanceof le?l.lookAhead:0)<=o.modeFrontier))return s;var u=F(c.text,null,t.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(t,e,n),a=o>r.first&&Kt(r,o-1).stateAfter,s=a?ue.fromSaved(r,a,o):new ue(r,zt(r.mode),o);return r.iter(o,e,(function(n){de(t,n.text,s);var r=s.line;n.stateAfter=r==e-1||r%5==0||r>=i.viewFrom&&re.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}ue.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ue.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(t,e,n){return e instanceof le?new ue(t,Ht(t.mode,e.state),n,e.lookAhead):new ue(t,Ht(t.mode,e),n)},ue.prototype.save=function(t){var e=!1!==t?Ht(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new le(e,this.maxLookAhead):e};var ve=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function ye(t,e,n,r){var i,o,a=t.doc,s=a.mode,c=Kt(a,(e=se(a,e)).line),l=pe(t,e.line,n),u=new Vt(c.text,t.options.tabSize,l);for(r&&(o=[]);(r||u.post.options.maxHighlightLength?(s=!1,a&&de(t,e,r,h.pos),h.pos=e.length,c=null):c=be(ge(n,h,r.state,f),o),f){var p=f[0].name;p&&(c="m-"+(c?p+" "+c:p))}if(!s||u!=c){for(;l=e:o.to>e);(r||(r=[])).push(new xe(a,o.from,s?null:o.to))}}return r}(n,i,a),c=function(t,e,n){var r;if(t)for(var i=0;i=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from0&&s)for(var b=0;be)&&(!n||Re(n,o.marker)<0)&&(n=o.marker)}return n}function De(t,e,n,r,i){var o=Kt(t,e),a=Se&&o.markedSpans;if(a)for(var s=0;s=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?ee(l.to,n)>=0:ee(l.to,n)>0)||u>=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?ee(l.from,r)<=0:ee(l.from,r)<0)))return!0}}}function Fe(t){for(var e;e=_e(t);)t=e.find(-1,!0).line;return t}function Ue(t,e){var n=Kt(t,e),r=Fe(n);return n==r?e:qt(r)}function We(t,e){if(e>t.lastLine())return e;var n,r=Kt(t,e);if(!Be(t,r))return e;for(;n=Pe(r);)r=n.find(1,!0).line;return qt(r)+1}function Be(t,e){var n=Se&&e.markedSpans;if(n)for(var r=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var Ke=function(t,e,n){this.text=t,Le(this,e),this.height=n?n(this):1};function Ye(t){t.parent=null,Ne(t)}Ke.prototype.lineNo=function(){return qt(this)},yt(Ke);var Xe={},$e={};function qe(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?$e:Xe;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var n=A("span",null,null,c?"padding-right: .1px":null),r={pre:A("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var o=i?e.rest[i-1]:e.line,a=void 0;r.pos=0,r.addToken=Je,Lt(t.display.measure)&&(a=lt(o,t.doc.direction))&&(r.addToken=tn(r.addToken,a)),r.map=[],nn(o,r,fe(t,o,e!=t.display.externalMeasured&&qt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=_(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=_(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Nt(t.display.measure))),0==i?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(c){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return dt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=_(r.pre.className,r.textClass||"")),r}function Qe(t){var e=L("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Je(t,e,n,r,i,o,c){if(e){var l,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",i=0;il&&h.from<=l);f++);if(h.to>=u)return t(n,r,i,o,a,s,c);t(n,r.slice(0,h.to-l),i,o,null,s,c),o=null,r=r.slice(h.to-l),l=h.to}}}function en(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function nn(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var a,s,c,l,u,h,f,p=i.length,d=0,m=1,g="",v=0;;){if(v==d){c=l=u=s="",f=null,h=null,v=1/0;for(var y=[],b=void 0,T=0;Td||S.collapsed&&O.to==d&&O.from==d)){if(null!=O.to&&O.to!=d&&v>O.to&&(v=O.to,l=""),S.className&&(c+=" "+S.className),S.css&&(s=(s?s+";":"")+S.css),S.startStyle&&O.from==d&&(u+=" "+S.startStyle),S.endStyle&&O.to==v&&(b||(b=[])).push(S.endStyle,O.to),S.title&&((f||(f={})).title=S.title),S.attributes)for(var x in S.attributes)(f||(f={}))[x]=S.attributes[x];S.collapsed&&(!h||Re(h.marker,S)<0)&&(h=O)}else O.from>d&&v>O.from&&(v=O.from)}if(b)for(var E=0;E=p)break;for(var k=Math.min(p,v);;){if(g){var w=d+g.length;if(!h){var N=w>k?g.slice(0,k-d):g;e.addToken(e,N,a?a+c:c,u,d+N.length==v?l:"",s,f)}if(w>=k){g=g.slice(k-d),d=k;break}d=w,u=""}g=i.slice(o,o=n[m++]),a=qe(n[m++],e.cm.options)}}else for(var L=1;Ln)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function An(t,e,n,r){return Mn(t,Rn(t,e),n,r)}function In(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&e2&&o.push((c.bottom+l.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,r){var i,o=jn(e.map,n,r),c=o.node,l=o.start,u=o.end,h=o.collapse;if(3==c.nodeType){for(var f=0;f<4;f++){for(;l&&rt(e.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+u1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,i))}else{var p;l>0&&(h=r="right"),i=t.options.lineWrapping&&(p=c.getClientRects()).length>1?p["right"==r?p.length-1:0]:c.getBoundingClientRect()}if(a&&s<9&&!l&&(!i||!i.left&&!i.right)){var d=c.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+ir(t.display),top:d.top,bottom:d.bottom}:Pn}for(var m=i.top-e.rect.top,g=i.bottom-e.rect.top,v=(m+g)/2,y=e.view.measure.heights,b=0;be)&&(i=(o=c-s)-1,e>=c&&(a="right")),null!=i){if(r=t[l+2],s==c&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;l&&t[l-2]==t[l-3]&&t[l-1].insertLeft;)r=t[2+(l-=3)],a="left";if("right"==n&&i==c-s)for(;l=0&&(n=t[i]).left==n.right;i--);return n}function Fn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=r.text.length?(c=r.text.length,l="before"):c<=0&&(c=0,l="after"),!s)return a("before"==l?c-1:c,"before"==l);function u(t,e,n){return a(n?t-1:t,1==s[e].level!=n)}var h=st(s,c,l),f=at,p=u(c,h,"before"==l);return null!=f&&(p.other=u(c,f,"before"!=l)),p}function Xn(t,e){var n=0;e=se(t.doc,e),t.options.lineWrapping||(n=ir(t.display)*e.ch);var r=Kt(t.doc,e.line),i=Ge(r)+xn(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function $n(t,e,n,r,i){var o=te(t,e,n);return o.xRel=i,r&&(o.outside=r),o}function qn(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return $n(r.first,0,null,-1,-1);var i=Zt(r,n),o=r.first+r.size-1;if(i>o)return $n(r.first+r.size-1,Kt(r,o).text.length,null,1,1);e<0&&(e=0);for(var a=Kt(r,i);;){var s=tr(t,a,i,e,n),c=je(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!c)return s;var l=c.find(1);if(l.line==i)return l;a=Kt(r,i=l.line)}}function Zn(t,e,n,r){r-=Gn(e);var i=e.text.length,o=ot((function(e){return Mn(t,n,e-1).bottom<=r}),i,0);return{begin:o,end:i=ot((function(e){return Mn(t,n,e).top>r}),o,i)}}function Qn(t,e,n,r){return n||(n=Rn(t,e)),Zn(t,e,n,zn(t,e,Mn(t,n,r),"line").top)}function Jn(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function tr(t,e,n,r,i){i-=Ge(e);var o=Rn(t,e),a=Gn(e),s=0,c=e.text.length,l=!0,u=lt(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?nr:er)(t,e,n,o,u,r,i);s=(l=1!=h.level)?h.from:h.to-1,c=l?h.to:h.from-1}var f,p,d=null,m=null,g=ot((function(e){var n=Mn(t,o,e);return n.top+=a,n.bottom+=a,!!Jn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(d=e,m=n),!0)}),s,c),v=!1;if(m){var y=r-m.left=T.bottom?1:0}return $n(n,g=it(e.text,g,1),p,v,r-f)}function er(t,e,n,r,i,o,a){var s=ot((function(s){var c=i[s],l=1!=c.level;return Jn(Yn(t,te(n,l?c.to:c.from,l?"before":"after"),"line",e,r),o,a,!0)}),0,i.length-1),c=i[s];if(s>0){var l=1!=c.level,u=Yn(t,te(n,l?c.from:c.to,l?"after":"before"),"line",e,r);Jn(u,o,a,!0)&&u.top>a&&(c=i[s-1])}return c}function nr(t,e,n,r,i,o,a){var s=Zn(t,e,r,a),c=s.begin,l=s.end;/\s/.test(e.text.charAt(l-1))&&l--;for(var u=null,h=null,f=0;f=l||p.to<=c)){var d=Mn(t,r,1!=p.level?Math.min(l,p.to)-1:Math.max(c,p.from)).right,m=dm)&&(u=p,h=m)}}return u||(u=i[i.length-1]),u.froml&&(u={from:u.from,to:l,level:u.level}),u}function rr(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==_n){_n=L("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)_n.appendChild(document.createTextNode("x")),_n.appendChild(L("br"));_n.appendChild(document.createTextNode("x"))}N(t.measure,_n);var n=_n.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),w(t.measure),n||1}function ir(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=L("span","xxxxxxxxxx"),n=L("pre",[e],"CodeMirror-line-like");N(t.measure,n);var r=e.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function or(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ar(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function ar(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function sr(t){var e=rr(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/ir(t.display)-3);return function(i){if(Be(t.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(c=Kt(t.doc,l.line).text).length==l.ch){var u=F(c,c.length,t.options.tabSize)-c.length;l=te(l.line,Math.max(0,Math.round((o-Cn(t.display).left)/ir(t.display))-u))}return l}function ur(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;re)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Se&&Ue(t.doc,e)i.viewFrom?pr(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)pr(t);else if(e<=i.viewFrom){var o=dr(t,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):pr(t)}else if(n>=i.viewTo){var a=dr(t,e,e,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):pr(t)}else{var s=dr(t,e,e,-1),c=dr(t,n,n+r,1);s&&c?(i.view=i.view.slice(0,s.index).concat(on(t,s.lineN,c.lineN)).concat(i.view.slice(c.index)),i.viewTo+=r):pr(t)}var l=i.externalMeasured;l&&(n=i.lineN&&e=r.viewTo)){var o=r.view[ur(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==W(a,n)&&a.push(n)}}}function pr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function dr(t,e,n,r){var i,o=ur(t,e),a=t.display.view;if(!Se||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=t.display.viewFrom,c=0;c0){if(o==a.length-1)return null;i=s+a[o].size-e,o++}else i=s-e;e+=i,n+=i}for(;Ue(t.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function mr(t){for(var e=t.display.view,n=0,r=0;r=t.display.viewTo||s.to().linee||e==n&&a.to==e)&&(r(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(e,n,"ltr")}(m,n||0,null==r?f:r,(function(t,e,i,h){var g="ltr"==i,v=p(t,g?"left":"right"),y=p(e-1,g?"right":"left"),b=null==n&&0==t,T=null==r&&e==f,O=0==h,S=!m||h==m.length-1;if(y.top-v.top<=3){var x=(l?T:b)&&S,E=(l?b:T)&&O?s:(g?v:y).left,C=x?c:(g?y:v).right;u(E,v.top,C-E,v.bottom)}else{var k,w,N,L;g?(k=l&&b&&O?s:v.left,w=l?c:d(t,i,"before"),N=l?s:d(e,i,"after"),L=l&&T&&S?c:y.right):(k=l?d(t,i,"before"):s,w=!l&&b&&O?c:v.right,N=!l&&T&&S?s:y.left,L=l?d(e,i,"after"):c),u(k,v.top,w-k,v.bottom),v.bottom0?e.blinker=setInterval((function(){t.hasFocus()||Cr(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Sr(t){t.state.focused||(t.display.input.focus(),Er(t))}function xr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Cr(t))}),100)}function Er(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(dt(t,"focus",t,e),t.state.focused=!0,M(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),c&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Or(t))}function Cr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(dt(t,"blur",t,e),t.state.focused=!1,k(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function kr(t){for(var e=t.display,n=e.lineDiv.offsetTop,r=0;r.005||f<-.005)&&($t(i.line,c),wr(i.line),i.rest))for(var p=0;pt.display.sizerWidth){var d=Math.ceil(l/ir(t.display));d>t.display.maxLineLength&&(t.display.maxLineLength=d,t.display.maxLine=i.line,t.display.maxLineChanged=!0)}}}}function wr(t){if(t.widgets)for(var e=0;e=a&&(o=Zt(e,Ge(Kt(e,c))-t.wrapper.clientHeight),a=c)}return{from:o,to:Math.max(a,o+1)}}function Lr(t,e){var n=t.display,r=rr(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Nn(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var s=t.doc.height+En(n),c=e.tops-r;if(e.topi+o){var u=Math.min(e.top,(l?s:e.bottom)-o);u!=i&&(a.scrollTop=u)}var h=t.options.fixedGutter?0:n.gutters.offsetWidth,f=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-h,p=wn(t)-n.gutters.offsetWidth,d=e.right-e.left>p;return d&&(e.right=e.left+p),e.left<10?a.scrollLeft=0:e.leftp+f-3&&(a.scrollLeft=e.right+(d?0:10)-p),a}function Ar(t,e){null!=e&&(Mr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Ir(t){Mr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Rr(t,e,n){null==e&&null==n||Mr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Mr(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,_r(t,Xn(t,e.from),Xn(t,e.to),e.margin))}function _r(t,e,n,r){var i=Lr(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});Rr(t,i.scrollLeft,i.scrollTop)}function Pr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||ci(t,{top:e}),jr(t,e,!0),n&&ci(t),ri(t,100))}function jr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Dr(t,e,n,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,hi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Fr(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+En(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+kn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var Ur=function(t,e,n){this.cm=n;var r=this.vert=L("div",[L("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=L("div",[L("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),ht(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),ht(i,"scroll",(function(){i.clientWidth&&e(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ur.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var i=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},Ur.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ur.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ur.prototype.zeroWidthHack=function(){var t=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new U,this.disableVert=new U},Ur.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,(function r(){var i=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)}))},Ur.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Wr=function(){};function Br(t,e){e||(e=Fr(t));var n=t.display.barWidth,r=t.display.barHeight;Hr(t,e);for(var i=0;i<4&&n!=t.display.barWidth||r!=t.display.barHeight;i++)n!=t.display.barWidth&&t.options.lineWrapping&&kr(t),Hr(t,Fr(t)),n=t.display.barWidth,r=t.display.barHeight}function Hr(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Wr.prototype.update=function(){return{bottom:0,right:0}},Wr.prototype.setScrollLeft=function(){},Wr.prototype.setScrollTop=function(){},Wr.prototype.clear=function(){};var Gr={native:Ur,null:Wr};function zr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&k(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Gr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?Dr(t,e):Pr(t,e)}),t),t.display.scrollbars.addClass&&M(t.display.wrapper,t.display.scrollbars.addClass)}var Vr=0;function Kr(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vr},e=t.curOp,an?an.ops.push(e):e.ownsGroup=an={ops:[e],delayedCallbacks:[]}}function Yr(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new oi(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function $r(t){t.updatedDisplay=t.mustUpdate&&ai(t.cm,t.update)}function qr(t){var e=t.cm,n=e.display;t.updatedDisplay&&kr(e),t.barMeasure=Fr(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=An(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+kn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-wn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Zr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!d){var o=L("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-xn(t.display))+"px;\n height: "+(e.bottom-e.top+kn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(i),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,n,r){var i;null==r&&(r=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?te(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?te(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,s=Yn(t,e),c=n&&n!=e?Yn(t,n):s,l=Lr(t,i={left:Math.min(s.left,c.left),top:Math.min(s.top,c.top)-r,right:Math.max(s.left,c.left),bottom:Math.max(s.bottom,c.bottom)+r}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=l.scrollTop&&(Pr(t,l.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(a=!0)),null!=l.scrollLeft&&(Dr(t,l.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(a=!0)),!a)break}return i}(e,se(r,t.scrollToPos.from),se(r,t.scrollToPos.to),t.scrollToPos.margin));var i=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(i)for(var a=0;a=t.display.viewTo)){var n=+new Date+t.options.workTime,r=pe(t,e.highlightFrontier),i=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(r.line>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength?Ht(e.mode,r.state):null,c=he(t,o,r,!0);s&&(r.state=s),o.styles=c.styles;var l=o.styleClasses,u=c.classes;u?o.styleClasses=u:l&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),f=0;!h&&fn)return ri(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),i.length&&Jr(t,(function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(t))return!1;fi(t)&&(pr(t),e.dims=or(t));var i=r.first+r.size,o=Math.max(e.visible.from-t.options.viewportMargin,r.first),a=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Se&&(o=Ue(t.doc,o),a=We(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=on(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=on(t,e,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,ur(t,n)))),r.viewTo=n}(t,o,a),n.viewOffset=Ge(Kt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var l=mr(t);if(!s&&0==l&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=R();if(!e||!I(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&I(t.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(t);return l>4&&(n.lineDiv.style.display="none"),function(t,e,n){var r=t.display,i=t.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(e){var n=e.nextSibling;return c&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var l=r.view,u=r.viewFrom,h=0;h-1&&(p=!1),un(t,f,u,n)),p&&(w(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Jt(t.options,u)))),a=f.node.nextSibling}else{var d=vn(t,f,u,n);o.insertBefore(d,a)}u+=f.size}for(;a;)a=s(a)}(t,n.updateLineNumbers,e.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=R()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&I(document.body,t.anchorNode)&&I(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),w(n.cursorDiv),w(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,ri(t,400)),n.updateLineNumbers=null,!0}function si(t,e){for(var n=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=wn(t))r&&(e.visible=Nr(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+En(t.display)-Nn(t),n.top)}),e.visible=Nr(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!ai(t,e))break;kr(t);var i=Fr(t);gr(t),Br(t,i),ui(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function ci(t,e){var n=new oi(t,e);if(ai(t,n)){kr(t),si(t,n);var r=Fr(t);gr(t),Br(t,r),ui(t,r),n.finish()}}function li(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function ui(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+kn(t)+"px"}function hi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=ar(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&l||o&&u){if(o&&y&&c)t:for(var f=e.target,p=a.view;f!=s;f=f.parentNode)for(var d=0;d=0&&ee(t,r.to())<=0)return n}return-1};var xi=function(t,e){this.anchor=t,this.head=e};function Ei(t,e,n){var r=t&&t.options.selectionsMayTouch,i=e[n];e.sort((function(t,e){return ee(t.from(),e.from())})),n=W(e,i);for(var o=1;o0:c>=0){var l=oe(s.from(),a.from()),u=ie(s.to(),a.to()),h=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,e.splice(--o,2,new xi(h?u:l,h?l:u))}}return new Si(e,n)}function Ci(t,e){return new Si([new xi(t,e||t)],0)}function ki(t){return t.text?te(t.from.line+t.text.length-1,X(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function wi(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return ki(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=ki(e).ch-e.to.ch),te(n,r)}function Ni(t,e){for(var n=[],r=0;r1&&t.remove(s.line+1,d-1),t.insert(s.line+1,v)}cn(t,"change",t,e)}function _i(t,e,n){!function t(r,i,o){if(r.linked)for(var a=0;as-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(Ui(t.done),X(t.done)):t.done.length&&!X(t.done).ranges?X(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),X(t.done)):void 0}(i,i.lastOp==r)))a=X(o.changes),0==ee(e.from,e.to)&&0==ee(e.from,a.to)?a.to=ki(e):o.changes.push(Fi(t,e));else{var c=X(i.done);for(c&&c.ranges||Hi(t.sel,i.done),o={changes:[Fi(t,e)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,a||dt(t,"historyAdded")}function Bi(t,e,n,r){var i=t.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(t,e,n,r){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,X(i.done),e))?i.done[i.done.length-1]=e:Hi(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Ui(i.undone)}function Hi(t,e){var n=X(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Gi(t,e,n,r){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),(function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=n.markedSpans),++o}))}function zi(t){if(!t)return null;for(var e,n=0;n-1&&(X(s)[h]=l[h],delete l[h])}}}return r}function Yi(t,e,n,r){if(r){var i=t.anchor;if(n){var o=ee(e,i)<0;o!=ee(n,i)<0?(i=e,e=n):o!=ee(e,n)<0&&(e=n)}return new xi(i,e)}return new xi(n||e,e)}function Xi(t,e,n,r,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),Ji(t,new Si([Yi(t.sel.primary(),e,n,i)],0),r)}function $i(t,e,n){for(var r=[],i=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:s.to>e.ch))){if(i&&(dt(c,"beforeCursorEnter"),c.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!c.atomic)continue;if(n){var h=c.find(r<0?1:-1),f=void 0;if((r<0?u:l)&&(h=ao(t,h,-r,h&&h.line==e.line?o:null)),h&&h.line==e.line&&(f=ee(h,n))&&(r<0?f<0:f>0))return io(t,h,e,r,i)}var p=c.find(r<0?-1:1);return(r<0?l:u)&&(p=ao(t,p,r,p.line==e.line?o:null)),p?io(t,p,e,r,i):null}}return e}function oo(t,e,n,r,i){var o=r||1,a=io(t,e,n,o,i)||!i&&io(t,e,n,o,!0)||io(t,e,n,-o,i)||!i&&io(t,e,n,-o,!0);return a||(t.cantEdit=!0,te(t.first,0))}function ao(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?se(t,te(e.line-1)):null:n>0&&e.ch==(r||Kt(t,e.line)).text.length?e.line0)){var u=[c,1],h=ee(l.from,s.from),f=ee(l.to,s.to);(h<0||!a.inclusiveLeft&&!h)&&u.push({from:l.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:s.to,to:l.to}),i.splice.apply(i,u),c+=u.length-3}}return i}(t,e.from,e.to);if(r)for(var i=r.length-1;i>=0;--i)uo(t,{from:r[i].from,to:r[i].to,text:i?[""]:e.text,origin:e.origin});else uo(t,e)}}function uo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var n=Ni(t,e);Wi(t,e,n,t.cm?t.cm.curOp.id:NaN),po(t,e,n,ke(t,e));var r=[];_i(t,(function(t,n){n||-1!=W(r,t.history)||(yo(t.history,e),r.push(t.history)),po(t,e,null,ke(t,e))}))}}function ho(t,e,n){var r=t.cm&&t.cm.state.suppressEdits;if(!r||n){for(var i,o=t.history,a=t.sel,s="undo"==e?o.done:o.undone,c="undo"==e?o.undone:o.done,l=0;l=0;--p){var d=f(p);if(d)return d.v}}}}function fo(t,e){if(0!=e&&(t.first+=e,t.sel=new Si($(t.sel.ranges,(function(t){return new xi(te(t.anchor.line+e,t.anchor.ch),te(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){hr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;rt.lastLine())){if(e.from.lineo&&(e={from:e.from,to:te(o,Kt(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Yt(t,e.from,e.to),n||(n=Ni(t,e)),t.cm?function(t,e,n){var r=t.doc,i=t.display,o=e.from,a=e.to,s=!1,c=o.line;t.options.lineWrapping||(c=qt(Fe(Kt(r,o.line))),r.iter(c,a.line+1,(function(t){if(t==i.maxLine)return s=!0,!0}))),r.sel.contains(e.from,e.to)>-1&>(t),Mi(r,e,n,sr(t)),t.options.lineWrapping||(r.iter(c,o.line+e.text.length,(function(t){var e=ze(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)})),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;r--){var i=Kt(t,r).stateAfter;if(i&&(!(i instanceof le)||r+i.lookAhead1||!(this.children[0]instanceof To))){var s=[];this.collapse(s),this.children=[new To(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var a=i.lines.length%25+25,s=a;s10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(De(t,e.line,e,n,o)||e.line!=n.line&&De(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Se=!0}o.addToHistory&&Wi(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,c=e.line,l=t.cm;if(t.iter(c,n.line+1,(function(t){l&&o.collapsed&&!l.options.lineWrapping&&Fe(t)==l.display.maxLine&&(s=!0),o.collapsed&&c!=e.line&&$t(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new xe(o,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c})),o.collapsed&&t.iter(e.line,n.line+1,(function(e){Be(t,e)&&$t(e,0)})),o.clearOnEnter&&ht(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Oe=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++Eo,o.atomic=!0),l){if(s&&(l.curOp.updateMaxLine=!0),o.collapsed)hr(l,e.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=e.line;u<=n.line;u++)fr(l,u,"text");o.atomic&&no(l.doc),cn(l,"markerAdded",l,o)}return o}Co.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Kr(t),vt(this,"clear")){var n=this.find();n&&cn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=l,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&hr(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&no(t.doc)),t&&cn(t,"markerCleared",t,this,r,i),e&&Yr(t),this.parent&&this.parent.clear()}},Co.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i=0;c--)lo(this,r[c]);s?Qi(this,s):this.cm&&Ir(this.cm)})),undo:ni((function(){ho(this,"undo")})),redo:ni((function(){ho(this,"redo")})),undoSelection:ni((function(){ho(this,"undo",!0)})),redoSelection:ni((function(){ho(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,n){t=se(this,t),e=se(this,e);var r=[],i=t.line;return this.iter(t.line,e.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=c.to||null==c.from&&i!=t.line||null!=c.from&&i==e.line&&c.from>=e.ch||n&&!n(c.marker)||r.push(c.marker.parent||c.marker)}++i})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var r=0;rt)return e=t,!0;t-=o,++n})),se(this,te(n,e))},indexFromPos:function(t){var e=(t=se(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var f;if(e.state.draggingText&&!e.state.draggingText.copy&&(f=e.listSelections()),to(e.doc,Ci(n,n)),f)for(var p=0;p=0;e--)mo(t.doc,"",r[e].from,r[e].to,"+delete");Ir(t)}))}function Qo(t,e,n){var r=it(t.text,e+n,n);return r<0||r>t.text.length?null:r}function Jo(t,e,n){var r=Qo(t,e.ch,n);return null==r?null:new te(e.line,r,n<0?"after":"before")}function ta(t,e,n,r,i){if(t){"rtl"==e.doc.direction&&(i=-i);var o=lt(n,e.doc.direction);if(o){var a,s=i<0?X(o):o[0],c=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var l=Rn(e,n);a=i<0?n.text.length-1:0;var u=Mn(e,l,a).top;a=ot((function(t){return Mn(e,l,t).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==c&&(a=Qo(n,a,1))}else a=i<0?s.to:s.from;return new te(r,a,c)}}return new te(r,i<0?n.text.length:0,i<0?"before":"after")}Go.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Go.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Go.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Go.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Go.default=y?Go.macDefault:Go.pcDefault;var ea={selectAll:so,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),H)},killLine:function(t){return Zo(t,(function(e){if(e.empty()){var n=Kt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)i=new te(i.line,i.ch+1),t.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),te(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var a=Kt(t.doc,i.line-1).text;a&&(i=new te(i.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),te(i.line-1,a.length-1),i,"+transpose"))}n.push(new xi(i,i))}t.setSelections(n)}))},newlineAndIndent:function(t){return Jr(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;r-1&&(ee((i=l.ranges[i]).from(),e)<0||e.xRel>0)&&(ee(i.to(),e)>0||e.xRel<0)?function(t,e,n,r){var i=t.display,o=!1,l=ti(t,(function(e){c&&(i.scroller.draggable=!1),t.state.draggingText=!1,pt(i.wrapper.ownerDocument,"mouseup",l),pt(i.wrapper.ownerDocument,"mousemove",u),pt(i.scroller,"dragstart",h),pt(i.scroller,"drop",l),o||(bt(e),r.addNew||Xi(t.doc,n,null,null,r.extend),c&&!f||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return o=!0};c&&(i.scroller.draggable=!0),t.state.draggingText=l,l.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ht(i.wrapper.ownerDocument,"mouseup",l),ht(i.wrapper.ownerDocument,"mousemove",u),ht(i.scroller,"dragstart",h),ht(i.scroller,"drop",l),xr(t),setTimeout((function(){return i.input.focus()}),20)}(t,r,e,o):function(t,e,n,r){var i=t.display,o=t.doc;bt(e);var a,s,c=o.sel,l=c.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?l[s]:new xi(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new xi(n,n)),n=lr(t,e,!0,!0),s=-1;else{var u=va(t,n,r.unit);a=r.extend?Yi(a,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=l.length,Ji(o,Ei(t,l.concat([a]),s),{scroll:!1,origin:"*mouse"})):l.length>1&&l[s].empty()&&"char"==r.unit&&!r.extend?(Ji(o,Ei(t,l.slice(0,s).concat(l.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):qi(o,s,a,G):(s=0,Ji(o,new Si([a],0),G),c=o.sel);var h=n;function f(e){if(0!=ee(h,e))if(h=e,"rectangle"==r.unit){for(var i=[],l=t.options.tabSize,u=F(Kt(o,n.line).text,n.ch,l),f=F(Kt(o,e.line).text,e.ch,l),p=Math.min(u,f),d=Math.max(u,f),m=Math.min(n.line,e.line),g=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=g;m++){var v=Kt(o,m).text,y=V(v,p,l);p==d?i.push(new xi(te(m,y),te(m,y))):v.length>y&&i.push(new xi(te(m,y),te(m,V(v,d,l))))}i.length||i.push(new xi(n,n)),Ji(o,Ei(t,c.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,T=a,O=va(t,e,r.unit),S=T.anchor;ee(O.anchor,S)>0?(b=O.head,S=oe(T.from(),O.anchor)):(b=O.anchor,S=ie(T.to(),O.head));var x=c.ranges.slice(0);x[s]=function(t,e){var n=e.anchor,r=e.head,i=Kt(t.doc,n.line);if(0==ee(n,r)&&n.sticky==r.sticky)return e;var o=lt(i);if(!o)return e;var a=st(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var c,l=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==l||l==o.length)return e;if(r.line!=n.line)c=(r.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=st(o,r.ch,r.sticky),h=u-a||(r.ch-n.ch)*(1==s.level?-1:1);c=u==l-1||u==l?h<0:h>0}var f=o[l+(c?-1:0)],p=c==(1==f.level),d=p?f.from:f.to,m=p?"after":"before";return n.ch==d&&n.sticky==m?e:new xi(new te(n.line,d,m),r)}(t,new xi(se(o,S),b)),Ji(o,Ei(t,x,s),G)}}var p=i.wrapper.getBoundingClientRect(),d=0;function m(e){t.state.selectingText=!1,d=1/0,e&&(bt(e),i.input.focus()),pt(i.wrapper.ownerDocument,"mousemove",g),pt(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=ti(t,(function(e){0!==e.buttons&&Et(e)?function e(n){var a=++d,s=lr(t,n,!0,"rectangle"==r.unit);if(s)if(0!=ee(s,h)){t.curOp.focus=R(),f(s);var c=Nr(i,o);(s.line>=c.to||s.linep.bottom?20:0;l&&setTimeout(ti(t,(function(){d==a&&(i.scroller.scrollTop+=l,e(n))})),50)}}(e):m(e)})),v=ti(t,m);t.state.selectingText=v,ht(i.wrapper.ownerDocument,"mousemove",g),ht(i.wrapper.ownerDocument,"mouseup",v)}(t,r,e,o)}(e,r,o,t):xt(t)==n.scroller&&bt(t):2==i?(r&&Xi(e.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(x?e.display.input.onContextMenu(t):xr(e)))}}function va(t,e,n){if("char"==n)return new xi(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new xi(te(e.line,0),se(t.doc,te(e.line+1,0)));var r=n(t,e);return new xi(r.from,r.to)}function ya(t,e,n,r){var i,o;if(e.touches)i=e.touches[0].clientX,o=e.touches[0].clientY;else try{i=e.clientX,o=e.clientY}catch(t){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&bt(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!vt(t,n))return Ot(e);o-=s.top-a.viewOffset;for(var c=0;c=i)return dt(t,n,t,Zt(t.doc,o),t.display.gutterSpecs[c].className,e),Ot(e)}}function ba(t,e){return ya(t,e,"gutterClick",!0)}function Ta(t,e){Sn(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&ya(t,e,"gutterContextMenu",!1)}(t,e)||mt(t,e,"contextmenu")||x||t.display.input.onContextMenu(e)}function Oa(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Wn(t)}ma.prototype.compare=function(t,e,n){return this.time+400>t&&0==ee(e,this.pos)&&n==this.button};var Sa={toString:function(){return"CodeMirror.Init"}},xa={},Ea={};function Ca(t,e,n){if(!e!=!(n&&n!=Sa)){var r=t.display.dragFunctions,i=e?ht:pt;i(t.display.scroller,"dragstart",r.start),i(t.display.scroller,"dragenter",r.enter),i(t.display.scroller,"dragover",r.over),i(t.display.scroller,"dragleave",r.leave),i(t.display.scroller,"drop",r.drop)}}function ka(t){t.options.lineWrapping?(M(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(k(t.display.wrapper,"CodeMirror-wrap"),Ve(t)),cr(t),hr(t),Wn(t),setTimeout((function(){return Br(t)}),100)}function wa(t,e){var n=this;if(!(this instanceof wa))return new wa(t,e);this.options=e=e?D(e):{},D(xa,e,!1);var r=e.value;"string"==typeof r?r=new Io(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var i=new wa.inputStyles[e.inputStyle](this),o=this.display=new gi(t,r,i,e);for(var l in o.wrapper.CodeMirror=this,Oa(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),zr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new U,keySeq:null,specialChars:null},e.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",ti(t,ga)),ht(e.scroller,"dblclick",a&&s<11?ti(t,(function(e){if(!mt(t,e)){var n=lr(t,e);if(n&&!ba(t,e)&&!Sn(t.display,e)){bt(e);var r=t.findWordAt(n);Xi(t.doc,r.anchor,r.head)}}})):function(e){return mt(t,e)||bt(e)}),ht(e.scroller,"contextmenu",(function(e){return Ta(t,e)})),ht(e.input.getField(),"contextmenu",(function(n){e.scroller.contains(n.target)||Ta(t,n)}));var n,r={end:0};function i(){e.activeTouch&&(n=setTimeout((function(){return e.activeTouch=null}),1e3),(r=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,r=e.top-t.top;return n*n+r*r>400}ht(e.scroller,"touchstart",(function(i){if(!mt(t,i)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(i)&&!ba(t,i)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}})),ht(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ht(e.scroller,"touchend",(function(n){var r=e.activeTouch;if(r&&!Sn(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=t.coordsChar(e.activeTouch,"page");a=!r.prev||o(r,r.prev)?new xi(s,s):!r.prev.prev||o(r,r.prev.prev)?t.findWordAt(s):new xi(te(s.line,0),se(t.doc,te(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),bt(n)}i()})),ht(e.scroller,"touchcancel",i),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Pr(t,e.scroller.scrollTop),Dr(t,e.scroller.scrollLeft,!0),dt(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return Oi(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return Oi(t,e)})),ht(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){mt(t,e)||St(e)},over:function(e){mt(t,e)||(function(t,e){var n=lr(t,e);if(n){var r=document.createDocumentFragment();yr(t,n,r),t.display.dragCursor||(t.display.dragCursor=L("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),N(t.display.dragCursor,r)}}(t,e),St(e))},start:function(e){return function(t,e){if(a&&(!t.state.draggingText||+new Date-Ro<100))St(e);else if(!mt(t,e)&&!Sn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!f)){var n=L("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(t,e)},drop:ti(t,Mo),leave:function(e){mt(t,e)||_o(t)}};var c=e.input.getField();ht(c,"keyup",(function(e){return ha.call(t,e)})),ht(c,"keydown",ti(t,ua)),ht(c,"keypress",ti(t,fa)),ht(c,"focus",(function(e){return Er(t,e)})),ht(c,"blur",(function(e){return Cr(t,e)}))}(this),Do(),Kr(this),this.curOp.forceUpdate=!0,Pi(this,r),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Er(n)}),20):Cr(this),Ea)Ea.hasOwnProperty(l)&&Ea[l](this,e[l],Sa);fi(this),e.finishInit&&e.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else l=0,n="not";"prev"==n?l=e>o.first?F(Kt(o,e-1).text,null,a):0:"add"==n?l=c+t.options.indentUnit:"subtract"==n?l=c-t.options.indentUnit:"number"==typeof n&&(l=c+n),l=Math.max(0,l);var h="",f=0;if(t.options.indentWithTabs)for(var p=Math.floor(l/a);p;--p)f+=a,h+="\t";if(fa,c=It(e),l=null;if(s&&r.ranges.length>1)if(Aa&&Aa.text.join("\n")==e){if(r.ranges.length%Aa.text.length==0){l=[];for(var u=0;u=0;f--){var p=r.ranges[f],d=p.from(),m=p.to();p.empty()&&(n&&n>0?d=te(d.line,d.ch-n):t.state.overwrite&&!s?m=te(m.line,Math.min(Kt(o,m.line).text.length,m.ch+X(c).length)):s&&Aa&&Aa.lineWise&&Aa.text.join("\n")==c.join("\n")&&(d=m=te(d.line,0)));var g={from:d,to:m,text:l?l[f%l.length]:c,origin:i||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};lo(t.doc,g),cn(t,"inputRead",t,g)}e&&!s&&_a(t,e),Ir(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Ma(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Jr(e,(function(){return Ra(e,n,0,null,"paste")})),!0}function _a(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=t.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=La(t,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Kt(t.doc,i.head.line).text.slice(0,i.head.ch))&&(a=La(t,i.head.line,"smart"));a&&cn(t,"electricInput",t,i.head.line)}}}function Pa(t){for(var e=[],n=[],r=0;r0?0:-1));a=isNaN(u)?null:new te(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(u>=55296&&u<56320?2:1))),-n)}else a=i?function(t,e,n,r){var i=lt(e,t.doc.direction);if(!i)return Jo(e,n,r);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=st(i,n.ch,n.sticky),a=i[o];if("ltr"==t.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&f>=u.begin)){var p=h?"before":"after";return new te(n.line,f,p)}}var d=function(t,e,r){for(var o=function(t,e){return e?new te(n.line,c(t,1),"before"):new te(n.line,t,"after")};t>=0&&t0==(1!=a.level),l=s?r.begin:c(r.end,-1);if(a.from<=l&&l0?u.end:c(u.begin,-1);return null==g||r>0&&g==e.text.length||!(m=d(r>0?0:i.length-1,r,l(g)))?null:m}(t.cm,s,e,n):Jo(s,e,n);if(null==a){if(o||(l=e.line+c)=t.first+t.size||(e=new te(l,e.ch,e.sticky),!(s=Kt(t,l))))return!1;e=ta(i,t.cm,s,e.line,c)}else e=a;return!0}if("char"==r||"codepoint"==r)l();else if("column"==r)l(!0);else if("word"==r||"group"==r)for(var u=null,h="group"==r,f=t.cm&&t.cm.getHelper(e,"wordChars"),p=!0;!(n<0)||l(!p);p=!1){var d=s.text.charAt(e.ch)||"\n",m=tt(d,f)?"w":h&&"\n"==d?"n":!h||/\s/.test(d)?null:"p";if(!h||p||m||(m="s"),u&&u!=m){n<0&&(n=1,l(),e.sticky="after");break}if(m&&(u=m),n>0&&!l(!p))break}var g=oo(t,e,o,a,!0);return ne(o,g)&&(g.hitSide=!0),g}function Ua(t,e,n,r){var i,o,a=t.doc,s=e.left;if("page"==r){var c=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(c-.5*rr(t.display),3);i=(n>0?e.bottom:e.top)+n*l}else"line"==r&&(i=n>0?e.bottom+3:e.top-3);for(;(o=qn(t,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Wa=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new U,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ba(t,e){var n=In(t,e.line);if(!n||n.hidden)return null;var r=Kt(t.doc,e.line),i=Ln(n,r,e.line),o=lt(r,t.doc.direction),a="left";o&&(a=st(o,e.ch)%2?"right":"left");var s=jn(i.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ha(t,e){return e&&(t.bad=!0),t}function Ga(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return Ha(t.clipPos(te(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var i=0;i=e.display.viewTo||o.line=e.display.viewFrom&&Ba(e,i)||{node:c[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=te(a.line-1,Kt(r.doc,a.line-1).length)),s.ch==Kt(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(t=ur(r,a.line))?(e=qt(i.view[0].line),n=i.view[0].node):(e=qt(i.view[t].line),n=i.view[t-1].node.nextSibling);var c,l,u=ur(r,s.line);if(u==i.view.length-1?(c=i.viewTo-1,l=i.lineDiv.lastChild):(c=qt(i.view[u+1].line)-1,l=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(t,e,n,r,i){var o="",a=!1,s=t.doc.lineSeparator(),c=!1;function l(){a&&(o+=s,c&&(o+=s),a=c=!1)}function u(t){t&&(l(),o+=t)}function h(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,f=e.getAttribute("cm-marker");if(f){var p=t.findMarks(te(r,0),te(i+1,0),(g=+f,function(t){return t.id==g}));return void(p.length&&(o=p[0].find(0))&&u(Yt(t.doc,o.from,o.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var d=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;d&&l();for(var m=0;m1&&f.length>1;)if(X(h)==X(f))h.pop(),f.pop(),c--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),e++}for(var p=0,d=0,m=h[0],g=f[0],v=Math.min(m.length,g.length);pa.ch&&y.charCodeAt(y.length-d-1)==b.charCodeAt(b.length-d-1);)p--,d++;h[h.length-1]=y.slice(0,y.length-d).replace(/^\u200b+/,""),h[0]=h[0].slice(p).replace(/\u200b+$/,"");var O=te(e,p),S=te(c,f.length?X(f).length-d:0);return h.length>1||h[0]||ee(O,S)?(mo(r.doc,h,O,S,"+input"),!0):void 0},Wa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Wa.prototype.reset=function(){this.forceCompositionEnd()},Wa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Wa.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Wa.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Jr(this.cm,(function(){return hr(t.cm)}))},Wa.prototype.setUneditable=function(t){t.contentEditable="false"},Wa.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||ti(this.cm,Ra)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Wa.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Wa.prototype.onContextMenu=function(){},Wa.prototype.resetPosition=function(){},Wa.prototype.needsContentAttribute=!0;var Va=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new U,this.hasSelection=!1,this.composing=null};Va.prototype.init=function(t){var e=this,n=this,r=this.cm;this.createField(t);var i=this.textarea;function o(t){if(!mt(r,t)){if(r.somethingSelected())Ia({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Pa(r);Ia({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,H):(n.prevInput="",i.value=e.text.join("\n"),P(i))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),m&&(i.style.width="0px"),ht(i,"input",(function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),ht(i,"paste",(function(t){mt(r,t)||Ma(t,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),ht(i,"cut",o),ht(i,"copy",o),ht(t.scroller,"paste",(function(e){if(!Sn(t,e)&&!mt(r,e)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,i.dispatchEvent(o)}})),ht(t.lineSpace,"selectstart",(function(e){Sn(t,e)||bt(e)})),ht(i,"compositionstart",(function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ht(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Va.prototype.createField=function(t){this.wrapper=Da(),this.textarea=this.wrapper.firstChild},Va.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Va.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=vr(t);if(t.options.moveInputWithCursor){var i=Yn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Va.prototype.showSelection=function(t){var e=this.cm.display;N(e.cursorDiv,t.cursors),N(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Va.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&P(this.textarea),a&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Va.prototype.getField=function(){return this.textarea},Va.prototype.supportsTouch=function(){return!1},Va.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||R()!=this.textarea))try{this.textarea.focus()}catch(t){}},Va.prototype.blur=function(){this.textarea.blur()},Va.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Va.prototype.receivedFocus=function(){this.slowPoll()},Va.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Va.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}))},Va.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||Rt(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==r&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var c=0,l=Math.min(r.length,i.length);c1e3||i.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Va.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Va.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Va.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,i=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=lr(n,t),l=r.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ti(n,Ji)(n.doc,Ci(o),H);var u,f=i.style.cssText,p=e.wrapper.style.cssText,d=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-d.top-5)+"px; left: "+(t.clientX-d.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",c&&(u=window.scrollY),r.input.focus(),c&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),x){St(t);var m=function(){pt(window,"mouseup",m),setTimeout(v,20)};ht(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var t=n.somethingSelected(),o="​"+(t?i.value:"");i.value="⇚",i.value=o,e.prevInput=t?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=p,i.style.cssText=f,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),null!=i.selectionStart)){(!a||a&&s<9)&&g();var t=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==e.prevInput?ti(n,so)(n):t++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Va.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Va.prototype.setUneditable=function(){},Va.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,r,i,o){t.defaults[n]=r,i&&(e[n]=o?function(t,e,n){n!=Sa&&i(t,e,n)}:i)}t.defineOption=n,t.Init=Sa,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,Ai(t)}),!0),n("indentUnit",2,Ai,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){Ii(t),Wn(t),hr(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter((function(t){for(var i=0;;){var o=t.text.indexOf(e,i);if(-1==o)break;i=o+e.length,n.push(te(r,o))}r++}));for(var i=n.length-1;i>=0;i--)mo(t.doc,e,n[i],te(n[i].line,n[i].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Sa&&t.refresh()})),n("specialCharPlaceholder",Qe,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!T),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){Oa(t),mi(t)}),!0),n("keyMap","default",(function(t,e,n){var r=qo(e),i=n!=Sa&&qo(n);i&&i.detach&&i.detach(t,r),r.attach&&r.attach(t,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,ka,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=pi(e,t.options.lineNumbers),mi(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?ar(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return Br(t)}),!0),n("scrollbarStyle","native",(function(t){zr(t),Br(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=pi(t.options.gutters,e),mi(t)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(t){return t}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(Cr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,Ca),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ii,!0),n("addModeClass",!1,Ii,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,Ii,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}(wa),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var r=this.options,i=r[t];r[t]==n&&"mode"!=t||(r[t]=n,e.hasOwnProperty(t)&&ti(this,e[t])(this,n,i),dt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](qo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(La(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&Ir(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var c=s;c0&&qi(this.doc,r,new xi(o,l[r].to()),H)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,te(t),e,!0)},getTokenTypeAt:function(t){t=se(this.doc,t);var e,n=fe(this,Kt(this.doc,t.line)),r=0,i=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(t=o,i=!0),r=Kt(this.doc,t)}else r=t;return zn(this,r,{top:0,left:0},e||"page",n||i).top+(i?this.doc.height-Ge(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,i){var o,a,s,c=this.display,l=(t=Yn(this,se(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),c.sizer.appendChild(e),"over"==r)l=t.top;else if("above"==r||"near"==r){var h=Math.max(c.wrapper.clientHeight,this.doc.height),f=Math.max(c.sizer.clientWidth,c.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>h)&&t.top>e.offsetHeight?l=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=h&&(l=t.bottom),u+e.offsetWidth>f&&(u=f-e.offsetWidth)}e.style.top=l+"px",e.style.left=e.style.right="","right"==i?(u=c.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(c.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),n&&(o=this,a={left:u,top:l,right:u+e.offsetWidth,bottom:l+e.offsetHeight},null!=(s=Lr(o,a)).scrollTop&&Pr(o,s.scrollTop),null!=s.scrollLeft&&Dr(o,s.scrollLeft))},triggerOnKeyDown:ei(ua),triggerOnKeyPress:ei(fa),triggerOnKeyUp:ha,triggerOnMouseDown:ei(ga),execCommand:function(t){if(ea.hasOwnProperty(t))return ea[t].call(null,this)},triggerElectric:ei((function(t){_a(this,t)})),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var o=se(this.doc,t),a=0;a0&&a(e.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&cr(this),dt(this,"refresh",this)})),swapDoc:ei((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Pi(this,t),Wn(this),this.display.input.reset(),Rr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,cn(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(t),t.registerHelper=function(e,r,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=i},t.registerGlobalHelper=function(e,r,i,o){t.registerHelper(e,r,o),n[e]._global.push({pred:i,val:o})}}(wa);var Ka="iter insert remove copy getEditor constructor".split(" ");for(var Ya in Io.prototype)Io.prototype.hasOwnProperty(Ya)&&W(Ka,Ya)<0&&(wa.prototype[Ya]=function(t){return function(){return t.apply(this.doc,arguments)}}(Io.prototype[Ya]));return yt(Io),wa.inputStyles={textarea:Va,contenteditable:Wa},wa.defineMode=function(t){wa.defaults.mode||"null"==t||(wa.defaults.mode=t),Dt.apply(this,arguments)},wa.defineMIME=function(t,e){jt[t]=e},wa.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),wa.defineMIME("text/plain","null"),wa.defineExtension=function(t,e){wa.prototype[t]=e},wa.defineDocExtension=function(t,e){Io.prototype[t]=e},wa.fromTextArea=function(t,e){if((e=e?D(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=R();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=s.getValue()}var i;if(t.form&&(ht(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(n){n.save=r,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,r(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(pt(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var s=wa((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return s},function(t){t.off=pt,t.on=ht,t.wheelEventPixels=Ti,t.Doc=Io,t.splitLines=It,t.countColumn=F,t.findColumn=V,t.isWordChar=J,t.Pass=B,t.signal=dt,t.Line=Ke,t.changeEnd=ki,t.scrollbarModel=Gr,t.Pos=te,t.cmpPos=ee,t.modes=Pt,t.mimeModes=jt,t.resolveMode=Ft,t.getMode=Ut,t.modeExtensions=Wt,t.extendMode=Bt,t.copyState=Ht,t.startState=zt,t.innerMode=Gt,t.commands=ea,t.keyMap=Go,t.keyName=$o,t.isModifierKey=Yo,t.lookupKey=Ko,t.normalizeKeyMap=Vo,t.StringStream=Vt,t.SharedTextMarker=wo,t.TextMarker=Co,t.LineWidget=So,t.e_preventDefault=bt,t.e_stopPropagation=Tt,t.e_stop=St,t.addClass=M,t.contains=I,t.rmClass=k,t.keyNames=Uo}(wa),wa.version="5.58.2",wa}()},function(t,e,n){"use strict";n.r(e),n.d(e,"VERSION",(function(){return r})),n.d(e,"CstParser",(function(){return nn})),n.d(e,"EmbeddedActionsParser",(function(){return rn})),n.d(e,"ParserDefinitionErrorType",(function(){return Ze})),n.d(e,"EMPTY_ALT",(function(){return tn})),n.d(e,"Lexer",(function(){return X})),n.d(e,"LexerDefinitionErrorType",(function(){return V})),n.d(e,"createToken",(function(){return Q})),n.d(e,"createTokenInstance",(function(){return tt})),n.d(e,"EOF",(function(){return J})),n.d(e,"tokenLabel",(function(){return $})),n.d(e,"tokenMatcher",(function(){return et})),n.d(e,"tokenName",(function(){return q})),n.d(e,"defaultGrammarResolverErrorProvider",(function(){return Lt})),n.d(e,"defaultGrammarValidatorErrorProvider",(function(){return At})),n.d(e,"defaultParserErrorProvider",(function(){return Nt})),n.d(e,"EarlyExitException",(function(){return ve})),n.d(e,"isRecognitionException",(function(){return pe})),n.d(e,"MismatchedTokenException",(function(){return de})),n.d(e,"NotAllInputParsedException",(function(){return ge})),n.d(e,"NoViableAltException",(function(){return me})),n.d(e,"defaultLexerErrorProvider",(function(){return K})),n.d(e,"Alternation",(function(){return ft})),n.d(e,"Alternative",(function(){return at})),n.d(e,"NonTerminal",(function(){return it})),n.d(e,"Option",(function(){return st})),n.d(e,"Repetition",(function(){return ut})),n.d(e,"RepetitionMandatory",(function(){return ct})),n.d(e,"RepetitionMandatoryWithSeparator",(function(){return lt})),n.d(e,"RepetitionWithSeparator",(function(){return ht})),n.d(e,"Rule",(function(){return ot})),n.d(e,"Terminal",(function(){return pt})),n.d(e,"serializeGrammar",(function(){return dt})),n.d(e,"serializeProduction",(function(){return mt})),n.d(e,"GAstVisitor",(function(){return yt})),n.d(e,"assignOccurrenceIndices",(function(){return he})),n.d(e,"resolveGrammar",(function(){return le})),n.d(e,"validateGrammar",(function(){return ue})),n.d(e,"clearCache",(function(){return gn})),n.d(e,"createSyntaxDiagramsCode",(function(){return on})),n.d(e,"generateParserFactory",(function(){return dn})),n.d(e,"generateParserModule",(function(){return mn})),n.d(e,"Parser",(function(){return vn}));var r="7.0.3",i=n(0),o=n(1),a={},s=new o.RegExpParser;function c(t){var e=t.toString();if(a.hasOwnProperty(e))return a[e];var n=s.pattern(e);return a[e]=n,n}var l,u=(l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h='Unable to use "first char" lexer optimizations:\n';function f(t,e){void 0===e&&(e=!1);try{var n=c(t);return function t(e,n,r){switch(e.type){case"Disjunction":for(var o=0;o=_)for(var o=e.from>=_?e.from:_,a=e.to,s=P(o),c=P(a),l=s;l<=c;l++)n[l]=l}}}));break;case"Group":t(c.value,n,r);break;default:throw Error("Non Exhaustive Match")}var l=void 0!==c.quantifier&&0===c.quantifier.atLeast;if("Group"===c.type&&!1===m(c)||"Group"!==c.type&&!1===l)break}break;default:throw Error("non exhaustive match!")}return Object(i.U)(n)}(n.value,{},n.flags.ignoreCase)}catch(n){if("Complement Sets are not supported for first char optimization"===n.message)e&&Object(i.d)(h+"\tUnable to optimize: < "+t.toString()+" >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var r="";e&&(r="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Object(i.c)(h+"\n\tFailed parsing: < "+t.toString()+" >\n\tUsing the regexp-to-ast library version: "+o.VERSION+"\n\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues"+r)}}return[]}function p(t,e,n){var r=P(t);e[r]=r,!0===n&&function(t,e){var n=String.fromCharCode(t),r=n.toUpperCase();if(r!==n){var i=P(r.charCodeAt(0));e[i]=i}else{var o=n.toLowerCase();if(o!==n){i=P(o.charCodeAt(0));e[i]=i}}}(t,e)}function d(t,e){return Object(i.q)(t.value,(function(t){if("number"==typeof t)return Object(i.j)(e,t);var n=t;return void 0!==Object(i.q)(e,(function(t){return n.from<=t&&t<=n.to}))}))}function m(t){return!(!t.quantifier||0!==t.quantifier.atLeast)||!!t.value&&(Object(i.y)(t.value)?Object(i.o)(t.value,m):m(t.value))}var g=function(t){function e(e){var n=t.call(this)||this;return n.targetCharCodes=e,n.found=!1,n}return u(e,t),e.prototype.visitChildren=function(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e)}t.prototype.visitChildren.call(this,e)}},e.prototype.visitCharacter=function(t){Object(i.j)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?void 0===d(t,this.targetCharCodes)&&(this.found=!0):void 0!==d(t,this.targetCharCodes)&&(this.found=!0)},e}(o.BaseRegExpVisitor);function v(t,e){if(e instanceof RegExp){var n=c(e),r=new g(t);return r.visit(n),r.found}return void 0!==Object(i.q)(e,(function(e){return Object(i.j)(t,e.charCodeAt(0))}))}var y=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b="PATTERN",T="boolean"==typeof new RegExp("(?:)").sticky;function O(t,e){var n,r=(e=Object(i.k)(e,{useSticky:T,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(t,e){return e()}})).tracer;r("initCharCodeToOptimizedIndexMap",(function(){!function(){if(Object(i.A)(j)){j=new Array(65536);for(var t=0;t<65536;t++)j[t]=t>255?255+~~(t/255):t}}()})),r("Reject Lexer.NA",(function(){n=Object(i.P)(t,(function(t){return t[b]===X.NA}))}));var o,a,s,c,l,u,p,d,m,g,y,O=!1;r("Transform Patterns",(function(){O=!1,o=Object(i.I)(n,(function(t){var n=t[b];if(Object(i.D)(n)){var r=n.source;return 1!==r.length||"^"===r||"$"===r||"."===r||n.ignoreCase?2!==r.length||"\\"!==r[0]||Object(i.j)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?e.useSticky?k(n):C(n):r[1]:r}if(Object(i.B)(n))return O=!0,{exec:n};if(Object(i.w)(n,"exec"))return O=!0,n;if("string"==typeof n){if(1===n.length)return n;var o=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),a=new RegExp(o);return e.useSticky?k(a):C(a)}throw Error("non exhaustive match")}))})),r("misc mapping",(function(){a=Object(i.I)(n,(function(t){return t.tokenTypeIdx})),s=Object(i.I)(n,(function(t){var e=t.GROUP;if(e!==X.SKIPPED){if(Object(i.E)(e))return e;if(Object(i.F)(e))return!1;throw Error("non exhaustive match")}})),c=Object(i.I)(n,(function(t){var e=t.LONGER_ALT;if(e)return Object(i.x)(n,e)})),l=Object(i.I)(n,(function(t){return t.PUSH_MODE})),u=Object(i.I)(n,(function(t){return Object(i.w)(t,"POP_MODE")}))})),r("Line Terminator Handling",(function(){var t=R(e.lineTerminatorCharacters);p=Object(i.I)(n,(function(t){return!1})),"onlyOffset"!==e.positionTracking&&(p=Object(i.I)(n,(function(e){return Object(i.w)(e,"LINE_BREAKS")?e.LINE_BREAKS:!1===I(e,t)?v(t,e.PATTERN):void 0})))})),r("Misc Mapping #2",(function(){d=Object(i.I)(n,N),m=Object(i.I)(o,L),g=Object(i.O)(n,(function(t,e){var n=e.GROUP;return Object(i.E)(n)&&n!==X.SKIPPED&&(t[n]=[]),t}),{}),y=Object(i.I)(o,(function(t,e){return{pattern:o[e],longerAlt:c[e],canLineTerminator:p[e],isCustom:d[e],short:m[e],group:s[e],push:l[e],pop:u[e],tokenTypeIdx:a[e],tokenType:n[e]}}))}));var S=!0,x=[];return e.safeMode||r("First Char Optimization",(function(){x=Object(i.O)(n,(function(t,n,r){if("string"==typeof n.PATTERN){var o=P(n.PATTERN.charCodeAt(0));M(t,o,y[r])}else if(Object(i.y)(n.START_CHARS_HINT)){var a;Object(i.u)(n.START_CHARS_HINT,(function(e){var n=P("string"==typeof e?e.charCodeAt(0):e);a!==n&&(a=n,M(t,n,y[r]))}))}else if(Object(i.D)(n.PATTERN))if(n.PATTERN.unicode)S=!1,e.ensureOptimizations&&Object(i.c)(h+"\tUnable to analyze < "+n.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var s=f(n.PATTERN,e.ensureOptimizations);Object(i.A)(s)&&(S=!1),Object(i.u)(s,(function(e){M(t,e,y[r])}))}else e.ensureOptimizations&&Object(i.c)(h+"\tTokenType: <"+n.name+"> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),S=!1;return t}),[])})),r("ArrayPacking",(function(){x=Object(i.L)(x)})),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:x,hasCustom:O,canBeOptimized:S}}function S(t,e){var n=[],r=function(t){var e=Object(i.p)(t,(function(t){return!Object(i.w)(t,b)})),n=Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:V.MISSING_PATTERN,tokenTypes:[t]}})),r=Object(i.l)(t,e);return{errors:n,valid:r}}(t);n=n.concat(r.errors);var a=function(t){var e=Object(i.p)(t,(function(t){var e=t[b];return!(Object(i.D)(e)||Object(i.B)(e)||Object(i.w)(e,"exec")||Object(i.E)(e))})),n=Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:V.INVALID_PATTERN,tokenTypes:[t]}})),r=Object(i.l)(t,e);return{errors:n,valid:r}}(r.valid),s=a.valid;return n=(n=(n=(n=(n=n.concat(a.errors)).concat(function(t){var e=[],n=Object(i.p)(t,(function(t){return Object(i.D)(t[b])}));return e=(e=(e=(e=(e=e.concat(function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.found=!1,e}return y(e,t),e.prototype.visitEndAnchor=function(t){this.found=!0},e}(o.BaseRegExpVisitor),n=Object(i.p)(t,(function(t){var n=t[b];try{var r=c(n),i=new e;return i.visit(r),i.found}catch(t){return x.test(n.source)}}));return Object(i.I)(n,(function(t){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:V.EOI_ANCHOR_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.found=!1,e}return y(e,t),e.prototype.visitStartAnchor=function(t){this.found=!0},e}(o.BaseRegExpVisitor),n=Object(i.p)(t,(function(t){var n=t[b];try{var r=c(n),i=new e;return i.visit(r),i.found}catch(t){return E.test(n.source)}}));return Object(i.I)(n,(function(t){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:V.SOI_ANCHOR_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=Object(i.p)(t,(function(t){var e=t[b];return e instanceof RegExp&&(e.multiline||e.global)}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:V.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=[],n=Object(i.I)(t,(function(n){return Object(i.O)(t,(function(t,r){return n.PATTERN.source!==r.PATTERN.source||Object(i.j)(e,r)||r.PATTERN===X.NA||(e.push(r),t.push(r)),t}),[])}));n=Object(i.i)(n);var r=Object(i.p)(n,(function(t){return t.length>1}));return Object(i.I)(r,(function(t){var e=Object(i.I)(t,(function(t){return t.name}));return{message:"The same RegExp pattern ->"+Object(i.s)(t).PATTERN+"<-has been used in all of the following Token Types: "+e.join(", ")+" <-",type:V.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}}))}(n))).concat(function(t){var e=Object(i.p)(t,(function(t){return t[b].test("")}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:V.EMPTY_MATCH_PATTERN,tokenTypes:[t]}}))}(n))}(s))).concat(function(t){var e=Object(i.p)(t,(function(t){if(!Object(i.w)(t,"GROUP"))return!1;var e=t.GROUP;return e!==X.SKIPPED&&e!==X.NA&&!Object(i.E)(e)}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:V.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}}))}(s))).concat(function(t,e){var n=Object(i.p)(t,(function(t){return void 0!==t.PUSH_MODE&&!Object(i.j)(e,t.PUSH_MODE)}));return Object(i.I)(n,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+t.PUSH_MODE+"<-which does not exist",type:V.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}}))}(s,e))).concat(function(t){var e=[],n=Object(i.O)(t,(function(t,e,n){var r,o=e.PATTERN;return o===X.NA||(Object(i.E)(o)?t.push({str:o,idx:n,tokenType:e}):Object(i.D)(o)&&(r=o,void 0===Object(i.q)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(function(t){return-1!==r.source.indexOf(t)})))&&t.push({str:o.source,idx:n,tokenType:e})),t}),[]);return Object(i.u)(t,(function(t,r){Object(i.u)(n,(function(n){var o=n.str,a=n.idx,s=n.tokenType;if(r"+t.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";e.push({message:c,type:V.UNREACHABLE_PATTERN,tokenTypes:[t,s]})}}))})),e}(s))}var x=/[^\\][\$]/;var E=/[^\\[][\^]|^\^/;function C(t){var e=t.ignoreCase?"i":"";return new RegExp("^(?:"+t.source+")",e)}function k(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function w(t,e,n){var r=[],o=!1,a=Object(i.i)(Object(i.t)(Object(i.J)(t.modes,(function(t){return t})))),s=Object(i.P)(a,(function(t){return t[b]===X.NA})),c=R(n);return e&&Object(i.u)(s,(function(t){var e=I(t,c);if(!1!==e){var n={message:function(t,e){if(e.issue===V.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+t.name+"> Token Type\n\t Root cause: "+e.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===V.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <"+t.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}(t,e),type:e.issue,tokenType:t};r.push(n)}else Object(i.w)(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(o=!0):v(c,t.PATTERN)&&(o=!0)})),e&&!o&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:V.NO_LINE_BREAKS_FLAGS}),r}function N(t){var e=t.PATTERN;if(Object(i.D)(e))return!1;if(Object(i.B)(e))return!0;if(Object(i.w)(e,"exec"))return!0;if(Object(i.E)(e))return!1;throw Error("non exhaustive match")}function L(t){return!(!Object(i.E)(t)||1!==t.length)&&t.charCodeAt(0)}var A={test:function(t){for(var e=t.length,n=this.lastIndex;n0?t.charCodeAt(0):t}))}function M(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}var _=256;function P(t){return t<_?t:j[t]}var j=[];function D(t,e){var n=t.tokenTypeIdx;return n===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[n]}function F(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}var U=1,W={};function B(t){var e=function(t){var e=Object(i.g)(t),n=t,r=!0;for(;r;){n=Object(i.i)(Object(i.t)(Object(i.I)(n,(function(t){return t.CATEGORIES}))));var o=Object(i.l)(n,e);e=e.concat(o),Object(i.A)(o)?r=!1:n=o}return e}(t);!function(t){Object(i.u)(t,(function(t){var e;H(t)||(W[U]=t,t.tokenTypeIdx=U++),G(t)&&!Object(i.y)(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),G(t)||(t.CATEGORIES=[]),e=t,Object(i.w)(e,"categoryMatches")||(t.categoryMatches=[]),function(t){return Object(i.w)(t,"categoryMatchesMap")}(t)||(t.categoryMatchesMap={})}))}(e),function(t){Object(i.u)(t,(function(t){!function t(e,n){Object(i.u)(e,(function(t){n.categoryMatchesMap[t.tokenTypeIdx]=!0})),Object(i.u)(n.CATEGORIES,(function(r){var o=e.concat(n);Object(i.j)(o,r)||t(o,r)}))}([],t)}))}(e),function(t){Object(i.u)(t,(function(t){t.categoryMatches=[],Object(i.u)(t.categoryMatchesMap,(function(e,n){t.categoryMatches.push(W[n].tokenTypeIdx)}))}))}(e),Object(i.u)(e,(function(t){t.isParent=t.categoryMatches.length>0}))}function H(t){return Object(i.w)(t,"tokenTypeIdx")}function G(t){return Object(i.w)(t,"CATEGORIES")}function z(t){return Object(i.w)(t,"tokenTypeIdx")}var V,K={buildUnableToPopLexerModeMessage:function(t){return"Unable to pop Lexer Mode after encountering Token ->"+t.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(t,e,n,r,i){return"unexpected character: ->"+t.charAt(e)+"<- at offset: "+e+", skipped "+n+" characters."}};!function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"}(V||(V={}));var Y={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:K,traceInitPerf:!1,skipValidations:!1};Object.freeze(Y);var X=function(){function t(t,e){var n=this;if(void 0===e&&(e=Y),this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"==typeof e)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Object(i.K)(Y,e);var r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(function(){var r,o=!0;n.TRACE_INIT("Lexer Config handling",(function(){if(n.config.lineTerminatorsPattern===Y.lineTerminatorsPattern)n.config.lineTerminatorsPattern=A;else if(n.config.lineTerminatorCharacters===Y.lineTerminatorCharacters)throw Error("Error: Missing property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(e.safeMode&&e.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');n.trackStartLines=/full|onlyStart/i.test(n.config.positionTracking),n.trackEndLines=/full/i.test(n.config.positionTracking),Object(i.y)(t)?((r={modes:{}}).modes.defaultMode=Object(i.g)(t),r.defaultMode="defaultMode"):(o=!1,r=Object(i.h)(t))})),!1===n.config.skipValidations&&(n.TRACE_INIT("performRuntimeChecks",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(function(t,e,n){var r=[];return Object(i.w)(t,"defaultMode")||r.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:V.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object(i.w)(t,"modes")||r.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:V.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object(i.w)(t,"modes")&&Object(i.w)(t,"defaultMode")&&!Object(i.w)(t.modes,t.defaultMode)&&r.push({message:"A MultiMode Lexer cannot be initialized with a defaultMode: <"+t.defaultMode+">which does not exist\n",type:V.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object(i.w)(t,"modes")&&Object(i.u)(t.modes,(function(t,e){Object(i.u)(t,(function(t,n){Object(i.F)(t)&&r.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+e+"> at index: <"+n+">\n",type:V.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),r}(r,n.trackStartLines,n.config.lineTerminatorCharacters))})),n.TRACE_INIT("performWarningRuntimeChecks",(function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat(w(r,n.trackStartLines,n.config.lineTerminatorCharacters))}))),r.modes=r.modes?r.modes:{},Object(i.u)(r.modes,(function(t,e){r.modes[e]=Object(i.P)(t,(function(t){return Object(i.F)(t)}))}));var s=Object(i.G)(r.modes);if(Object(i.u)(r.modes,(function(t,r){n.TRACE_INIT("Mode: <"+r+"> processing",(function(){var o;(n.modes.push(r),!1===n.config.skipValidations&&n.TRACE_INIT("validatePatterns",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(S(t,s))})),Object(i.A)(n.lexerDefinitionErrors))&&(B(t),n.TRACE_INIT("analyzeTokenTypes",(function(){o=O(t,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:e.positionTracking,ensureOptimizations:e.ensureOptimizations,safeMode:e.safeMode,tracer:n.TRACE_INIT.bind(n)})})),n.patternIdxToConfig[r]=o.patternIdxToConfig,n.charCodeToPatternIdxToConfig[r]=o.charCodeToPatternIdxToConfig,n.emptyGroups=Object(i.K)(n.emptyGroups,o.emptyGroups),n.hasCustom=o.hasCustom||n.hasCustom,n.canModeBeOptimized[r]=o.canBeOptimized)}))})),n.defaultMode=r.defaultMode,!Object(i.A)(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var c=Object(i.I)(n.lexerDefinitionErrors,(function(t){return t.message})).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+c)}Object(i.u)(n.lexerDefinitionWarning,(function(t){Object(i.d)(t.message)})),n.TRACE_INIT("Choosing sub-methods implementations",(function(){if(T?(n.chopInput=i.a,n.match=n.matchWithTest):(n.updateLastIndex=i.b,n.match=n.matchWithExec),o&&(n.handleModes=i.b),!1===n.trackStartLines&&(n.computeNewColumn=i.a),!1===n.trackEndLines&&(n.updateTokenEndLineColumnLocation=i.b),/full/i.test(n.config.positionTracking))n.createTokenInstance=n.createFullToken;else if(/onlyStart/i.test(n.config.positionTracking))n.createTokenInstance=n.createStartOnlyToken;else{if(!/onlyOffset/i.test(n.config.positionTracking))throw Error('Invalid config option: "'+n.config.positionTracking+'"');n.createTokenInstance=n.createOffsetOnlyToken}n.hasCustom?(n.addToken=n.addTokenUsingPush,n.handlePayload=n.handlePayloadWithCustom):(n.addToken=n.addTokenUsingMemberAccess,n.handlePayload=n.handlePayloadNoCustom)})),n.TRACE_INIT("Failed Optimization Warnings",(function(){var t=Object(i.O)(n.canModeBeOptimized,(function(t,e,n){return!1===e&&t.push(n),t}),[]);if(e.ensureOptimizations&&!Object(i.A)(t))throw Error("Lexer Modes: < "+t.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),n.TRACE_INIT("clearRegExpParserCache",(function(){a={}})),n.TRACE_INIT("toFastProperties",(function(){Object(i.S)(n)}))}))}return t.prototype.tokenize=function(t,e){if(void 0===e&&(e=this.defaultMode),!Object(i.A)(this.lexerDefinitionErrors)){var n=Object(i.I)(this.lexerDefinitionErrors,(function(t){return t.message})).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+n)}return this.tokenizeInternal(t,e)},t.prototype.tokenizeInternal=function(t,e){var n,r,o,a,s,c,l,u,h,f,p,d,m,g,v,y,b,T=this,O=t,S=O.length,x=0,E=0,C=this.hasCustom?0:Math.floor(t.length/10),k=new Array(C),w=[],N=this.trackStartLines?1:void 0,L=this.trackStartLines?1:void 0,A=(v=this.emptyGroups,y={},b=Object(i.G)(v),Object(i.u)(b,(function(t){var e=v[t];if(!Object(i.y)(e))throw Error("non exhaustive match");y[t]=[]})),y),I=this.trackStartLines,R=this.config.lineTerminatorsPattern,M=0,_=[],j=[],D=[],F=[];Object.freeze(F);var U=void 0;function W(){return _}function B(t){var e=P(t),n=j[e];return void 0===n?F:n}var H,G=function(t){if(1===D.length&&void 0===t.tokenType.PUSH_MODE){var e=T.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t);w.push({offset:t.startOffset,line:void 0!==t.startLine?t.startLine:void 0,column:void 0!==t.startColumn?t.startColumn:void 0,length:t.image.length,message:e})}else{D.pop();var n=Object(i.H)(D);_=T.patternIdxToConfig[n],j=T.charCodeToPatternIdxToConfig[n],M=_.length;var r=T.canModeBeOptimized[n]&&!1===T.config.safeMode;U=j&&r?B:W}};function z(t){D.push(t),j=this.charCodeToPatternIdxToConfig[t],_=this.patternIdxToConfig[t],M=_.length,M=_.length;var e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;U=j&&e?B:W}for(z.call(this,e);xs.length&&(s=o,c=l,H=$)}break}}if(null!==s){if(u=s.length,void 0!==(h=H.group)&&(f=H.tokenTypeIdx,p=this.createTokenInstance(s,x,f,H.tokenType,N,L,u),this.handlePayload(p,c),!1===h?E=this.addToken(k,E,p):A[h].push(p)),t=this.chopInput(t,u),x+=u,L=this.computeNewColumn(L,u),!0===I&&!0===H.canLineTerminator){var Z=0,Q=void 0,J=void 0;R.lastIndex=0;do{!0===(Q=R.test(s))&&(J=R.lastIndex-1,Z++)}while(!0===Q);0!==Z&&(N+=Z,L=u-J,this.updateTokenEndLineColumnLocation(p,h,J,Z,N,L,u))}this.handleModes(H,G,z,p)}else{for(var tt=x,et=N,nt=L,rt=!1;!rt&&x");var r=Object(i.R)(e),o=r.time,a=r.value,s=o>10?console.warn:console.log;return this.traceInitIndent time: "+o+"ms"),this.traceInitIndent--,a}return e()},t.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",t.NA=/NOT_APPLICABLE/,t}();function $(t){return Z(t)?t.LABEL:t.name}function q(t){return t.name}function Z(t){return Object(i.E)(t.LABEL)&&""!==t.LABEL}function Q(t){return function(t){var e=t.pattern,n={};n.name=t.name,Object(i.F)(e)||(n.PATTERN=e);if(Object(i.w)(t,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";Object(i.w)(t,"categories")&&(n.CATEGORIES=t.categories);B([n]),Object(i.w)(t,"label")&&(n.LABEL=t.label);Object(i.w)(t,"group")&&(n.GROUP=t.group);Object(i.w)(t,"pop_mode")&&(n.POP_MODE=t.pop_mode);Object(i.w)(t,"push_mode")&&(n.PUSH_MODE=t.push_mode);Object(i.w)(t,"longer_alt")&&(n.LONGER_ALT=t.longer_alt);Object(i.w)(t,"line_breaks")&&(n.LINE_BREAKS=t.line_breaks);Object(i.w)(t,"start_chars_hint")&&(n.START_CHARS_HINT=t.start_chars_hint);return n}(t)}var J=Q({name:"EOF",pattern:X.NA});function tt(t,e,n,r,i,o,a,s){return{image:e,startOffset:n,endOffset:r,startLine:i,endLine:o,startColumn:a,endColumn:s,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function et(t,e){return D(t,e)}B([J]);var nt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rt=function(){function t(t){this._definition=t}return Object.defineProperty(t.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),t.prototype.accept=function(t){t.visit(this),Object(i.u)(this.definition,(function(e){e.accept(t)}))},t}(),it=function(t){function e(e){var n=t.call(this,[])||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),Object.defineProperty(e.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(rt),ot=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.orgText="",Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),at=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.ignoreAmbiguities=!1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),st=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ct=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),lt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ut=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ht=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ft=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(rt),pt=function(){function t(t){this.idx=1,Object(i.f)(this,Object(i.N)(t,(function(t){return void 0!==t})))}return t.prototype.accept=function(t){t.visit(this)},t}();function dt(t){return Object(i.I)(t,mt)}function mt(t){function e(t){return Object(i.I)(t,mt)}if(t instanceof it)return{type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};if(t instanceof at)return{type:"Alternative",definition:e(t.definition)};if(t instanceof st)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof ct)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof lt)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:mt(new pt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ht)return{type:"RepetitionWithSeparator",idx:t.idx,separator:mt(new pt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ut)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof ft)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof pt){var n={type:"Terminal",name:t.terminalType.name,label:$(t.terminalType),idx:t.idx},r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=Object(i.D)(r)?r.source:r),n}if(t instanceof ot)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var gt=function(){function t(){}return t.prototype.walk=function(t,e){var n=this;void 0===e&&(e=[]),Object(i.u)(t.definition,(function(r,o){var a=Object(i.m)(t.definition,o+1);if(r instanceof it)n.walkProdRef(r,a,e);else if(r instanceof pt)n.walkTerminal(r,a,e);else if(r instanceof at)n.walkFlat(r,a,e);else if(r instanceof st)n.walkOption(r,a,e);else if(r instanceof ct)n.walkAtLeastOne(r,a,e);else if(r instanceof lt)n.walkAtLeastOneSep(r,a,e);else if(r instanceof ht)n.walkManySep(r,a,e);else if(r instanceof ut)n.walkMany(r,a,e);else{if(!(r instanceof ft))throw Error("non exhaustive match");n.walkOr(r,a,e)}}))},t.prototype.walkTerminal=function(t,e,n){},t.prototype.walkProdRef=function(t,e,n){},t.prototype.walkFlat=function(t,e,n){var r=e.concat(n);this.walk(t,r)},t.prototype.walkOption=function(t,e,n){var r=e.concat(n);this.walk(t,r)},t.prototype.walkAtLeastOne=function(t,e,n){var r=[new st({definition:t.definition})].concat(e,n);this.walk(t,r)},t.prototype.walkAtLeastOneSep=function(t,e,n){var r=vt(t,e,n);this.walk(t,r)},t.prototype.walkMany=function(t,e,n){var r=[new st({definition:t.definition})].concat(e,n);this.walk(t,r)},t.prototype.walkManySep=function(t,e,n){var r=vt(t,e,n);this.walk(t,r)},t.prototype.walkOr=function(t,e,n){var r=this,o=e.concat(n);Object(i.u)(t.definition,(function(t){var e=new at({definition:[t]});r.walk(e,o)}))},t}();function vt(t,e,n){return[new st({definition:[new pt({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}var yt=function(){function t(){}return t.prototype.visit=function(t){var e=t;switch(e.constructor){case it:return this.visitNonTerminal(e);case at:return this.visitAlternative(e);case st:return this.visitOption(e);case ct:return this.visitRepetitionMandatory(e);case lt:return this.visitRepetitionMandatoryWithSeparator(e);case ht:return this.visitRepetitionWithSeparator(e);case ut:return this.visitRepetition(e);case ft:return this.visitAlternation(e);case pt:return this.visitTerminal(e);case ot:return this.visitRule(e);default:throw Error("non exhaustive match")}},t.prototype.visitNonTerminal=function(t){},t.prototype.visitAlternative=function(t){},t.prototype.visitOption=function(t){},t.prototype.visitRepetition=function(t){},t.prototype.visitRepetitionMandatory=function(t){},t.prototype.visitRepetitionMandatoryWithSeparator=function(t){},t.prototype.visitRepetitionWithSeparator=function(t){},t.prototype.visitAlternation=function(t){},t.prototype.visitTerminal=function(t){},t.prototype.visitRule=function(t){},t}(),bt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Tt(t,e){return void 0===e&&(e=[]),!!(t instanceof st||t instanceof ut||t instanceof ht)||(t instanceof ft?Object(i.Q)(t.definition,(function(t){return Tt(t,e)})):!(t instanceof it&&Object(i.j)(e,t))&&(t instanceof rt&&(t instanceof it&&e.push(t),Object(i.o)(t.definition,(function(t){return Tt(t,e)})))))}function Ot(t){if(t instanceof it)return"SUBRULE";if(t instanceof st)return"OPTION";if(t instanceof ft)return"OR";if(t instanceof ct)return"AT_LEAST_ONE";if(t instanceof lt)return"AT_LEAST_ONE_SEP";if(t instanceof ht)return"MANY_SEP";if(t instanceof ut)return"MANY";if(t instanceof pt)return"CONSUME";throw Error("non exhaustive match")}var St=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.separator="-",e.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},e}return bt(e,t),e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var e=t.terminalType.name+this.separator+"Terminal";Object(i.w)(this.dslMethods,e)||(this.dslMethods[e]=[]),this.dslMethods[e].push(t)},e.prototype.visitNonTerminal=function(t){var e=t.nonTerminalName+this.separator+"Terminal";Object(i.w)(this.dslMethods,e)||(this.dslMethods[e]=[]),this.dslMethods[e].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(yt),xt=new St;function Et(t){if(t instanceof it)return Et(t.referencedRule);if(t instanceof pt)return[t.terminalType];if(function(t){return t instanceof at||t instanceof st||t instanceof ut||t instanceof ct||t instanceof lt||t instanceof ht||t instanceof pt||t instanceof ot}(t))return function(t){var e,n=[],r=t.definition,o=0,a=r.length>o,s=!0;for(;a&&s;)e=r[o],s=Tt(e),n=n.concat(Et(e)),o+=1,a=r.length>o;return Object(i.T)(n)}(t);if(function(t){return t instanceof ft}(t))return function(t){var e=Object(i.I)(t.definition,(function(t){return Et(t)}));return Object(i.T)(Object(i.t)(e))}(t);throw Error("non exhaustive match")}var Ct="_~IN~_",kt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wt=function(t){function e(e){var n=t.call(this)||this;return n.topProd=e,n.follows={},n}return kt(e,t),e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,e,n){},e.prototype.walkProdRef=function(t,e,n){var r,i,o=(r=t.referencedRule,i=t.idx,r.name+i+Ct+this.topProd.name),a=e.concat(n),s=Et(new at({definition:a}));this.follows[o]=s},e}(gt);var Nt={buildMismatchTokenMessage:function(t){var e=t.expected,n=t.actual;t.previous,t.ruleName;return"Expecting "+(Z(e)?"--\x3e "+$(e)+" <--":"token of type --\x3e "+e.name+" <--")+" but found --\x3e '"+n.image+"' <--"},buildNotAllInputParsedMessage:function(t){var e=t.firstRedundant;t.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(t){var e=t.expectedPathsPerAlt,n=t.actual,r=(t.previous,t.customUserDescription),o=(t.ruleName,"\nbut found: '"+Object(i.s)(n).image+"'");if(r)return"Expecting: "+r+o;var a=Object(i.O)(e,(function(t,e){return t.concat(e)}),[]),s=Object(i.I)(a,(function(t){return"["+Object(i.I)(t,(function(t){return $(t)})).join(", ")+"]"}));return"Expecting: "+("one of these possible Token sequences:\n"+Object(i.I)(s,(function(t,e){return" "+(e+1)+". "+t})).join("\n"))+o},buildEarlyExitMessage:function(t){var e=t.expectedIterationPaths,n=t.actual,r=t.customUserDescription,o=(t.ruleName,"\nbut found: '"+Object(i.s)(n).image+"'");return r?"Expecting: "+r+o:"Expecting: "+("expecting at least one iteration which starts with one of these possible Token sequences::\n <"+Object(i.I)(e,(function(t){return"["+Object(i.I)(t,(function(t){return $(t)})).join(",")+"]"})).join(" ,")+">")+o}};Object.freeze(Nt);var Lt={buildRuleNotFoundError:function(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+"<-\ninside top level rule: ->"+t.name+"<-"}},At={buildDuplicateFoundError:function(t,e){var n,r=t.name,o=Object(i.s)(e),a=o.idx,s=Ot(o),c=(n=o)instanceof pt?n.terminalType.name:n instanceof it?n.nonTerminalName:"",l="->"+s+(a>0?a:"")+"<- "+(c?"with argument: ->"+c+"<-":"")+"\n appears more than once ("+e.length+" times) in the top level rule: ->"+r+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return l=(l=l.replace(/[ \t]+/g," ")).replace(/\s\s+/g,"\n")},buildNamespaceConflictError:function(t){return"Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+t.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter."},buildAlternationPrefixAmbiguityError:function(t){var e=Object(i.I)(t.prefixPath,(function(t){return $(t)})).join(", "),n=0===t.alternation.idx?"":t.alternation.idx;return"Ambiguous alternatives: <"+t.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin inside <"+t.topLevelRule.name+"> Rule,\n<"+e+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details."},buildAlternationAmbiguityError:function(t){var e=Object(i.I)(t.prefixPath,(function(t){return $(t)})).join(", "),n=0===t.alternation.idx?"":t.alternation.idx,r="Ambiguous Alternatives Detected: <"+t.ambiguityIndices.join(" ,")+"> in inside <"+t.topLevelRule.name+"> Rule,\n<"+e+"> may appears as a prefix path in all these alternatives.\n";return r+="See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."},buildEmptyRepetitionError:function(t){var e=Ot(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),"The repetition <"+e+"> within Rule <"+t.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop."},buildTokenNameError:function(t){return"Invalid Grammar Token name: ->"+t.tokenType.name+"<- it must match the pattern: ->"+t.expectedPattern.toString()+"<-"},buildEmptyAlternationError:function(t){return"Ambiguous empty alternative: <"+(t.emptyChoiceIdx+1)+"> in inside <"+t.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative."},buildTooManyAlternativesError:function(t){return"An Alternation cannot have more than 256 alternatives:\n inside <"+t.topLevelRule.name+"> Rule.\n has "+(t.alternation.definition.length+1)+" alternatives."},buildLeftRecursionError:function(t){var e=t.topLevelRule.name;return"Left Recursion found in grammar.\nrule: <"+e+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+(e+" --\x3e "+i.I(t.leftRecursionPath,(function(t){return t.name})).concat([e]).join(" --\x3e "))+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."},buildInvalidRuleNameError:function(t){return"Invalid grammar rule name: ->"+t.topLevelRule.name+"<- it must match the pattern: ->"+t.expectedPattern.toString()+"<-"},buildDuplicateRuleNameError:function(t){return"Duplicate definition, rule: ->"+(t.topLevelRule instanceof ot?t.topLevelRule.name:t.topLevelRule)+"<- is already defined in the grammar: ->"+t.grammarName+"<-"}},It=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();var Rt=function(t){function e(e,n){var r=t.call(this)||this;return r.nameToTopRule=e,r.errMsgProvider=n,r.errors=[],r}return It(e,t),e.prototype.resolveRefs=function(){var t=this;Object(i.u)(Object(i.U)(this.nameToTopRule),(function(e){t.currTopLevel=e,e.accept(t)}))},e.prototype.visitNonTerminal=function(t){var e=this.nameToTopRule[t.nonTerminalName];if(e)t.referencedRule=e;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:Ze.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(yt),Mt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_t=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.path=n,r.nextTerminalName="",r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return Mt(e,t),e.prototype.walkTerminal=function(t,e,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var r=e.concat(n),i=new at({definition:r});this.possibleTokTypes=Et(i),this.found=!0}},e}(function(t){function e(e,n){var r=t.call(this)||this;return r.topProd=e,r.path=n,r.possibleTokTypes=[],r.nextProductionName="",r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return Mt(e,t),e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Object(i.g)(this.path.ruleStack).reverse(),this.occurrenceStack=Object(i.g)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(e,n){void 0===n&&(n=[]),this.found||t.prototype.walk.call(this,e,n)},e.prototype.walkProdRef=function(t,e,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var r=e.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,r)}},e.prototype.updateExpectedNext=function(){Object(i.A)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(gt)),Pt=function(t){function e(e,n){var r=t.call(this)||this;return r.topRule=e,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return Mt(e,t),e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(gt),jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkMany=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkMany.call(this,e,n,r)},e}(Pt),Dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkManySep=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkManySep.call(this,e,n,r)},e}(Pt),Ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkAtLeastOne=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkAtLeastOne.call(this,e,n,r)},e}(Pt),Ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkAtLeastOneSep=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkAtLeastOneSep.call(this,e,n,r)},e}(Pt);function Wt(t,e,n){void 0===n&&(n=[]),n=Object(i.g)(n);var r=[],o=0;function a(a){var s=Wt(a.concat(Object(i.m)(t,o+1)),e,n);return r.concat(s)}for(;n.length=0;k--){var w={idx:p,def:g.definition[k].definition.concat(Object(i.m)(f)),ruleStack:d,occurrenceStack:m};u.push(w),u.push("EXIT_ALTERNATIVE")}else if(g instanceof at)u.push({idx:p,def:g.definition.concat(Object(i.m)(f)),ruleStack:d,occurrenceStack:m});else{if(!(g instanceof ot))throw Error("non exhaustive match");u.push(Ht(g,p,d,m))}}}else a&&Object(i.H)(u).idx<=c&&u.pop()}return l}function Ht(t,e,n,r){var o=Object(i.g)(n);o.push(t.name);var a=Object(i.g)(r);return a.push(1),{idx:e,def:t.definition,ruleStack:o,occurrenceStack:a}}var Gt,zt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"}(Gt||(Gt={}));var Vt=function(t){function e(e,n,r){var i=t.call(this)||this;return i.topProd=e,i.targetOccurrence=n,i.targetProdType=r,i}return zt(e,t),e.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},e.prototype.checkIsTarget=function(t,e,n,r){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=n.concat(r),!0)},e.prototype.walkOption=function(e,n,r){this.checkIsTarget(e,Gt.OPTION,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkAtLeastOne=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION_MANDATORY,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkAtLeastOneSep=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkMany=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkManySep=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION_WITH_SEPARATOR,n,r)||t.prototype.walkOption.call(this,e,n,r)},e}(gt),Kt=function(t){function e(e,n,r){var i=t.call(this)||this;return i.targetOccurrence=e,i.targetProdType=n,i.targetRef=r,i.result=[],i}return zt(e,t),e.prototype.checkIsTarget=function(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)},e.prototype.visitOption=function(t){this.checkIsTarget(t,Gt.OPTION)},e.prototype.visitRepetition=function(t){this.checkIsTarget(t,Gt.REPETITION)},e.prototype.visitRepetitionMandatory=function(t){this.checkIsTarget(t,Gt.REPETITION_MANDATORY)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.checkIsTarget(t,Gt.REPETITION_MANDATORY_WITH_SEPARATOR)},e.prototype.visitRepetitionWithSeparator=function(t){this.checkIsTarget(t,Gt.REPETITION_WITH_SEPARATOR)},e.prototype.visitAlternation=function(t){this.checkIsTarget(t,Gt.ALTERNATION)},e}(yt);function Yt(t){for(var e=new Array(t),n=0;n1}));return i.I(i.U(a),(function(n){var r=i.s(n),o=e.buildDuplicateFoundError(t,n),a=Ot(r),s={message:o,type:Ze.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:a,occurrence:r.idx},c=ie(r);return c&&(s.parameter=c),s}))}(t,r)})),s=i.I(t,(function(t){return function t(e,n,r,o){void 0===o&&(o=[]);var a=[],s=function t(e){var n=[];if(i.A(e))return n;var r=i.s(e);if(r instanceof it)n.push(r.referencedRule);else if(r instanceof at||r instanceof st||r instanceof ct||r instanceof lt||r instanceof ht||r instanceof ut)n=n.concat(t(r.definition));else if(r instanceof ft)n=i.t(i.I(r.definition,(function(e){return t(e.definition)})));else if(!(r instanceof pt))throw Error("non exhaustive match");var o=Tt(r),a=e.length>1;if(o&&a){var s=i.m(e);return n.concat(t(s))}return n}(n.definition);if(i.A(s))return[];var c=e.name;i.j(s,e)&&a.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:o}),type:Ze.LEFT_RECURSION,ruleName:c});var l=i.l(s,o.concat([e])),u=i.I(l,(function(n){var a=i.g(o);return a.push(n),t(e,n,r,a)}));return a.concat(i.t(u))}(t,t,r)})),c=[],l=[],u=[];Object(i.o)(s,i.A)&&(c=Object(i.I)(t,(function(t){return function(t,e){var n=new se;t.accept(n);var r=n.alternations;return i.O(r,(function(n,r){var o=i.n(r.definition),a=i.I(o,(function(n,o){var a=Bt([n],[],null,1);return i.A(a)?{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:r,emptyChoiceIdx:o}),type:Ze.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:r.idx,alternative:o+1}:null}));return n.concat(i.i(a))}),[])}(t,r)})),l=Object(i.I)(t,(function(t){return function(t,e,n){var r=new se;t.accept(r);var o=r.alternations;return o=Object(i.P)(o,(function(t){return!0===t.ignoreAmbiguities})),i.O(o,(function(r,o){var a=o.idx,s=o.maxLookahead||e,c=Zt(a,t,s,o),l=function(t,e,n,r){var o=[],a=Object(i.O)(t,(function(n,r,a){return!0===e.definition[a].ignoreAmbiguities||Object(i.u)(r,(function(r){var s=[a];Object(i.u)(t,(function(t,n){a!==n&&Jt(t,r)&&!0!==e.definition[n].ignoreAmbiguities&&s.push(n)})),s.length>1&&!Jt(o,r)&&(o.push(r),n.push({alts:s,path:r}))})),n}),[]);return i.I(a,(function(t){var o=Object(i.I)(t.alts,(function(t){return t+1}));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:o,prefixPath:t.path}),type:Ze.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:[t.alts]}}))}(c,o,t,n),u=function(t,e,n,r){var o=[],a=Object(i.O)(t,(function(t,e,n){var r=Object(i.I)(e,(function(t){return{idx:n,path:t}}));return t.concat(r)}),[]);return Object(i.u)(a,(function(t){if(!0!==e.definition[t.idx].ignoreAmbiguities){var s=t.idx,c=t.path,l=Object(i.r)(a,(function(t){return!0!==e.definition[t.idx].ignoreAmbiguities&&t.idx255&&n.push({message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:r}),type:Ze.TOO_MANY_ALTS,ruleName:t.name,occurrence:r.idx}),n}),[])}(t,r)})),d=Object(i.I)(t,(function(t){return function(t,e){var n=[],r=t.name;r.match(ae)||n.push({message:e.buildInvalidRuleNameError({topLevelRule:t,expectedPattern:ae}),type:Ze.INVALID_RULE_NAME,ruleName:r});return n}(t,r)})),m=Object(i.I)(t,(function(e){return function(t,e,n,r){var o=[];if(Object(i.O)(e,(function(e,n){return n.name===t.name?e+1:e}),0)>1){var a=r.buildDuplicateRuleNameError({topLevelRule:t,grammarName:n});o.push({message:a,type:Ze.DUPLICATE_RULE_NAME,ruleName:t.name})}return o}(e,t,o,r)}));return i.t(a.concat(f,u,s,c,l,h,p,d,m))}function re(t){return Ot(t)+"_#_"+t.idx+"_#_"+ie(t)}function ie(t){return t instanceof pt?t.terminalType.name:t instanceof it?t.nonTerminalName:""}var oe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allProductions=[],e}return ee(e,t),e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}(yt),ae=/^[a-zA-Z_]\w*$/;var se=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.alternations=[],e}return ee(e,t),e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}(yt);var ce=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allProductions=[],e}return ee(e,t),e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}(yt);function le(t){t=Object(i.k)(t,{errMsgProvider:Lt});var e,n,r,o={};return Object(i.u)(t.rules,(function(t){o[t.name]=t})),e=o,n=t.errMsgProvider,(r=new Rt(e,n)).resolveRefs(),r.errors}function ue(t){return ne((t=Object(i.k)(t,{errMsgProvider:At})).rules,t.maxLookahead,t.tokenTypes,t.errMsgProvider,t.grammarName)}function he(t){Object(i.u)(t.rules,(function(t){var e=new St;t.accept(e),Object(i.u)(e.dslMethods,(function(t){Object(i.u)(t,(function(t,e){t.idx=e+1}))}))}))}var fe=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"];function pe(t){return Object(i.j)(fe,t.name)}function de(t,e,n){this.name="MismatchedTokenException",this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}function me(t,e,n){this.name="NoViableAltException",this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}function ge(t,e){this.name="NotAllInputParsedException",this.message=t,this.token=e,this.resyncedTokens=[]}function ve(t,e,n){this.name="EarlyExitException",this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}Object.freeze(fe),de.prototype=Error.prototype,me.prototype=Error.prototype,ge.prototype=Error.prototype,ve.prototype=Error.prototype;var ye={};function be(t){this.name="InRuleRecoveryException",this.message=t}be.prototype=Error.prototype;var Te=function(){function t(){}return t.prototype.initRecoverable=function(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object(i.w)(t,"recoveryEnabled")?t.recoveryEnabled:Qe.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Oe)},t.prototype.getTokenToInsert=function(t){var e=tt(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return e.isInsertedInRecovery=!0,e},t.prototype.canTokenTypeBeInsertedInRecovery=function(t){return!0},t.prototype.tryInRepetitionRecovery=function(t,e,n,r){for(var o=this,a=this.findReSyncTokenType(),s=this.exportLexerState(),c=[],l=!1,u=this.LA(1),h=this.LA(1),f=function(){var t=o.LA(0),e=new de(o.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:u,previous:t,ruleName:o.getCurrRuleFullName()}),u,o.LA(0));e.resyncedTokens=Object(i.n)(c),o.SAVE_ERROR(e)};!l;){if(this.tokenMatcher(h,r))return void f();if(n.call(this))return f(),void t.apply(this,e);this.tokenMatcher(h,a)?l=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,c))}this.importLexerState(s)},t.prototype.shouldInRepetitionRecoveryBeTried=function(t,e,n){return!1!==n&&(void 0!==t&&void 0!==e&&(!this.tokenMatcher(this.LA(1),t)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e)))))},t.prototype.getFollowsForInRuleRecovery=function(t,e){var n=this.getCurrentGrammarPath(t,e);return this.getNextPossibleTokenTypes(n)},t.prototype.tryInRuleRecovery=function(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new be("sad sad panda")},t.prototype.canPerformInRuleRecovery=function(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)},t.prototype.canRecoverWithSingleTokenInsertion=function(t,e){var n=this;if(!this.canTokenTypeBeInsertedInRecovery(t))return!1;if(Object(i.A)(e))return!1;var r=this.LA(1);return void 0!==Object(i.q)(e,(function(t){return n.tokenMatcher(r,t)}))},t.prototype.canRecoverWithSingleTokenDeletion=function(t){return this.tokenMatcher(this.LA(2),t)},t.prototype.isInCurrentRuleReSyncSet=function(t){var e=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(e);return Object(i.j)(n,t)},t.prototype.findReSyncTokenType=function(){for(var t=this.flattenFollowSet(),e=this.LA(1),n=2;;){var r=e.tokenType;if(Object(i.j)(t,r))return r;e=this.LA(n),n++}},t.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return ye;var t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(n)}},t.prototype.buildFullFollowKeyStack=function(){var t=this,e=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return Object(i.I)(e,(function(r,i){return 0===i?ye:{ruleName:t.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:t.shortRuleNameToFullName(e[i-1])}}))},t.prototype.flattenFollowSet=function(){var t=this,e=Object(i.I)(this.buildFullFollowKeyStack(),(function(e){return t.getFollowSetFromFollowKey(e)}));return Object(i.t)(e)},t.prototype.getFollowSetFromFollowKey=function(t){if(t===ye)return[J];var e=t.ruleName+t.idxInCallingRule+Ct+t.inRule;return this.resyncFollows[e]},t.prototype.addToResyncTokens=function(t,e){return this.tokenMatcher(t,J)||e.push(t),e},t.prototype.reSyncTo=function(t){for(var e=[],n=this.LA(1);!1===this.tokenMatcher(n,t);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,e);return Object(i.n)(e)},t.prototype.attemptInRepetitionRecovery=function(t,e,n,r,i,o,a){},t.prototype.getCurrentGrammarPath=function(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Object(i.g)(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}},t.prototype.getHumanReadableRuleStack=function(){var t=this;return Object(i.I)(this.RULE_STACK,(function(e){return t.shortRuleNameToFullName(e)}))},t}();function Oe(t,e,n,r,i,o,a){var s=this.getKeyForAutomaticLookahead(r,i),c=this.firstAfterRepMap[s];if(void 0===c){var l=this.getCurrRuleFullName();c=new o(this.getGAstProductions()[l],i).startWalking(),this.firstAfterRepMap[s]=c}var u=c.token,h=c.occurrence,f=c.isEndOfRule;1===this.RULE_STACK.length&&f&&void 0===u&&(u=J,h=1),this.shouldInRepetitionRecoveryBeTried(u,h,a)&&this.tryInRepetitionRecovery(t,e,n,u)}function Se(t,e,n){return n|e|t}var xe=function(){function t(){}return t.prototype.initLooksAhead=function(t){this.dynamicTokensEnabled=Object(i.w)(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:Qe.dynamicTokensEnabled,this.maxLookahead=Object(i.w)(t,"maxLookahead")?t.maxLookahead:Qe.maxLookahead,this.lookAheadFuncsCache=Object(i.z)()?new Map:[],Object(i.z)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},t.prototype.preComputeLookaheadFunctions=function(t){var e=this;Object(i.u)(t,(function(t){e.TRACE_INIT(t.name+" Rule Lookahead",(function(){var n=function(t){xt.reset(),t.accept(xt);var e=xt.dslMethods;return xt.reset(),e}(t),r=n.alternation,o=n.repetition,a=n.option,s=n.repetitionMandatory,c=n.repetitionMandatoryWithSeparator,l=n.repetitionWithSeparator;Object(i.u)(r,(function(n){var r=0===n.idx?"":n.idx;e.TRACE_INIT(""+Ot(n)+r,(function(){var r,i,o,a,s,c,l,u=(r=n.idx,i=t,o=n.maxLookahead||e.maxLookahead,a=n.hasPredicates,s=e.dynamicTokensEnabled,c=e.lookAheadBuilderForAlternatives,l=Zt(r,i,o),c(l,a,te(l)?F:D,s)),h=Se(e.fullRuleNameToShort[t.name],256,n.idx);e.setLaFuncCache(h,u)}))})),Object(i.u)(o,(function(n){e.computeLookaheadFunc(t,n.idx,768,Gt.REPETITION,n.maxLookahead,Ot(n))})),Object(i.u)(a,(function(n){e.computeLookaheadFunc(t,n.idx,512,Gt.OPTION,n.maxLookahead,Ot(n))})),Object(i.u)(s,(function(n){e.computeLookaheadFunc(t,n.idx,1024,Gt.REPETITION_MANDATORY,n.maxLookahead,Ot(n))})),Object(i.u)(c,(function(n){e.computeLookaheadFunc(t,n.idx,1536,Gt.REPETITION_MANDATORY_WITH_SEPARATOR,n.maxLookahead,Ot(n))})),Object(i.u)(l,(function(n){e.computeLookaheadFunc(t,n.idx,1280,Gt.REPETITION_WITH_SEPARATOR,n.maxLookahead,Ot(n))}))}))}))},t.prototype.computeLookaheadFunc=function(t,e,n,r,i,o){var a=this;this.TRACE_INIT(""+o+(0===e?"":e),(function(){var o=function(t,e,n,r,i,o){var a=Qt(t,e,i,n),s=te(a)?F:D;return o(a[0],s,r)}(e,t,i||a.maxLookahead,a.dynamicTokensEnabled,r,a.lookAheadBuilderForOptional),s=Se(a.fullRuleNameToShort[t.name],n,e);a.setLaFuncCache(s,o)}))},t.prototype.lookAheadBuilderForOptional=function(t,e,n){return function(t,e,n){var r=Object(i.o)(t,(function(t){return 1===t.length})),o=t.length;if(r&&!n){var a=Object(i.t)(t);if(1===a.length&&Object(i.A)(a[0].categoryMatches)){var s=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}var c=Object(i.O)(a,(function(t,e,n){return t[e.tokenTypeIdx]=!0,Object(i.u)(e.categoryMatches,(function(e){t[e]=!0})),t}),[]);return function(){var t=this.LA(1);return!0===c[t.tokenTypeIdx]}}return function(){t:for(var n=0;n on "+we(t.constructor)+" CST Visitor.",type:ke.MISSING_METHOD,methodName:e}}));return Object(i.i)(n)}(t,e),r=function(t,e){var n=[];for(var r in t)ae.test(r)&&Object(i.B)(t[r])&&!Object(i.j)(Ie,r)&&!Object(i.j)(e,r)&&n.push({msg:"Redundant visitor method: <"+r+"> on "+we(t.constructor)+" CST Visitor\nThere is no Grammar Rule corresponding to this method's name.\nFor utility methods on visitor classes use methods names that do not match /"+ae.source+"/.",type:ke.REDUNDANT_METHOD,methodName:r});return n}(t,e);return n.concat(r)}(this,e);if(!Object(i.A)(t)){var n=Object(i.I)(t,(function(t){return t.msg}));throw Error("Errors Detected in CST Visitor <"+we(this.constructor)+">:\n\t"+n.join("\n\n").replace(/\n/g,"\n\t"))}}}).constructor=n,n._RULE_NAMES=e,n}!function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"}(ke||(ke={}));var Ie=["constructor","visit","validateVisitor"];var Re=function(){function t(){}return t.prototype.initTreeBuilder=function(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=Object(i.w)(t,"nodeLocationTracking")?t.nodeLocationTracking:Qe.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ce,this.setNodeLocationFromNode=Ce,this.cstPostRule=i.b,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ee,this.setNodeLocationFromNode=Ee,this.cstPostRule=i.b,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error('Invalid config option: "'+t.nodeLocationTracking+'"');this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=i.b,this.setInitialNodeLocation=i.b}else this.cstInvocationStateUpdate=i.b,this.cstFinallyStateUpdate=i.b,this.cstPostTerminal=i.b,this.cstPostNonTerminal=i.b,this.cstPostRule=i.b},t.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(t){t.location={startOffset:NaN,endOffset:NaN}},t.prototype.setInitialNodeLocationOnlyOffsetRegular=function(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},t.prototype.setInitialNodeLocationFullRecovery=function(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.setInitialNodeLocationFullRegular=function(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.cstInvocationStateUpdate=function(t,e){var n={name:t,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},t.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},t.prototype.cstPostRuleFull=function(t){var e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==!0?(n.endOffset=e.endOffset,n.endLine=e.endLine,n.endColumn=e.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},t.prototype.cstPostRuleOnlyOffset=function(t){var e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==!0?n.endOffset=e.endOffset:n.startOffset=NaN},t.prototype.cstPostTerminal=function(t,e){var n,r,i,o=this.CST_STACK[this.CST_STACK.length-1];r=e,i=t,void 0===(n=o).children[i]?n.children[i]=[r]:n.children[i].push(r),this.setNodeLocationFromToken(o.location,e)},t.prototype.cstPostNonTerminal=function(t,e){var n=this.CST_STACK[this.CST_STACK.length-1];!function(t,e,n){void 0===t.children[e]?t.children[e]=[n]:t.children[e].push(n)}(n,e,t),this.setNodeLocationFromNode(n.location,t.location)},t.prototype.getBaseCstVisitorConstructor=function(){if(Object(i.F)(this.baseCstVisitorConstructor)){var t=Ae(this.className,Object(i.G)(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor},t.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(Object(i.F)(this.baseCstVisitorWithDefaultsConstructor)){var t=function(t,e,n){var r=function(){};Ne(r,t+"BaseSemanticsWithDefaults");var o=Object.create(n.prototype);return Object(i.u)(e,(function(t){o[t]=Le})),(r.prototype=o).constructor=r,r}(this.className,Object(i.G)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor},t.prototype.getLastExplicitRuleShortName=function(){var t=this.RULE_STACK;return t[t.length-1]},t.prototype.getPreviousExplicitRuleShortName=function(){var t=this.RULE_STACK;return t[t.length-2]},t.prototype.getLastExplicitRuleOccurrenceIndex=function(){var t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]},t}(),Me=function(){function t(){}return t.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(t.prototype,"input",{get:function(){return this.tokVector},set:function(t){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length},enumerable:!1,configurable:!0}),t.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):qe},t.prototype.LA=function(t){var e=this.currIdx+t;return e<0||this.tokVectorLength<=e?qe:this.tokVector[e]},t.prototype.consumeToken=function(){this.currIdx++},t.prototype.exportLexerState=function(){return this.currIdx},t.prototype.importLexerState=function(t){this.currIdx=t},t.prototype.resetLexerState=function(){this.currIdx=-1},t.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},t.prototype.getLexerPosition=function(){return this.exportLexerState()},t}(),_e=function(){function t(){}return t.prototype.ACTION=function(t){return t.call(this)},t.prototype.consume=function(t,e,n){return this.consumeInternal(e,t,n)},t.prototype.subrule=function(t,e,n){return this.subruleInternal(e,t,n)},t.prototype.option=function(t,e){return this.optionInternal(e,t)},t.prototype.or=function(t,e){return this.orInternal(e,t)},t.prototype.many=function(t,e){return this.manyInternal(t,e)},t.prototype.atLeastOne=function(t,e){return this.atLeastOneInternal(t,e)},t.prototype.CONSUME=function(t,e){return this.consumeInternal(t,0,e)},t.prototype.CONSUME1=function(t,e){return this.consumeInternal(t,1,e)},t.prototype.CONSUME2=function(t,e){return this.consumeInternal(t,2,e)},t.prototype.CONSUME3=function(t,e){return this.consumeInternal(t,3,e)},t.prototype.CONSUME4=function(t,e){return this.consumeInternal(t,4,e)},t.prototype.CONSUME5=function(t,e){return this.consumeInternal(t,5,e)},t.prototype.CONSUME6=function(t,e){return this.consumeInternal(t,6,e)},t.prototype.CONSUME7=function(t,e){return this.consumeInternal(t,7,e)},t.prototype.CONSUME8=function(t,e){return this.consumeInternal(t,8,e)},t.prototype.CONSUME9=function(t,e){return this.consumeInternal(t,9,e)},t.prototype.SUBRULE=function(t,e){return this.subruleInternal(t,0,e)},t.prototype.SUBRULE1=function(t,e){return this.subruleInternal(t,1,e)},t.prototype.SUBRULE2=function(t,e){return this.subruleInternal(t,2,e)},t.prototype.SUBRULE3=function(t,e){return this.subruleInternal(t,3,e)},t.prototype.SUBRULE4=function(t,e){return this.subruleInternal(t,4,e)},t.prototype.SUBRULE5=function(t,e){return this.subruleInternal(t,5,e)},t.prototype.SUBRULE6=function(t,e){return this.subruleInternal(t,6,e)},t.prototype.SUBRULE7=function(t,e){return this.subruleInternal(t,7,e)},t.prototype.SUBRULE8=function(t,e){return this.subruleInternal(t,8,e)},t.prototype.SUBRULE9=function(t,e){return this.subruleInternal(t,9,e)},t.prototype.OPTION=function(t){return this.optionInternal(t,0)},t.prototype.OPTION1=function(t){return this.optionInternal(t,1)},t.prototype.OPTION2=function(t){return this.optionInternal(t,2)},t.prototype.OPTION3=function(t){return this.optionInternal(t,3)},t.prototype.OPTION4=function(t){return this.optionInternal(t,4)},t.prototype.OPTION5=function(t){return this.optionInternal(t,5)},t.prototype.OPTION6=function(t){return this.optionInternal(t,6)},t.prototype.OPTION7=function(t){return this.optionInternal(t,7)},t.prototype.OPTION8=function(t){return this.optionInternal(t,8)},t.prototype.OPTION9=function(t){return this.optionInternal(t,9)},t.prototype.OR=function(t){return this.orInternal(t,0)},t.prototype.OR1=function(t){return this.orInternal(t,1)},t.prototype.OR2=function(t){return this.orInternal(t,2)},t.prototype.OR3=function(t){return this.orInternal(t,3)},t.prototype.OR4=function(t){return this.orInternal(t,4)},t.prototype.OR5=function(t){return this.orInternal(t,5)},t.prototype.OR6=function(t){return this.orInternal(t,6)},t.prototype.OR7=function(t){return this.orInternal(t,7)},t.prototype.OR8=function(t){return this.orInternal(t,8)},t.prototype.OR9=function(t){return this.orInternal(t,9)},t.prototype.MANY=function(t){this.manyInternal(0,t)},t.prototype.MANY1=function(t){this.manyInternal(1,t)},t.prototype.MANY2=function(t){this.manyInternal(2,t)},t.prototype.MANY3=function(t){this.manyInternal(3,t)},t.prototype.MANY4=function(t){this.manyInternal(4,t)},t.prototype.MANY5=function(t){this.manyInternal(5,t)},t.prototype.MANY6=function(t){this.manyInternal(6,t)},t.prototype.MANY7=function(t){this.manyInternal(7,t)},t.prototype.MANY8=function(t){this.manyInternal(8,t)},t.prototype.MANY9=function(t){this.manyInternal(9,t)},t.prototype.MANY_SEP=function(t){this.manySepFirstInternal(0,t)},t.prototype.MANY_SEP1=function(t){this.manySepFirstInternal(1,t)},t.prototype.MANY_SEP2=function(t){this.manySepFirstInternal(2,t)},t.prototype.MANY_SEP3=function(t){this.manySepFirstInternal(3,t)},t.prototype.MANY_SEP4=function(t){this.manySepFirstInternal(4,t)},t.prototype.MANY_SEP5=function(t){this.manySepFirstInternal(5,t)},t.prototype.MANY_SEP6=function(t){this.manySepFirstInternal(6,t)},t.prototype.MANY_SEP7=function(t){this.manySepFirstInternal(7,t)},t.prototype.MANY_SEP8=function(t){this.manySepFirstInternal(8,t)},t.prototype.MANY_SEP9=function(t){this.manySepFirstInternal(9,t)},t.prototype.AT_LEAST_ONE=function(t){this.atLeastOneInternal(0,t)},t.prototype.AT_LEAST_ONE1=function(t){return this.atLeastOneInternal(1,t)},t.prototype.AT_LEAST_ONE2=function(t){this.atLeastOneInternal(2,t)},t.prototype.AT_LEAST_ONE3=function(t){this.atLeastOneInternal(3,t)},t.prototype.AT_LEAST_ONE4=function(t){this.atLeastOneInternal(4,t)},t.prototype.AT_LEAST_ONE5=function(t){this.atLeastOneInternal(5,t)},t.prototype.AT_LEAST_ONE6=function(t){this.atLeastOneInternal(6,t)},t.prototype.AT_LEAST_ONE7=function(t){this.atLeastOneInternal(7,t)},t.prototype.AT_LEAST_ONE8=function(t){this.atLeastOneInternal(8,t)},t.prototype.AT_LEAST_ONE9=function(t){this.atLeastOneInternal(9,t)},t.prototype.AT_LEAST_ONE_SEP=function(t){this.atLeastOneSepFirstInternal(0,t)},t.prototype.AT_LEAST_ONE_SEP1=function(t){this.atLeastOneSepFirstInternal(1,t)},t.prototype.AT_LEAST_ONE_SEP2=function(t){this.atLeastOneSepFirstInternal(2,t)},t.prototype.AT_LEAST_ONE_SEP3=function(t){this.atLeastOneSepFirstInternal(3,t)},t.prototype.AT_LEAST_ONE_SEP4=function(t){this.atLeastOneSepFirstInternal(4,t)},t.prototype.AT_LEAST_ONE_SEP5=function(t){this.atLeastOneSepFirstInternal(5,t)},t.prototype.AT_LEAST_ONE_SEP6=function(t){this.atLeastOneSepFirstInternal(6,t)},t.prototype.AT_LEAST_ONE_SEP7=function(t){this.atLeastOneSepFirstInternal(7,t)},t.prototype.AT_LEAST_ONE_SEP8=function(t){this.atLeastOneSepFirstInternal(8,t)},t.prototype.AT_LEAST_ONE_SEP9=function(t){this.atLeastOneSepFirstInternal(9,t)},t.prototype.RULE=function(t,e,n){if(void 0===n&&(n=Je),Object(i.j)(this.definedRulesNames,t)){var r={message:At.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Ze.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(r)}this.definedRulesNames.push(t);var o=this.defineRule(t,e,n);return this[t]=o,o},t.prototype.OVERRIDE_RULE=function(t,e,n){void 0===n&&(n=Je);var r,o,a,s,c,l=[];l=l.concat((r=t,o=this.definedRulesNames,a=this.className,c=[],i.j(o,r)||(s="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+a+"<-as it is not defined in any of the super grammars ",c.push({message:s,type:Ze.INVALID_RULE_OVERRIDE,ruleName:r})),c)),this.definitionErrors.push.apply(this.definitionErrors,l);var u=this.defineRule(t,e,n);return this[t]=u,u},t.prototype.BACKTRACK=function(t,e){return function(){this.isBackTrackingStack.push(1);var n=this.saveRecogState();try{return t.apply(this,e),!0}catch(t){if(pe(t))return!1;throw t}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}},t.prototype.getGAstProductions=function(){return this.gastProductionsCache},t.prototype.getSerializedGastProductions=function(){return dt(Object(i.U)(this.gastProductionsCache))},t}(),Pe=function(){function t(){}return t.prototype.initRecognizerEngine=function(t,e){if(this.className=we(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=F,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Object(i.w)(e,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a property.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(Object(i.y)(t)){if(Object(i.A)(t))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof t[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(Object(i.y)(t))this.tokensMap=Object(i.O)(t,(function(t,e){return t[e.name]=e,t}),{});else if(Object(i.w)(t,"modes")&&Object(i.o)(Object(i.t)(Object(i.U)(t.modes)),z)){var n=Object(i.t)(Object(i.U)(t.modes)),r=Object(i.T)(n);this.tokensMap=Object(i.O)(r,(function(t,e){return t[e.name]=e,t}),{})}else{if(!Object(i.C)(t))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Object(i.h)(t)}this.tokensMap.EOF=J;var o=Object(i.o)(Object(i.U)(t),(function(t){return Object(i.A)(t.categoryMatches)}));this.tokenMatcher=o?F:D,B(Object(i.U)(this.tokensMap))},t.prototype.defineRule=function(t,e,n){if(this.selfAnalysisDone)throw Error("Grammar rule <"+t+"> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");var r,o=Object(i.w)(n,"resyncEnabled")?n.resyncEnabled:Je.resyncEnabled,a=Object(i.w)(n,"recoveryValueFunc")?n.recoveryValueFunc:Je.recoveryValueFunc,s=this.ruleShortNameIdx<<12;function c(t){try{if(!0===this.outputCst){e.apply(this,t);var n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}return e.apply(this,t)}catch(t){return this.invokeRuleCatch(t,o,a)}finally{this.ruleFinallyStateUpdate()}}this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=t,this.fullRuleNameToShort[t]=s;return(r=function(e,n){return void 0===e&&(e=0),this.ruleInvocationStateUpdate(s,t,e),c.call(this,n)}).ruleName=t,r.originalGrammarAction=e,r},t.prototype.invokeRuleCatch=function(t,e,n){var r=1===this.RULE_STACK.length,i=e&&!this.isBackTracking()&&this.recoveryEnabled;if(pe(t)){var o=t;if(i){var a,s=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(s))return o.resyncedTokens=this.reSyncTo(s),this.outputCst?((a=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,a):n();throw this.outputCst&&((a=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,o.partialCstResult=a),o}if(r)return this.moveToTerminatedState(),n();throw o}throw t},t.prototype.optionInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,n)},t.prototype.optionInternalLogic=function(t,e,n){var r,i,o=this,a=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,void 0!==(i=t.GATE)){var s=a;a=function(){return i.call(o)&&s.call(o)}}}else r=t;if(!0===a.call(this))return r.call(this)},t.prototype.atLeastOneInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,e,n)},t.prototype.atLeastOneInternalLogic=function(t,e,n){var r,i,o=this,a=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,void 0!==(i=e.GATE)){var s=a;a=function(){return i.call(o)&&s.call(o)}}}else r=e;if(!0!==a.call(this))throw this.raiseEarlyExitException(t,Gt.REPETITION_MANDATORY,e.ERR_MSG);for(var c=this.doSingleRepetition(r);!0===a.call(this)&&!0===c;)c=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,e],a,1024,t,Ft)},t.prototype.atLeastOneSepFirstInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,e,n)},t.prototype.atLeastOneSepFirstInternalLogic=function(t,e,n){var r=this,i=e.DEF,o=e.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(t,Gt.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);i.call(this);for(var a=function(){return r.tokenMatcher(r.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,a,i,Ut],a,1536,t,Ut)},t.prototype.manyInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,n)},t.prototype.manyInternalLogic=function(t,e,n){var r,i,o=this,a=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,void 0!==(i=e.GATE)){var s=a;a=function(){return i.call(o)&&s.call(o)}}}else r=e;for(var c=!0;!0===a.call(this)&&!0===c;)c=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[t,e],a,768,t,jt,c)},t.prototype.manySepFirstInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,e,n)},t.prototype.manySepFirstInternalLogic=function(t,e,n){var r=this,i=e.DEF,o=e.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){i.call(this);for(var a=function(){return r.tokenMatcher(r.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,a,i,Dt],a,1280,t,Dt)}},t.prototype.repetitionSepSecondInternal=function(t,e,n,r,i){for(;n();)this.CONSUME(e),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,n,r,i],n,1536,t,i)},t.prototype.doSingleRepetition=function(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e},t.prototype.orInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(256,e),r=Object(i.y)(t)?t:t.DEF,o=this.getLaFuncFromCache(n).call(this,r);if(void 0!==o)return r[o].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)},t.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){var t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new ge(e,t))}},t.prototype.subruleInternal=function(t,e,n){var r;try{var i=void 0!==n?n.ARGS:void 0;return r=t.call(this,e,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:t.ruleName),r}catch(e){this.subruleInternalError(e,n,t.ruleName)}},t.prototype.subruleInternalError=function(t,e,n){throw pe(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:n),delete t.partialCstResult),t},t.prototype.consumeInternal=function(t,e,n){var r;try{var i=this.LA(1);!0===this.tokenMatcher(i,t)?(this.consumeToken(),r=i):this.consumeInternalError(t,i,n)}catch(n){r=this.consumeInternalRecovery(t,e,n)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:t.name,r),r},t.prototype.consumeInternalError=function(t,e,n){var r,i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new de(r,e,i))},t.prototype.consumeInternalRecovery=function(t,e,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;var r=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,r)}catch(t){throw"InRuleRecoveryException"===t.name?n:t}},t.prototype.saveRecogState=function(){var t=this.errors,e=Object(i.g)(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}},t.prototype.reloadRecogState=function(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK},t.prototype.ruleInvocationStateUpdate=function(t,e,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e,t)},t.prototype.isBackTracking=function(){return 0!==this.isBackTrackingStack.length},t.prototype.getCurrRuleFullName=function(){var t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]},t.prototype.shortRuleNameToFullName=function(t){return this.shortRuleNameToFull[t]},t.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),J)},t.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},t}(),je=function(){function t(){}return t.prototype.initErrorHandler=function(t){this._errors=[],this.errorMessageProvider=Object(i.w)(t,"errorMessageProvider")?t.errorMessageProvider:Qe.errorMessageProvider},t.prototype.SAVE_ERROR=function(t){if(pe(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Object(i.g)(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(t.prototype,"errors",{get:function(){return Object(i.g)(this._errors)},set:function(t){this._errors=t},enumerable:!1,configurable:!0}),t.prototype.raiseEarlyExitException=function(t,e,n){for(var r=this.getCurrRuleFullName(),i=Qt(t,this.getGAstProductions()[r],e,this.maxLookahead)[0],o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new ve(s,this.LA(1),this.LA(0)))},t.prototype.raiseNoAltException=function(t,e){for(var n=this.getCurrRuleFullName(),r=Zt(t,this.getGAstProductions()[n],this.maxLookahead),i=[],o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));var a=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:a,customUserDescription:e,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new me(s,this.LA(1),a))},t}(),De=function(){function t(){}return t.prototype.initContentAssist=function(){},t.prototype.computeContentAssist=function(t,e){var n=this.gastProductionsCache[t];if(Object(i.F)(n))throw Error("Rule ->"+t+"<- does not exist in this grammar.");return Bt([n],e,this.tokenMatcher,this.maxLookahead)},t.prototype.getNextPossibleTokenTypes=function(t){var e=Object(i.s)(t.ruleStack),n=this.getGAstProductions()[e];return new _t(n,t).startWalking()},t}(),Fe={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Fe);var Ue=Math.pow(2,8)-1,We=Q({name:"RECORDING_PHASE_TOKEN",pattern:X.NA});B([We]);var Be=tt(We,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Be);var He={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},Ge=function(){function t(){}return t.prototype.initGastRecorder=function(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1},t.prototype.enableRecording=function(){var t=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(function(){for(var e=function(e){var n=e>0?e:"";t["CONSUME"+n]=function(t,n){return this.consumeInternalRecord(t,e,n)},t["SUBRULE"+n]=function(t,n){return this.subruleInternalRecord(t,e,n)},t["OPTION"+n]=function(t){return this.optionInternalRecord(t,e)},t["OR"+n]=function(t){return this.orInternalRecord(t,e)},t["MANY"+n]=function(t){this.manyInternalRecord(e,t)},t["MANY_SEP"+n]=function(t){this.manySepFirstInternalRecord(e,t)},t["AT_LEAST_ONE"+n]=function(t){this.atLeastOneInternalRecord(e,t)},t["AT_LEAST_ONE_SEP"+n]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}},n=0;n<10;n++)e(n);t.consume=function(t,e,n){return this.consumeInternalRecord(e,t,n)},t.subrule=function(t,e,n){return this.subruleInternalRecord(e,t,n)},t.option=function(t,e){return this.optionInternalRecord(e,t)},t.or=function(t,e){return this.orInternalRecord(e,t)},t.many=function(t,e){this.manyInternalRecord(t,e)},t.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},t.ACTION=t.ACTION_RECORD,t.BACKTRACK=t.BACKTRACK_RECORD,t.LA=t.LA_RECORD}))},t.prototype.disableRecording=function(){var t=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(function(){for(var e=0;e<10;e++){var n=e>0?e:"";delete t["CONSUME"+n],delete t["SUBRULE"+n],delete t["OPTION"+n],delete t["OR"+n],delete t["MANY"+n],delete t["MANY_SEP"+n],delete t["AT_LEAST_ONE"+n],delete t["AT_LEAST_ONE_SEP"+n]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA}))},t.prototype.ACTION_RECORD=function(t){},t.prototype.BACKTRACK_RECORD=function(t,e){return function(){return!0}},t.prototype.LA_RECORD=function(t){return qe},t.prototype.topLevelRuleRecord=function(t,e){try{var n=new ot({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),e.call(this),this.recordingProdStack.pop(),n}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(e){throw t}throw t}},t.prototype.optionInternalRecord=function(t,e){return ze.call(this,st,t,e)},t.prototype.atLeastOneInternalRecord=function(t,e){ze.call(this,ct,e,t)},t.prototype.atLeastOneSepFirstInternalRecord=function(t,e){ze.call(this,lt,e,t,!0)},t.prototype.manyInternalRecord=function(t,e){ze.call(this,ut,e,t)},t.prototype.manySepFirstInternalRecord=function(t,e){ze.call(this,ht,e,t,!0)},t.prototype.orInternalRecord=function(t,e){return Ve.call(this,t,e)},t.prototype.subruleInternalRecord=function(t,e,n){if(Ye(e),!t||!1===Object(i.w)(t,"ruleName")){var r=new Error(" argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(t)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var o=Object(i.M)(this.recordingProdStack),a=t.ruleName,s=new it({idx:e,nonTerminalName:a,referencedRule:void 0});return o.definition.push(s),this.outputCst?He:Fe},t.prototype.consumeInternalRecord=function(t,e,n){if(Ye(e),!H(t)){var r=new Error(" argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(t)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var o=Object(i.M)(this.recordingProdStack),a=new pt({idx:e,terminalType:t});return o.definition.push(a),Be},t}();function ze(t,e,n,r){void 0===r&&(r=!1),Ye(n);var o=Object(i.M)(this.recordingProdStack),a=Object(i.B)(e)?e:e.DEF,s=new t({definition:[],idx:n});return r&&(s.separator=e.SEP),Object(i.w)(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),o.definition.push(s),this.recordingProdStack.pop(),Fe}function Ve(t,e){var n=this;Ye(e);var r=Object(i.M)(this.recordingProdStack),o=!1===Object(i.y)(t),a=!1===o?t:t.DEF,s=new ft({definition:[],idx:e,ignoreAmbiguities:o&&!0===t.IGNORE_AMBIGUITIES});Object(i.w)(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD);var c=Object(i.Q)(a,(function(t){return Object(i.B)(t.GATE)}));return s.hasPredicates=c,r.definition.push(s),Object(i.u)(a,(function(t){var e=new at({definition:[]});s.definition.push(e),Object(i.w)(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:Object(i.w)(t,"GATE")&&(e.ignoreAmbiguities=!0),n.recordingProdStack.push(e),t.ALT.call(n),n.recordingProdStack.pop()})),Fe}function Ke(t){return 0===t?"":""+t}function Ye(t){if(t<0||t>Ue){var e=new Error("Invalid DSL Method idx value: <"+t+">\n\tIdx value must be a none negative value smaller than "+(Ue+1));throw e.KNOWN_RECORDER_ERROR=!0,e}}var Xe=function(){function t(){}return t.prototype.initPerformanceTracer=function(t){if(Object(i.w)(t,"traceInitPerf")){var e=t.traceInitPerf,n="number"==typeof e;this.traceInitMaxIdent=n?e:1/0,this.traceInitPerf=n?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=Qe.traceInitPerf;this.traceInitIndent=-1},t.prototype.TRACE_INIT=function(t,e){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent");var r=Object(i.R)(e),o=r.time,a=r.value,s=o>10?console.warn:console.log;return this.traceInitIndent time: "+o+"ms"),this.traceInitIndent--,a}return e()},t}(),$e=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qe=tt(J,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(qe);var Ze,Qe=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Nt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Je=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function tn(t){return void 0===t&&(t=void 0),function(){return t}}!function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"}(Ze||(Ze={}));var en=function(){function t(t,e){this.definitionErrors=[],this.selfAnalysisDone=!1;if(this.initErrorHandler(e),this.initLexerAdapter(),this.initLooksAhead(e),this.initRecognizerEngine(t,e),this.initRecoverable(e),this.initTreeBuilder(e),this.initContentAssist(),this.initGastRecorder(e),this.initPerformanceTracer(e),Object(i.w)(e,"ignoredIssues"))throw new Error("The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=Object(i.w)(e,"skipValidations")?e.skipValidations:Qe.skipValidations}return t.performSelfAnalysis=function(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")},t.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",(function(){var n;e.selfAnalysisDone=!0;var r=e.className;e.TRACE_INIT("toFastProps",(function(){Object(i.S)(e)})),e.TRACE_INIT("Grammar Recording",(function(){try{e.enableRecording(),Object(i.u)(e.definedRulesNames,(function(t){var n=e[t].originalGrammarAction,r=void 0;e.TRACE_INIT(t+" Rule",(function(){r=e.topLevelRuleRecord(t,n)})),e.gastProductionsCache[t]=r}))}finally{e.disableRecording()}}));var o=[];if(e.TRACE_INIT("Grammar Resolving",(function(){o=le({rules:Object(i.U)(e.gastProductionsCache)}),e.definitionErrors.push.apply(e.definitionErrors,o)})),e.TRACE_INIT("Grammar Validations",(function(){if(Object(i.A)(o)&&!1===e.skipValidations){var t=ue({rules:Object(i.U)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:Object(i.U)(e.tokensMap),errMsgProvider:At,grammarName:r});e.definitionErrors.push.apply(e.definitionErrors,t)}})),Object(i.A)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",(function(){var t,n,r=(t=Object(i.U)(e.gastProductionsCache),n={},Object(i.u)(t,(function(t){var e=new wt(t).startWalking();Object(i.f)(n,e)})),n);e.resyncFollows=r})),e.TRACE_INIT("ComputeLookaheadFunctions",(function(){e.preComputeLookaheadFunctions(Object(i.U)(e.gastProductionsCache))}))),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Object(i.A)(e.definitionErrors))throw n=Object(i.I)(e.definitionErrors,(function(t){return t.message})),new Error("Parser Definition Errors detected:\n "+n.join("\n-------------------------------\n"))}))},t.DEFER_DEFINITION_ERRORS_HANDLING=!1,t}();Object(i.e)(en,[Te,xe,Re,Me,Pe,_e,je,De,Ge,Xe]);var nn=function(t){function e(e,n){void 0===n&&(n=Qe);var r=Object(i.h)(n);return r.outputCst=!0,t.call(this,e,r)||this}return $e(e,t),e}(en),rn=function(t){function e(e,n){void 0===n&&(n=Qe);var r=Object(i.h)(n);return r.outputCst=!1,t.call(this,e,r)||this}return $e(e,t),e}(en);function on(t,e){var n=void 0===e?{}:e,i=n.resourceBase,o=void 0===i?"https://unpkg.com/chevrotain@"+r+"/diagrams/":i,a=n.css;return'\n\x3c!-- This is a generated file --\x3e\n\n\n\n\n'+("\n\n")+("\n \ No newline at end of file +

Will return an object with {TestGroup: "HelloWorld", InnerGroup: "World"}.


Putting it all together

Grouping, repetition, and matching are the 3 primary elements that make up H2R. They can be combined in any way to generate a regular expression. See the main page for an example that combines all above to parse a URL.

Advanced features

Backreferences

TODO

If statements

TODO

Unicode character properties

You can match specific unicode sequences using "\uXXXX" or "\UXXXXXXXX" where X is a hexadecimal character. match "\u0669" // matches arabic digit 9 "٩" Unicode character classes/scripts can be matched using the unicode keyword. match unicode "Latin" // matches any latin character match unicode "N" // matches any number character The following Unicode class specifiers are available:

ClassDescription
COther
CcControl
CfFormat
CnUnassigned
CoPrivate use
CsSurrogate
LLetter
LlLower case letter
LmModifier letter
LoOther letter
LtTitle case letter
LuUpper case letter
MMark
McSpacing mark
MeEnclosing mark
MnNon-spacing mark
NNumber
NdDecimal number
NlLetter number
NoOther number
PPunctuation
PcConnector punctuation
PdDash punctuation
PeClose punctuation
PfFinal punctuation
PiInitial punctuation
PoOther punctuation
PsOpen punctuation
SSymbol
ScCurrency symbol
SkModifier symbol
SmMathematical symbol
SoOther symbol
ZSeparator
ZlLine separator
ZpParagraph separator
ZsSpace separator

The following Unicode script specifiers are available:

Note: Java and .NET require "Is" in front of the script name. For example, "IsLatin" rather than just "Latin"

ArabicArmenianAvestanBalineseBamum
BatakBengaliBopomofoBrahmiBraille
BugineseBuhidCanadian_AboriginalCarianChakma
ChamCherokeeCommonCopticCuneiform
CypriotCyrillicDeseretDevanagariEgyptian_Hieroglyphs
EthiopicGeorgianGlagoliticGothicGreek
GujaratiGurmukhiHanHangulHanunoo
HebrewHiraganaImperial_AramaicInheritedInscriptional_Pahlavi
Inscriptional_ParthianJavaneseKaithiKannadaKatakana
Kayah_LiKharoshthiKhmerLaoLatin
LepchaLimbuLinear_BLisuLycian
LydianMalayalamMandaicMeetei_MayekMeroitic_Cursive
Meroitic_HieroglyphsMiaoMongolianMyanmarNew_Tai_Lue
NkoOghamOld_ItalicOld_PersianOld_South_Arabian
Old_TurkicOl_ChikiOriyaOsmanyaPhags_Pa
PhoenicianRejangRunicSamaritanSaurashtra
SharadaShavianSinhalaSora_SompengSundanese
Syloti_NagriSyriacTagalogTagbanwaTai_Le
Tai_ThamTai_VietTakriTamilTelugu
ThaanaThaiTibetanTifinaghUgaritic
VaiYi   
\ No newline at end of file diff --git a/lib/tokens.js b/lib/tokens.js index 3b0a2dc..6d6bc85 100644 --- a/lib/tokens.js +++ b/lib/tokens.js @@ -1,7 +1,8 @@ "use strict"; /*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.AllTokens = exports.Outdent = exports.Indent = exports.StringLiteral = exports.NumberLiteral = exports.Identifier = exports.MultilineComment = exports.SingleLineComment = exports.WS = exports.EndOfLine = exports.Else = exports.If = exports.The = exports.Call = exports.OrMore = exports.CaseSensitive = exports.CaseInsensitive = exports.CarriageReturn = exports.Newline = exports.Repeat = exports.Called = exports.Create = exports.To = exports.From = exports.Exclusive = exports.Inclusive = exports.Exactly = exports.Times = exports.A = exports.Group = exports.Linefeed = exports.Tab = exports.Between = exports.Not = exports.Matching = exports.Exact = exports.Multiline = exports.Global = exports.Using = exports.Unicode = exports.Number = exports.Boundary = exports.Whitespace = exports.Integer = exports.Decimal = exports.Letter = exports.Character = exports.Digit = exports.Word = exports.And = exports.Or = exports.Anything = exports.Then = exports.Match = exports.Optional = exports.Ten = exports.Nine = exports.Eight = exports.Seven = exports.Six = exports.Five = exports.Four = exports.Three = exports.Two = exports.One = exports.Zero = void 0; +exports.CaseInsensitive = exports.CarriageReturn = exports.Newline = exports.Repeat = exports.Called = exports.Create = exports.To = exports.From = exports.Exclusive = exports.Inclusive = exports.Exactly = exports.Times = exports.A = exports.Group = exports.Linefeed = exports.Tab = exports.Between = exports.Not = exports.Matching = exports.Exact = exports.Multiline = exports.Global = exports.Using = exports.Unicode = exports.Number = exports.Boundary = exports.Whitespace = exports.Integer = exports.Decimal = exports.Letter = exports.Character = exports.Digit = exports.Word = exports.And = exports.Or = exports.Anything = exports.Then = exports.Match = exports.Optional = exports.Ten = exports.Nine = exports.Eight = exports.Seven = exports.Six = exports.Five = exports.Four = exports.Three = exports.Two = exports.One = exports.Zero = void 0; +exports.AllTokens = exports.Outdent = exports.Indent = exports.StringLiteral = exports.NumberLiteral = exports.Identifier = exports.MultilineComment = exports.SingleLineComment = exports.WS = exports.EndOfLine = exports.Else = exports.If = exports.The = exports.Call = exports.OrMore = exports.CaseSensitive = void 0; /** * The tokens required for Human2Regex * @packageDocumentation diff --git a/package-lock.json b/package-lock.json index a6c584b..04e1988 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "human2regex", - "version": "0.9.8", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1607,13 +1607,13 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.7.0.tgz", - "integrity": "sha512-li9aiSVBBd7kU5VlQlT1AqP0uWGDK6JYKUQ9cVDnOg34VNnd9t4jr0Yqc/bKxJr/tDCPDaB4KzoSFN9fgVxe/Q==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.1.tgz", + "integrity": "sha512-d7LeQ7dbUrIv5YVFNzGgaW3IQKMmnmKFneRWagRlGYOSfLJVaRbj/FrBNOBC1a3tVO+TgNq1GbHvRtg1kwL0FQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.7.0", - "@typescript-eslint/scope-manager": "4.7.0", + "@typescript-eslint/experimental-utils": "4.8.1", + "@typescript-eslint/scope-manager": "4.8.1", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -1622,55 +1622,55 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.7.0.tgz", - "integrity": "sha512-cymzovXAiD4EF+YoHAB5Oh02MpnXjvyaOb+v+BdpY7lsJXZQN34oIETeUwVT2XfV9rSNpXaIcknDLfupO/tUoA==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.1.tgz", + "integrity": "sha512-WigyLn144R3+lGATXW4nNcDJ9JlTkG8YdBWHkDlN0lC3gUGtDi7Pe3h5GPvFKMcRz8KbZpm9FJV9NTW8CpRHpg==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.7.0", - "@typescript-eslint/types": "4.7.0", - "@typescript-eslint/typescript-estree": "4.7.0", + "@typescript-eslint/scope-manager": "4.8.1", + "@typescript-eslint/types": "4.8.1", + "@typescript-eslint/typescript-estree": "4.8.1", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.7.0.tgz", - "integrity": "sha512-+meGV8bMP1sJHBI2AFq1GeTwofcGiur8LoIr6v+rEmD9knyCqDlrQcFHR0KDDfldHIFDU/enZ53fla6ReF4wRw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.8.1.tgz", + "integrity": "sha512-QND8XSVetATHK9y2Ltc/XBl5Ro7Y62YuZKnPEwnNPB8E379fDsvzJ1dMJ46fg/VOmk0hXhatc+GXs5MaXuL5Uw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.7.0", - "@typescript-eslint/types": "4.7.0", - "@typescript-eslint/typescript-estree": "4.7.0", + "@typescript-eslint/scope-manager": "4.8.1", + "@typescript-eslint/types": "4.8.1", + "@typescript-eslint/typescript-estree": "4.8.1", "debug": "^4.1.1" } }, "@typescript-eslint/scope-manager": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.7.0.tgz", - "integrity": "sha512-ILITvqwDJYbcDCROj6+Ob0oCKNg3SH46iWcNcTIT9B5aiVssoTYkhKjxOMNzR1F7WSJkik4zmuqve5MdnA0DyA==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.8.1.tgz", + "integrity": "sha512-r0iUOc41KFFbZdPAdCS4K1mXivnSZqXS5D9oW+iykQsRlTbQRfuFRSW20xKDdYiaCoH+SkSLeIF484g3kWzwOQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.7.0", - "@typescript-eslint/visitor-keys": "4.7.0" + "@typescript-eslint/types": "4.8.1", + "@typescript-eslint/visitor-keys": "4.8.1" } }, "@typescript-eslint/types": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.7.0.tgz", - "integrity": "sha512-uLszFe0wExJc+I7q0Z/+BnP7wao/kzX0hB5vJn4LIgrfrMLgnB2UXoReV19lkJQS1a1mHWGGODSxnBx6JQC3Sg==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.8.1.tgz", + "integrity": "sha512-ave2a18x2Y25q5K05K/U3JQIe2Av4+TNi/2YuzyaXLAsDx6UZkz1boZ7nR/N6Wwae2PpudTZmHFXqu7faXfHmA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.7.0.tgz", - "integrity": "sha512-5XZRQznD1MfUmxu1t8/j2Af4OxbA7EFU2rbo0No7meb46eHgGkSieFdfV6omiC/DGIBhH9H9gXn7okBbVOm8jw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.1.tgz", + "integrity": "sha512-bJ6Fn/6tW2g7WIkCWh3QRlaSU7CdUUK52shx36/J7T5oTQzANvi6raoTsbwGM11+7eBbeem8hCCKbyvAc0X3sQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.7.0", - "@typescript-eslint/visitor-keys": "4.7.0", + "@typescript-eslint/types": "4.8.1", + "@typescript-eslint/visitor-keys": "4.8.1", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -1680,12 +1680,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.7.0.tgz", - "integrity": "sha512-aDJDWuCRsf1lXOtignlfiPODkzSxxop7D0rZ91L6ZuMlcMCSh0YyK+gAfo5zN/ih6WxMwhoXgJWC3cWQdaKC+A==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.1.tgz", + "integrity": "sha512-3nrwXFdEYALQh/zW8rFwP4QltqsanCDz4CwWMPiIZmwlk9GlvBeueEIbq05SEq4ganqM0g9nh02xXgv5XI3PeQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.7.0", + "@typescript-eslint/types": "4.8.1", "eslint-visitor-keys": "^2.0.0" } }, @@ -2917,9 +2917,9 @@ } }, "codemirror": { - "version": "5.58.2", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.58.2.tgz", - "integrity": "sha512-K/hOh24cCwRutd1Mk3uLtjWzNISOkm4fvXiMO7LucCrqbh6aJDdtqUziim3MZUI6wOY0rvY1SlL1Ork01uMy6w==" + "version": "5.58.3", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.58.3.tgz", + "integrity": "sha512-KBhB+juiyOOgn0AqtRmWyAT3yoElkuvWTI6hsHa9E6GQrl6bk/fdAYcvuqW1/upO9T9rtEtapWdw4XYcNiVDEA==" }, "collect-v8-coverage": { "version": "1.0.1", @@ -3087,9 +3087,9 @@ "dev": true }, "copy-webpack-plugin": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-6.3.0.tgz", - "integrity": "sha512-kQ2cGGQLO6Ov2fe7rEGVxObI17dPeFkv8bRGnUAGZehOcrrObyAR9yWYlFGlJsyWM4EeuC/ytQNQkXxjYotMzg==", + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-6.3.2.tgz", + "integrity": "sha512-MgJ1uouLIbDg4ST1GzqrGQyKoXY5iPqi6fghFqarijam7FQcBa/r6Rg0VkoIuzx75Xq8iAMghyOueMkWUQ5OaA==", "dev": true, "requires": { "cacache": "^15.0.5", @@ -3977,9 +3977,9 @@ } }, "eslint": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.13.0.tgz", - "integrity": "sha512-uCORMuOO8tUzJmsdRtrvcGq5qposf7Rw0LwkTJkoDbOycVQtQjmnhZSuLQnozLE4TmAzlMVV45eCHmQ1OpDKUQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.14.0.tgz", + "integrity": "sha512-5YubdnPXrlrYAFCKybPuHIAH++PINe1pmKNc5wQRB9HSbqIK1ywAnntE3Wwua4giKu0bjligf1gLF6qxMGOYRA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -11951,9 +11951,9 @@ } }, "typescript": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.5.tgz", - "integrity": "sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.2.tgz", + "integrity": "sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index 50df91b..65ef290 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "human2regex", - "version": "1.0.2", + "version": "1.1.0", "description": "Humanized Regular Expressions", "main": "./lib/index.js", "typings": "./lib/index.d.ts", @@ -9,13 +9,13 @@ "@types/html-minifier": "^3.5.3", "@types/jest": "^26.0.15", "@types/mustache": "^4.0.1", - "@typescript-eslint/eslint-plugin": "^4.7.0", - "@typescript-eslint/parser": "^4.7.0", + "@typescript-eslint/eslint-plugin": "^4.8.1", + "@typescript-eslint/parser": "^4.8.1", "before-build-webpack": "^0.2.9", "codecov": "^3.8.1", - "copy-webpack-plugin": "^6.3.0", + "copy-webpack-plugin": "^6.3.2", "css-loader": "^4.3.0", - "eslint": "^7.13.0", + "eslint": "^7.14.0", "glob": "^7.1.6", "html-minifier": "^4.0.0", "jest": "^26.6.3", @@ -26,7 +26,7 @@ "ts-jest": "^26.4.4", "ts-loader": "^8.0.11", "ts-node": "^9.0.0", - "typescript": "^4.0.5", + "typescript": "^4.1.2", "webpack": "^4.44.2", "webpack-cli": "^3.3.12" }, @@ -46,7 +46,7 @@ "license": "MIT", "dependencies": { "chevrotain": "^7.0.3", - "codemirror": "^5.58.2" + "codemirror": "^5.58.3" }, "repository": { "type": "git", diff --git a/src/docs/tutorial.mustache b/src/docs/tutorial.mustache index c88fc6a..4505ffe 100644 --- a/src/docs/tutorial.mustache +++ b/src/docs/tutorial.mustache @@ -336,7 +336,13 @@ match "World"

Putting it all together

Grouping, repetition, and matching are the 3 primary elements that make up H2R. They can be combined in any way to generate a regular expression. See the main page for an example that combines all above to parse a URL.

-

Miscellaneous features

+

Advanced features

+ +

Backreferences

+

TODO

+ +

If statements

+

TODO

Unicode character properties

You can match specific unicode sequences using "\uXXXX" From 27f37c21ebbde65601c7ae53e6c90505bc00f533 Mon Sep 17 00:00:00 2001 From: Patrick Demian Date: Sun, 3 Jan 2021 05:07:55 -0500 Subject: [PATCH 08/11] Update year --- API.md | 4 +- LICENSE | 2 +- Readme.md | 2 +- docs/bundle.min.js | 4 +- package-lock.json | 424 +++++++++++++++++++-------------- package.json | 26 +- src/docs/404.mustache | 2 +- src/docs/footer.mustache | 4 +- src/docs/header.mustache | 2 +- src/docs/index.mustache | 2 +- src/docs/style.css | 2 +- src/docs/tutorial.mustache | 2 +- src/generator.ts | 2 +- src/generator_helper.ts | 2 +- src/index.ts | 2 +- src/lexer.ts | 2 +- src/parser.ts | 2 +- src/script.ts | 2 +- src/tokens.ts | 2 +- src/utilities.ts | 2 +- tests/api.spec.ts | 2 +- tests/generator.spec.ts | 2 +- tests/generator_helper.spec.ts | 3 +- tests/lexer.spec.ts | 2 +- tests/misc.spec.ts | 2 +- tests/parser.spec.ts | 2 +- tests/utilities.spec.ts | 2 +- webpack.config.js | 1 + 28 files changed, 288 insertions(+), 220 deletions(-) diff --git a/API.md b/API.md index c3669a2..6af8a92 100644 --- a/API.md +++ b/API.md @@ -132,13 +132,13 @@ export enum RegexDialect { } ``` -After choosing one, you must validate the regular expression. This may be skipped if and only if the input has already been validated before as the generator is not guaranteed to work unless there are no errors. +After choosing one, you should validate the regular expression. This may be skipped if and only if the input has already been validated before. The generator is not guaranteed to work unless there are no validation errors. The generator does no validation itself and may either return garbage output or crash. ```typescript const validation_errors = parse_result.validate(); ``` -The result is a list of errors which, again, is a `CommonError`. If there are no errors, you can call the `toRegex()` function to create a string representation of the regular expression. You can also call the `toRegExp()` function to create a `RegExp` expression used in Javascript +The result is a list of errors which is a `CommonError`. If there are no errors, you can call the `toRegex()` function to create a string representation of the regular expression. You can also call the `toRegExp()` function to create a `RegExp` expression used in Javascript ```typescript const my_regex_string = parse_result.toRegex(); // type is string diff --git a/LICENSE b/LICENSE index 997d624..f60d346 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Patrick Demian +Copyright (c) 2021 Patrick Demian Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Readme.md b/Readme.md index 945af71..a3b124c 100644 --- a/Readme.md +++ b/Readme.md @@ -81,7 +81,7 @@ The API reference is available [here](API.md) ## Todo -- Add more regex options such as subroutines, conditions, and lookahead/behind +- Add more regex options such as subroutines~~, conditions, and lookahead/behind~~ - Fix error messages (They sometimes point to the wrong location, off by 1 errors, etc) - Add more useful lex/parse errors (What even is an EarlyExitException?) - Use a different/better static site generation method \ No newline at end of file diff --git a/docs/bundle.min.js b/docs/bundle.min.js index b267bdc..7e360f8 100644 --- a/docs/bundle.min.js +++ b/docs/bundle.min.js @@ -1,8 +1,8 @@ !function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(t,e,n){"use strict";function r(t){return t&&0===t.length}function i(t){return null==t?[]:Object.keys(t)}function o(t){for(var e=[],n=Object.keys(t),r=0;r=this.input.length)throw Error("Unexpected end of input");this.idx++},t.prototype.loc=function(t){return{begin:t,end:this.idx}};var e,n=/[0-9a-fA-F]/,r=/[0-9]/,i=/[1-9]/;function o(t){return t.charCodeAt(0)}function a(t,e){void 0!==t.length?t.forEach((function(t){e.push(t)})):e.push(t)}function s(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e]=!0}function l(t){if(void 0===t)throw Error("Internal Error - Should never get here!")}var c=[];for(e=o("0");e<=o("9");e++)c.push(e);var u=[o("_")].concat(c);for(e=o("a");e<=o("z");e++)u.push(e);for(e=o("A");e<=o("Z");e++)u.push(e);var h=[o(" "),o("\f"),o("\n"),o("\r"),o("\t"),o("\v"),o("\t"),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o("\u2028"),o("\u2029"),o(" "),o(" "),o(" "),o("\ufeff")];function f(){}return f.prototype.visitChildren=function(t){for(var e in t){var n=t[e];t.hasOwnProperty(e)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((function(t){this.visit(t)}),this))}},f.prototype.visit=function(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)},f.prototype.visitPattern=function(t){},f.prototype.visitFlags=function(t){},f.prototype.visitDisjunction=function(t){},f.prototype.visitAlternative=function(t){},f.prototype.visitStartAnchor=function(t){},f.prototype.visitEndAnchor=function(t){},f.prototype.visitWordBoundary=function(t){},f.prototype.visitNonWordBoundary=function(t){},f.prototype.visitLookahead=function(t){},f.prototype.visitNegativeLookahead=function(t){},f.prototype.visitCharacter=function(t){},f.prototype.visitSet=function(t){},f.prototype.visitGroup=function(t){},f.prototype.visitGroupBackReference=function(t){},f.prototype.visitQuantifier=function(t){},{RegExpParser:t,BaseRegExpVisitor:f,VERSION:"0.5.0"}})?r.apply(e,i):r)||(t.exports=o)},function(t,e,n){"use strict"; -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */Object.defineProperty(e,"__esModule",{value:!0}),e.CommonError=e.append=e.regexEscape=e.removeQuotes=e.findLastIndex=e.last=e.first=e.isSingleRegexCharacter=e.combineFlags=e.hasFlag=e.makeFlag=e.usefulConditional=e.unusedParameter=void 0,e.unusedParameter=function(t,e){},e.usefulConditional=function(t,e){return Boolean(t)},e.makeFlag=function(t){return 1<=0;n--)if(t[n]===e)return n;return-1},e.removeQuotes=function(t){return t.substring(1,t.length-1)},e.regexEscape=function(t){return t.replace(/([:\\\-\.\[\]\^\|\(\)\*\+\?\{\}\$\/])/g,"\\$1")},e.append=function(t,...e){for(const n of e)for(const e of n)t.push(e)};class r{constructor(t,e,n,r,i){this.type=t,this.start_line=e,this.start_column=n,this.length=r,this.message=i}static fromLexError(t){const e=t.message.replace(/(--?>|<--?)/g,"");return new r("Lexer Error",t.line,t.column,t.length,e)}static fromParseError(t){var e,n,i;const o=t.name+" - "+t.message.replace(/(--?>|<--?)/g,"");return new r("Parser Error",null!==(e=t.token.startLine)&&void 0!==e?e:NaN,null!==(n=t.token.startColumn)&&void 0!==n?n:NaN,null!==(i=t.token.endOffset)&&void 0!==i?i:NaN-t.token.startOffset,o)}static fromSemanticError(t){return new r("Semantic Error",t.startLine,t.startColumn,t.length,t.message)}toString(){return`${this.type} @ (${this.start_line}, ${this.start_column}): ${this.message}`}}e.CommonError=r},function(t,e,n){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),h=/Opera\//.test(t),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),d=/PhantomJS/.test(t),m=!o&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),g=/Android/.test(t),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=m||/Mac/.test(e),b=/\bCrOS\b/.test(t),T=/win/i.test(e),O=h&&t.match(/Version\/(\d*\.\d*)/);O&&(O=Number(O[1])),O&&O>=15&&(h=!1,l=!0);var S=y&&(c||h&&(null==O||O<12.11)),x=n||a&&s>=9;function E(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var C,k=function(t,e){var n=t.className,r=E(e).exec(n);if(r){var i=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function N(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function w(t,e){return N(t).appendChild(e)}function L(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}}m?P=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(P=function(t){try{t.select()}catch(t){}});var F=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function W(t,e){for(var n=0;n=e)return r+Math.min(a,e-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=e)return r}}var K=[""];function Y(t){for(;K.length<=t;)K.push($(K)+" ");return K[t]}function $(t){return t[t.length-1]}function X(t,e){for(var n=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||J.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&Q(t))||e.test(t):Q(t)}function et(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var nt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function rt(t){return t.charCodeAt(0)>=768&&nt.test(t)}function it(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var i=(e+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+r}}var at=null;function st(t,e,n){var r;at=null;for(var i=0;ie)return i;o.to==e&&(o.from!=o.to&&"before"==n?r=i:at=i),o.from==e&&(o.from!=o.to&&"before"!=n?r=i:at=i)}return null!=r?r:at}var lt=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(t,e,n){this.level=t,this.from=e,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!t.test(a))return!1;for(var c,u=a.length,h=[],f=0;f-1&&(r[e]=i.slice(0,o).concat(i.slice(o+1)))}}}function dt(t,e){var n=ft(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){pt(this,t,e)}}function bt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Tt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ot(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function St(t){bt(t),Tt(t)}function xt(t){return t.target||t.srcElement}function Et(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var Ct,kt,Nt=function(){if(a&&s<9)return!1;var t=L("div");return"draggable"in t||"dragDrop"in t}();function wt(t){if(null==Ct){var e=L("span","​");w(t,L("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Ct=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var n=Ct?L("span","​"):L("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Lt(t){if(null!=kt)return kt;var e=w(t,document.createTextNode("AخA")),n=C(e,0,1).getBoundingClientRect(),r=C(e,1,2).getBoundingClientRect();return N(t),!(!n||n.left==n.right)&&(kt=r.right-n.right<3)}var At,It=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var o=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=i+1)}return n}:function(t){return t.split(/\r\n?|\n/)},Rt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Mt="oncopy"in(At=L("div"))||(At.setAttribute("oncopy","return;"),"function"==typeof At.oncopy),_t=null,Pt={},jt={};function Dt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Pt[t]=e}function Ut(t){if("string"==typeof t&&jt.hasOwnProperty(t))t=jt[t];else if(t&&"string"==typeof t.name&&jt.hasOwnProperty(t.name)){var e=jt[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ut("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ut("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ft(t,e){e=Ut(e);var n=Pt[e.name];if(!n)return Ft(t,"text/plain");var r=n(t,e);if(Wt.hasOwnProperty(e.name)){var i=Wt[e.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)r[a]=e.modeProps[a];return r}var Wt={};function Bt(t,e){D(e,Wt.hasOwnProperty(t)?Wt[t]:Wt[t]={})}function Ht(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Gt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function zt(t,e,n){return!t.startState||t.startState(e,n)}var Vt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Kt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e=t.first&&en?te(n,Kt(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?te(t.line,e):n<0?te(t.line,0):t}(e,Kt(t,e.line).text.length)}function le(t,e){for(var n=[],r=0;r=this.string.length},Vt.prototype.sol=function(){return this.pos==this.lineStart},Vt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vt.prototype.next=function(){if(this.pose},Vt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Vt.prototype.skipToEnd=function(){this.pos=this.string.length},Vt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Vt.prototype.backUp=function(t){this.pos-=t},Vt.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var i=function(t){return n?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},Vt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Vt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Vt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ce=function(t,e){this.state=t,this.lookAhead=e},ue=function(t,e,n,r){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function he(t,e,n,r){var i=[t.state.modeGen],o={};Te(t,e.text,t.doc.mode,n,(function(t,e){return i.push(t,e)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=t.state.overlays[r],l=1,c=0;n.state=!0,Te(t,e.text,s.mode,n,(function(t,e){for(var n=l;ct&&i.splice(l,1,t,i[l+1],r),l+=2,c=Math.min(t,r)}if(e)if(s.opaque)i.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&Ht(t.doc.mode,r.state),o=he(t,e,r);i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function pe(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return new ue(r,!0,e);var o=function(t,e,n){for(var r,i,o=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=o.first)return o.first;var l=Kt(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ce?c.lookAhead:0)<=o.modeFrontier))return s;var u=U(l.text,null,t.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(t,e,n),a=o>r.first&&Kt(r,o-1).stateAfter,s=a?ue.fromSaved(r,a,o):new ue(r,zt(r.mode),o);return r.iter(o,e,(function(n){de(t,n.text,s);var r=s.line;n.stateAfter=r==e-1||r%5==0||r>=i.viewFrom&&re.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}ue.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ue.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(t,e,n){return e instanceof ce?new ue(t,Ht(t.mode,e.state),n,e.lookAhead):new ue(t,Ht(t.mode,e),n)},ue.prototype.save=function(t){var e=!1!==t?Ht(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(e,this.maxLookAhead):e};var ve=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function ye(t,e,n,r){var i,o,a=t.doc,s=a.mode,l=Kt(a,(e=se(a,e)).line),c=pe(t,e.line,n),u=new Vt(l.text,t.options.tabSize,c);for(r&&(o=[]);(r||u.post.options.maxHighlightLength?(s=!1,a&&de(t,e,r,h.pos),h.pos=e.length,l=null):l=be(ge(n,h,r.state,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c=e:o.to>e);(r||(r=[])).push(new xe(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(t,e,n){var r;if(t)for(var i=0;i=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from0&&s)for(var b=0;be)&&(!n||Re(n,o.marker)<0)&&(n=o.marker)}return n}function De(t,e,n,r,i){var o=Kt(t,e),a=Se&&o.markedSpans;if(a)for(var s=0;s=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ee(c.to,n)>=0:ee(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ee(c.from,r)<=0:ee(c.from,r)<0)))return!0}}}function Ue(t){for(var e;e=_e(t);)t=e.find(-1,!0).line;return t}function Fe(t,e){var n=Kt(t,e),r=Ue(n);return n==r?e:qt(r)}function We(t,e){if(e>t.lastLine())return e;var n,r=Kt(t,e);if(!Be(t,r))return e;for(;n=Pe(r);)r=n.find(1,!0).line;return qt(r)+1}function Be(t,e){var n=Se&&e.markedSpans;if(n)for(var r=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var Ke=function(t,e,n){this.text=t,Le(this,e),this.height=n?n(this):1};function Ye(t){t.parent=null,we(t)}Ke.prototype.lineNo=function(){return qt(this)},yt(Ke);var $e={},Xe={};function qe(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Xe:$e;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var n=A("span",null,null,l?"padding-right: .1px":null),r={pre:A("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var o=i?e.rest[i-1]:e.line,a=void 0;r.pos=0,r.addToken=Qe,Lt(t.display.measure)&&(a=ct(o,t.doc.direction))&&(r.addToken=tn(r.addToken,a)),r.map=[],nn(o,r,fe(t,o,e!=t.display.externalMeasured&&qt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=_(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=_(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(wt(t.display.measure))),0==i?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return dt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=_(r.pre.className,r.textClass||"")),r}function Je(t){var e=L("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Qe(t,e,n,r,i,o,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",i=0;ic&&h.from<=c);f++);if(h.to>=u)return t(n,r,i,o,a,s,l);t(n,r.slice(0,h.to-c),i,o,null,s,l),o=null,r=r.slice(h.to-c),c=h.to}}}function en(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function nn(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var a,s,l,c,u,h,f,p=i.length,d=0,m=1,g="",v=0;;){if(v==d){l=c=u=s="",f=null,h=null,v=1/0;for(var y=[],b=void 0,T=0;Td||S.collapsed&&O.to==d&&O.from==d)){if(null!=O.to&&O.to!=d&&v>O.to&&(v=O.to,c=""),S.className&&(l+=" "+S.className),S.css&&(s=(s?s+";":"")+S.css),S.startStyle&&O.from==d&&(u+=" "+S.startStyle),S.endStyle&&O.to==v&&(b||(b=[])).push(S.endStyle,O.to),S.title&&((f||(f={})).title=S.title),S.attributes)for(var x in S.attributes)(f||(f={}))[x]=S.attributes[x];S.collapsed&&(!h||Re(h.marker,S)<0)&&(h=O)}else O.from>d&&v>O.from&&(v=O.from)}if(b)for(var E=0;E=p)break;for(var k=Math.min(p,v);;){if(g){var N=d+g.length;if(!h){var w=N>k?g.slice(0,k-d):g;e.addToken(e,w,a?a+l:l,u,d+w.length==v?c:"",s,f)}if(N>=k){g=g.slice(k-d),d=k;break}d=N,u=""}g=i.slice(o,o=n[m++]),a=qe(n[m++],e.cm.options)}}else for(var L=1;Ln)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function An(t,e,n,r){return Mn(t,Rn(t,e),n,r)}function In(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&e2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,r){var i,o=jn(e.map,n,r),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&rt(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,i))}else{var p;c>0&&(h=r="right"),i=t.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var d=l.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+ir(t.display),top:d.top,bottom:d.bottom}:Pn}for(var m=i.top-e.rect.top,g=i.bottom-e.rect.top,v=(m+g)/2,y=e.view.measure.heights,b=0;be)&&(i=(o=l-s)-1,e>=l&&(a="right")),null!=i){if(r=t[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=t[i]).left==n.right;i--);return n}function Un(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(t,e,n){return a(n?t-1:t,1==s[e].level!=n)}var h=st(s,l,c),f=at,p=u(l,h,"before"==c);return null!=f&&(p.other=u(l,f,"before"!=c)),p}function $n(t,e){var n=0;e=se(t.doc,e),t.options.lineWrapping||(n=ir(t.display)*e.ch);var r=Kt(t.doc,e.line),i=Ge(r)+xn(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Xn(t,e,n,r,i){var o=te(t,e,n);return o.xRel=i,r&&(o.outside=r),o}function qn(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return Xn(r.first,0,null,-1,-1);var i=Zt(r,n),o=r.first+r.size-1;if(i>o)return Xn(r.first+r.size-1,Kt(r,o).text.length,null,1,1);e<0&&(e=0);for(var a=Kt(r,i);;){var s=tr(t,a,i,e,n),l=je(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Kt(r,i=c.line)}}function Zn(t,e,n,r){r-=Gn(e);var i=e.text.length,o=ot((function(e){return Mn(t,n,e-1).bottom<=r}),i,0);return{begin:o,end:i=ot((function(e){return Mn(t,n,e).top>r}),o,i)}}function Jn(t,e,n,r){return n||(n=Rn(t,e)),Zn(t,e,n,zn(t,e,Mn(t,n,r),"line").top)}function Qn(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function tr(t,e,n,r,i){i-=Ge(e);var o=Rn(t,e),a=Gn(e),s=0,l=e.text.length,c=!0,u=ct(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?nr:er)(t,e,n,o,u,r,i);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var f,p,d=null,m=null,g=ot((function(e){var n=Mn(t,o,e);return n.top+=a,n.bottom+=a,!!Qn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(d=e,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left=T.bottom?1:0}return Xn(n,g=it(e.text,g,1),p,v,r-f)}function er(t,e,n,r,i,o,a){var s=ot((function(s){var l=i[s],c=1!=l.level;return Qn(Yn(t,te(n,c?l.to:l.from,c?"before":"after"),"line",e,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Yn(t,te(n,c?l.from:l.to,c?"after":"before"),"line",e,r);Qn(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function nr(t,e,n,r,i,o,a){var s=Zn(t,e,r,a),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,f=0;f=c||p.to<=l)){var d=Mn(t,r,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=dm)&&(u=p,h=m)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function rr(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==_n){_n=L("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)_n.appendChild(document.createTextNode("x")),_n.appendChild(L("br"));_n.appendChild(document.createTextNode("x"))}w(t.measure,_n);var n=_n.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),N(t.measure),n||1}function ir(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=L("span","xxxxxxxxxx"),n=L("pre",[e],"CodeMirror-line-like");w(t.measure,n);var r=e.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function or(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ar(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function ar(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function sr(t){var e=rr(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/ir(t.display)-3);return function(i){if(Be(t.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(l=Kt(t.doc,c.line).text).length==c.ch){var u=U(l,l.length,t.options.tabSize)-l.length;c=te(c.line,Math.max(0,Math.round((o-Cn(t.display).left)/ir(t.display))-u))}return c}function ur(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;re)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Se&&Fe(t.doc,e)i.viewFrom?pr(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)pr(t);else if(e<=i.viewFrom){var o=dr(t,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):pr(t)}else if(n>=i.viewTo){var a=dr(t,e,e,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):pr(t)}else{var s=dr(t,e,e,-1),l=dr(t,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(on(t,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):pr(t)}var c=i.externalMeasured;c&&(n=i.lineN&&e=r.viewTo)){var o=r.view[ur(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==W(a,n)&&a.push(n)}}}function pr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function dr(t,e,n,r){var i,o=ur(t,e),a=t.display.view;if(!Se||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=t.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-e,o++}else i=s-e;e+=i,n+=i}for(;Fe(t.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function mr(t){for(var e=t.display.view,n=0,r=0;r=t.display.viewTo||s.to().linee||e==n&&a.to==e)&&(r(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(e,n,"ltr")}(m,n||0,null==r?f:r,(function(t,e,i,h){var g="ltr"==i,v=p(t,g?"left":"right"),y=p(e-1,g?"right":"left"),b=null==n&&0==t,T=null==r&&e==f,O=0==h,S=!m||h==m.length-1;if(y.top-v.top<=3){var x=(c?T:b)&&S,E=(c?b:T)&&O?s:(g?v:y).left,C=x?l:(g?y:v).right;u(E,v.top,C-E,v.bottom)}else{var k,N,w,L;g?(k=c&&b&&O?s:v.left,N=c?l:d(t,i,"before"),w=c?s:d(e,i,"after"),L=c&&T&&S?l:y.right):(k=c?d(t,i,"before"):s,N=!c&&b&&O?l:v.right,w=!c&&T&&S?s:y.left,L=c?d(e,i,"after"):l),u(k,v.top,N-k,v.bottom),v.bottom0?e.blinker=setInterval((function(){t.hasFocus()||Cr(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Sr(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||Er(t))}function xr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&Cr(t))}),100)}function Er(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(dt(t,"focus",t,e),t.state.focused=!0,M(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Or(t))}function Cr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(dt(t,"blur",t,e),t.state.focused=!1,k(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function kr(t){for(var e=t.display,n=e.lineDiv.offsetTop,r=0;r.005||f<-.005)&&(Xt(i.line,l),Nr(i.line),i.rest))for(var p=0;pt.display.sizerWidth){var d=Math.ceil(c/ir(t.display));d>t.display.maxLineLength&&(t.display.maxLineLength=d,t.display.maxLine=i.line,t.display.maxLineChanged=!0)}}}}function Nr(t){if(t.widgets)for(var e=0;e=a&&(o=Zt(e,Ge(Kt(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Lr(t,e){var n=t.display,r=rr(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=wn(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var s=t.doc.height+En(n),l=e.tops-r;if(e.topi+o){var u=Math.min(e.top,(c?s:e.bottom)-o);u!=i&&(a.scrollTop=u)}var h=t.options.fixedGutter?0:n.gutters.offsetWidth,f=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-h,p=Nn(t)-n.gutters.offsetWidth,d=e.right-e.left>p;return d&&(e.right=e.left+p),e.left<10?a.scrollLeft=0:e.leftp+f-3&&(a.scrollLeft=e.right+(d?0:10)-p),a}function Ar(t,e){null!=e&&(Mr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Ir(t){Mr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Rr(t,e,n){null==e&&null==n||Mr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Mr(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,_r(t,$n(t,e.from),$n(t,e.to),e.margin))}function _r(t,e,n,r){var i=Lr(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});Rr(t,i.scrollLeft,i.scrollTop)}function Pr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||li(t,{top:e}),jr(t,e,!0),n&&li(t),ri(t,100))}function jr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Dr(t,e,n,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,hi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Ur(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+En(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+kn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var Fr=function(t,e,n){this.cm=n;var r=this.vert=L("div",[L("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=L("div",[L("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),ht(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),ht(i,"scroll",(function(){i.clientWidth&&e(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var i=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},Fr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var t=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new F,this.disableVert=new F},Fr.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,(function r(){var i=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)}))},Fr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Wr=function(){};function Br(t,e){e||(e=Ur(t));var n=t.display.barWidth,r=t.display.barHeight;Hr(t,e);for(var i=0;i<4&&n!=t.display.barWidth||r!=t.display.barHeight;i++)n!=t.display.barWidth&&t.options.lineWrapping&&kr(t),Hr(t,Ur(t)),n=t.display.barWidth,r=t.display.barHeight}function Hr(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Wr.prototype.update=function(){return{bottom:0,right:0}},Wr.prototype.setScrollLeft=function(){},Wr.prototype.setScrollTop=function(){},Wr.prototype.clear=function(){};var Gr={native:Fr,null:Wr};function zr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&k(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Gr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?Dr(t,e):Pr(t,e)}),t),t.display.scrollbars.addClass&&M(t.display.wrapper,t.display.scrollbars.addClass)}var Vr=0;function Kr(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vr},e=t.curOp,an?an.ops.push(e):e.ownsGroup=an={ops:[e],delayedCallbacks:[]}}function Yr(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new oi(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Xr(t){t.updatedDisplay=t.mustUpdate&&ai(t.cm,t.update)}function qr(t){var e=t.cm,n=e.display;t.updatedDisplay&&kr(e),t.barMeasure=Ur(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=An(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+kn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Nn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Zr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!d){var o=L("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-xn(t.display))+"px;\n height: "+(e.bottom-e.top+kn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(i),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,n,r){var i;null==r&&(r=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?te(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?te(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,s=Yn(t,e),l=n&&n!=e?Yn(t,n):s,c=Lr(t,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Pr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Dr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(a=!0)),!a)break}return i}(e,se(r,t.scrollToPos.from),se(r,t.scrollToPos.to),t.scrollToPos.margin));var i=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(i)for(var a=0;a=t.display.viewTo)){var n=+new Date+t.options.workTime,r=pe(t,e.highlightFrontier),i=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(r.line>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength?Ht(e.mode,r.state):null,l=he(t,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!h&&fn)return ri(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),i.length&&Qr(t,(function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(t))return!1;fi(t)&&(pr(t),e.dims=or(t));var i=r.first+r.size,o=Math.max(e.visible.from-t.options.viewportMargin,r.first),a=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Se&&(o=Fe(t.doc,o),a=We(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=on(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=on(t,e,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,ur(t,n)))),r.viewTo=n}(t,o,a),n.viewOffset=Ge(Kt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=mr(t);if(!s&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=R();if(!e||!I(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&I(t.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var r=t.display,i=t.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=r.view,u=r.viewFrom,h=0;h-1&&(p=!1),un(t,f,u,n)),p&&(N(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Qt(t.options,u)))),a=f.node.nextSibling}else{var d=vn(t,f,u,n);o.insertBefore(d,a)}u+=f.size}for(;a;)a=s(a)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=R()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&I(document.body,t.anchorNode)&&I(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),N(n.cursorDiv),N(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,ri(t,400)),n.updateLineNumbers=null,!0}function si(t,e){for(var n=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Nn(t))r&&(e.visible=wr(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+En(t.display)-wn(t),n.top)}),e.visible=wr(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!ai(t,e))break;kr(t);var i=Ur(t);gr(t),Br(t,i),ui(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function li(t,e){var n=new oi(t,e);if(ai(t,n)){kr(t),si(t,n);var r=Ur(t);gr(t),Br(t,r),ui(t,r),n.finish()}}function ci(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function ui(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+kn(t)+"px"}function hi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=ar(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)t:for(var f=e.target,p=a.view;f!=s;f=f.parentNode)for(var d=0;d=0&&ee(t,r.to())<=0)return n}return-1};var xi=function(t,e){this.anchor=t,this.head=e};function Ei(t,e,n){var r=t&&t.options.selectionsMayTouch,i=e[n];e.sort((function(t,e){return ee(t.from(),e.from())})),n=W(e,i);for(var o=1;o0:l>=0){var c=oe(s.from(),a.from()),u=ie(s.to(),a.to()),h=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,e.splice(--o,2,new xi(h?u:c,h?c:u))}}return new Si(e,n)}function Ci(t,e){return new Si([new xi(t,e||t)],0)}function ki(t){return t.text?te(t.from.line+t.text.length-1,$(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Ni(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return ki(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=ki(e).ch-e.to.ch),te(n,r)}function wi(t,e){for(var n=[],r=0;r1&&t.remove(s.line+1,d-1),t.insert(s.line+1,v)}ln(t,"change",t,e)}function _i(t,e,n){!function t(r,i,o){if(r.linked)for(var a=0;as-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(Fi(t.done),$(t.done)):t.done.length&&!$(t.done).ranges?$(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),$(t.done)):void 0}(i,i.lastOp==r)))a=$(o.changes),0==ee(e.from,e.to)&&0==ee(e.from,a.to)?a.to=ki(e):o.changes.push(Ui(t,e));else{var l=$(i.done);for(l&&l.ranges||Hi(t.sel,i.done),o={changes:[Ui(t,e)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,a||dt(t,"historyAdded")}function Bi(t,e,n,r){var i=t.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(t,e,n,r){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,$(i.done),e))?i.done[i.done.length-1]=e:Hi(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Fi(i.undone)}function Hi(t,e){var n=$(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Gi(t,e,n,r){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),(function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=n.markedSpans),++o}))}function zi(t){if(!t)return null;for(var e,n=0;n-1&&($(s)[h]=c[h],delete c[h])}}}return r}function Yi(t,e,n,r){if(r){var i=t.anchor;if(n){var o=ee(e,i)<0;o!=ee(n,i)<0?(i=e,e=n):o!=ee(e,n)<0&&(e=n)}return new xi(i,e)}return new xi(n||e,e)}function $i(t,e,n,r,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),Qi(t,new Si([Yi(t.sel.primary(),e,n,i)],0),r)}function Xi(t,e,n){for(var r=[],i=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:s.to>e.ch))){if(i&&(dt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var h=l.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(h=ao(t,h,-r,h&&h.line==e.line?o:null)),h&&h.line==e.line&&(f=ee(h,n))&&(r<0?f<0:f>0))return io(t,h,e,r,i)}var p=l.find(r<0?-1:1);return(r<0?c:u)&&(p=ao(t,p,r,p.line==e.line?o:null)),p?io(t,p,e,r,i):null}}return e}function oo(t,e,n,r,i){var o=r||1,a=io(t,e,n,o,i)||!i&&io(t,e,n,o,!0)||io(t,e,n,-o,i)||!i&&io(t,e,n,-o,!0);return a||(t.cantEdit=!0,te(t.first,0))}function ao(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?se(t,te(e.line-1)):null:n>0&&e.ch==(r||Kt(t,e.line)).text.length?e.line0)){var u=[l,1],h=ee(c.from,s.from),f=ee(c.to,s.to);(h<0||!a.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(t,e.from,e.to);if(r)for(var i=r.length-1;i>=0;--i)uo(t,{from:r[i].from,to:r[i].to,text:i?[""]:e.text,origin:e.origin});else uo(t,e)}}function uo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var n=wi(t,e);Wi(t,e,n,t.cm?t.cm.curOp.id:NaN),po(t,e,n,ke(t,e));var r=[];_i(t,(function(t,n){n||-1!=W(r,t.history)||(yo(t.history,e),r.push(t.history)),po(t,e,null,ke(t,e))}))}}function ho(t,e,n){var r=t.cm&&t.cm.state.suppressEdits;if(!r||n){for(var i,o=t.history,a=t.sel,s="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c=0;--p){var d=f(p);if(d)return d.v}}}}function fo(t,e){if(0!=e&&(t.first+=e,t.sel=new Si(X(t.sel.ranges,(function(t){return new xi(te(t.anchor.line+e,t.anchor.ch),te(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){hr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;rt.lastLine())){if(e.from.lineo&&(e={from:e.from,to:te(o,Kt(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Yt(t,e.from,e.to),n||(n=wi(t,e)),t.cm?function(t,e,n){var r=t.doc,i=t.display,o=e.from,a=e.to,s=!1,l=o.line;t.options.lineWrapping||(l=qt(Ue(Kt(r,o.line))),r.iter(l,a.line+1,(function(t){if(t==i.maxLine)return s=!0,!0}))),r.sel.contains(e.from,e.to)>-1&>(t),Mi(r,e,n,sr(t)),t.options.lineWrapping||(r.iter(l,o.line+e.text.length,(function(t){var e=ze(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)})),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;r--){var i=Kt(t,r).stateAfter;if(i&&(!(i instanceof ce)||r+i.lookAhead1||!(this.children[0]instanceof To))){var s=[];this.collapse(s),this.children=[new To(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var a=i.lines.length%25+25,s=a;s10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(De(t,e.line,e,n,o)||e.line!=n.line&&De(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Se=!0}o.addToHistory&&Wi(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,n.line+1,(function(t){c&&o.collapsed&&!c.options.lineWrapping&&Ue(t)==c.display.maxLine&&(s=!0),o.collapsed&&l!=e.line&&Xt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new xe(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&t.iter(e.line,n.line+1,(function(e){Be(t,e)&&Xt(e,0)})),o.clearOnEnter&&ht(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Oe=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++Eo,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)hr(c,e.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=e.line;u<=n.line;u++)fr(c,u,"text");o.atomic&&no(c.doc),ln(c,"markerAdded",c,o)}return o}Co.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Kr(t),vt(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&hr(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&no(t.doc)),t&&ln(t,"markerCleared",t,this,r,i),e&&Yr(t),this.parent&&this.parent.clear()}},Co.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i=0;l--)co(this,r[l]);s?Ji(this,s):this.cm&&Ir(this.cm)})),undo:ni((function(){ho(this,"undo")})),redo:ni((function(){ho(this,"redo")})),undoSelection:ni((function(){ho(this,"undo",!0)})),redoSelection:ni((function(){ho(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,n){t=se(this,t),e=se(this,e);var r=[],i=t.line;return this.iter(t.line,e.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=t.line||null!=l.from&&i==e.line&&l.from>=e.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var r=0;rt)return e=t,!0;t-=o,++n})),se(this,te(n,e))},indexFromPos:function(t){var e=(t=se(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var f;if(e.state.draggingText&&!e.state.draggingText.copy&&(f=e.listSelections()),to(e.doc,Ci(n,n)),f)for(var p=0;p=0;e--)mo(t.doc,"",r[e].from,r[e].to,"+delete");Ir(t)}))}function Jo(t,e,n){var r=it(t.text,e+n,n);return r<0||r>t.text.length?null:r}function Qo(t,e,n){var r=Jo(t,e.ch,n);return null==r?null:new te(e.line,r,n<0?"after":"before")}function ta(t,e,n,r,i){if(t){"rtl"==e.doc.direction&&(i=-i);var o=ct(n,e.doc.direction);if(o){var a,s=i<0?$(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var c=Rn(e,n);a=i<0?n.text.length-1:0;var u=Mn(e,c,a).top;a=ot((function(t){return Mn(e,c,t).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Jo(n,a,1))}else a=i<0?s.to:s.from;return new te(r,a,l)}}return new te(r,i<0?n.text.length:0,i<0?"before":"after")}Go.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Go.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Go.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Go.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Go.default=y?Go.macDefault:Go.pcDefault;var ea={selectAll:so,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),H)},killLine:function(t){return Zo(t,(function(e){if(e.empty()){var n=Kt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)i=new te(i.line,i.ch+1),t.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),te(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var a=Kt(t.doc,i.line-1).text;a&&(i=new te(i.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),te(i.line-1,a.length-1),i,"+transpose"))}n.push(new xi(i,i))}t.setSelections(n)}))},newlineAndIndent:function(t){return Qr(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;r-1&&(ee((i=c.ranges[i]).from(),e)<0||e.xRel>0)&&(ee(i.to(),e)>0||e.xRel<0)?function(t,e,n,r){var i=t.display,o=!1,c=ti(t,(function(e){l&&(i.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:xr(t)),pt(i.wrapper.ownerDocument,"mouseup",c),pt(i.wrapper.ownerDocument,"mousemove",u),pt(i.scroller,"dragstart",h),pt(i.scroller,"drop",c),o||(bt(e),r.addNew||$i(t.doc,n,null,null,r.extend),l&&!f||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return o=!0};l&&(i.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,ht(i.wrapper.ownerDocument,"mouseup",c),ht(i.wrapper.ownerDocument,"mousemove",u),ht(i.scroller,"dragstart",h),ht(i.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(t,r,e,o):function(t,e,n,r){a&&xr(t);var i=t.display,o=t.doc;bt(e);var s,l,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?u[l]:new xi(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new xi(n,n)),n=cr(t,e,!0,!0),l=-1;else{var h=va(t,n,r.unit);s=r.extend?Yi(s,h.anchor,h.head,r.extend):h}r.addNew?-1==l?(l=u.length,Qi(o,Ei(t,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(Qi(o,Ei(t,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):qi(o,l,s,G):(l=0,Qi(o,new Si([s],0),G),c=o.sel);var f=n;function p(e){if(0!=ee(f,e))if(f=e,"rectangle"==r.unit){for(var i=[],a=t.options.tabSize,u=U(Kt(o,n.line).text,n.ch,a),h=U(Kt(o,e.line).text,e.ch,a),p=Math.min(u,h),d=Math.max(u,h),m=Math.min(n.line,e.line),g=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=g;m++){var v=Kt(o,m).text,y=V(v,p,a);p==d?i.push(new xi(te(m,y),te(m,y))):v.length>y&&i.push(new xi(te(m,y),te(m,V(v,d,a))))}i.length||i.push(new xi(n,n)),Qi(o,Ei(t,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,T=s,O=va(t,e,r.unit),S=T.anchor;ee(O.anchor,S)>0?(b=O.head,S=oe(T.from(),O.anchor)):(b=O.anchor,S=ie(T.to(),O.head));var x=c.ranges.slice(0);x[l]=function(t,e){var n=e.anchor,r=e.head,i=Kt(t.doc,n.line);if(0==ee(n,r)&&n.sticky==r.sticky)return e;var o=ct(i);if(!o)return e;var a=st(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return e;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=st(o,r.ch,r.sticky),h=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var f=o[c+(l?-1:0)],p=l==(1==f.level),d=p?f.from:f.to,m=p?"after":"before";return n.ch==d&&n.sticky==m?e:new xi(new te(n.line,d,m),r)}(t,new xi(se(o,S),b)),Qi(o,Ei(t,x,l),G)}}var d=i.wrapper.getBoundingClientRect(),m=0;function g(e){t.state.selectingText=!1,m=1/0,e&&(bt(e),i.input.focus()),pt(i.wrapper.ownerDocument,"mousemove",v),pt(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var v=ti(t,(function(e){0!==e.buttons&&Et(e)?function e(n){var a=++m,s=cr(t,n,!0,"rectangle"==r.unit);if(s)if(0!=ee(s,f)){t.curOp.focus=R(),p(s);var l=wr(i,o);(s.line>=l.to||s.lined.bottom?20:0;c&&setTimeout(ti(t,(function(){m==a&&(i.scroller.scrollTop+=c,e(n))})),50)}}(e):g(e)})),y=ti(t,g);t.state.selectingText=y,ht(i.wrapper.ownerDocument,"mousemove",v),ht(i.wrapper.ownerDocument,"mouseup",y)}(t,r,e,o)}(e,r,o,t):xt(t)==n.scroller&&bt(t):2==i?(r&&$i(e.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(x?e.display.input.onContextMenu(t):xr(e)))}}function va(t,e,n){if("char"==n)return new xi(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new xi(te(e.line,0),se(t.doc,te(e.line+1,0)));var r=n(t,e);return new xi(r.from,r.to)}function ya(t,e,n,r){var i,o;if(e.touches)i=e.touches[0].clientX,o=e.touches[0].clientY;else try{i=e.clientX,o=e.clientY}catch(t){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&bt(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!vt(t,n))return Ot(e);o-=s.top-a.viewOffset;for(var l=0;l=i)return dt(t,n,t,Zt(t.doc,o),t.display.gutterSpecs[l].className,e),Ot(e)}}function ba(t,e){return ya(t,e,"gutterClick",!0)}function Ta(t,e){Sn(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&ya(t,e,"gutterContextMenu",!1)}(t,e)||mt(t,e,"contextmenu")||x||t.display.input.onContextMenu(e)}function Oa(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Wn(t)}ma.prototype.compare=function(t,e,n){return this.time+400>t&&0==ee(e,this.pos)&&n==this.button};var Sa={toString:function(){return"CodeMirror.Init"}},xa={},Ea={};function Ca(t,e,n){if(!e!=!(n&&n!=Sa)){var r=t.display.dragFunctions,i=e?ht:pt;i(t.display.scroller,"dragstart",r.start),i(t.display.scroller,"dragenter",r.enter),i(t.display.scroller,"dragover",r.over),i(t.display.scroller,"dragleave",r.leave),i(t.display.scroller,"drop",r.drop)}}function ka(t){t.options.lineWrapping?(M(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(k(t.display.wrapper,"CodeMirror-wrap"),Ve(t)),lr(t),hr(t),Wn(t),setTimeout((function(){return Br(t)}),100)}function Na(t,e){var n=this;if(!(this instanceof Na))return new Na(t,e);this.options=e=e?D(e):{},D(xa,e,!1);var r=e.value;"string"==typeof r?r=new Io(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var i=new Na.inputStyles[e.inputStyle](this),o=this.display=new gi(t,r,i,e);for(var c in o.wrapper.CodeMirror=this,Oa(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),zr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new F,keySeq:null,specialChars:null},e.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",ti(t,ga)),ht(e.scroller,"dblclick",a&&s<11?ti(t,(function(e){if(!mt(t,e)){var n=cr(t,e);if(n&&!ba(t,e)&&!Sn(t.display,e)){bt(e);var r=t.findWordAt(n);$i(t.doc,r.anchor,r.head)}}})):function(e){return mt(t,e)||bt(e)}),ht(e.scroller,"contextmenu",(function(e){return Ta(t,e)})),ht(e.input.getField(),"contextmenu",(function(n){e.scroller.contains(n.target)||Ta(t,n)}));var n,r={end:0};function i(){e.activeTouch&&(n=setTimeout((function(){return e.activeTouch=null}),1e3),(r=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,r=e.top-t.top;return n*n+r*r>400}ht(e.scroller,"touchstart",(function(i){if(!mt(t,i)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(i)&&!ba(t,i)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}})),ht(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ht(e.scroller,"touchend",(function(n){var r=e.activeTouch;if(r&&!Sn(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=t.coordsChar(e.activeTouch,"page");a=!r.prev||o(r,r.prev)?new xi(s,s):!r.prev.prev||o(r,r.prev.prev)?t.findWordAt(s):new xi(te(s.line,0),se(t.doc,te(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),bt(n)}i()})),ht(e.scroller,"touchcancel",i),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Pr(t,e.scroller.scrollTop),Dr(t,e.scroller.scrollLeft,!0),dt(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return Oi(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return Oi(t,e)})),ht(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){mt(t,e)||St(e)},over:function(e){mt(t,e)||(function(t,e){var n=cr(t,e);if(n){var r=document.createDocumentFragment();yr(t,n,r),t.display.dragCursor||(t.display.dragCursor=L("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),w(t.display.dragCursor,r)}}(t,e),St(e))},start:function(e){return function(t,e){if(a&&(!t.state.draggingText||+new Date-Ro<100))St(e);else if(!mt(t,e)&&!Sn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!f)){var n=L("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(t,e)},drop:ti(t,Mo),leave:function(e){mt(t,e)||_o(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return ha.call(t,e)})),ht(l,"keydown",ti(t,ua)),ht(l,"keypress",ti(t,fa)),ht(l,"focus",(function(e){return Er(t,e)})),ht(l,"blur",(function(e){return Cr(t,e)}))}(this),Do(),Kr(this),this.curOp.forceUpdate=!0,Pi(this,r),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Er(n)}),20):Cr(this),Ea)Ea.hasOwnProperty(c)&&Ea[c](this,e[c],Sa);fi(this),e.finishInit&&e.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?U(Kt(o,e-1).text,null,a):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",f=0;if(t.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)f+=a,h+="\t";if(fa,l=It(e),c=null;if(s&&r.ranges.length>1)if(Aa&&Aa.text.join("\n")==e){if(r.ranges.length%Aa.text.length==0){c=[];for(var u=0;u=0;f--){var p=r.ranges[f],d=p.from(),m=p.to();p.empty()&&(n&&n>0?d=te(d.line,d.ch-n):t.state.overwrite&&!s?m=te(m.line,Math.min(Kt(o,m.line).text.length,m.ch+$(l).length)):s&&Aa&&Aa.lineWise&&Aa.text.join("\n")==l.join("\n")&&(d=m=te(d.line,0)));var g={from:d,to:m,text:c?c[f%c.length]:l,origin:i||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};co(t.doc,g),ln(t,"inputRead",t,g)}e&&!s&&_a(t,e),Ir(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Ma(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Qr(e,(function(){return Ra(e,n,0,null,"paste")})),!0}function _a(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=t.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=La(t,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Kt(t.doc,i.head.line).text.slice(0,i.head.ch))&&(a=La(t,i.head.line,"smart"));a&&ln(t,"electricInput",t,i.head.line)}}}function Pa(t){for(var e=[],n=[],r=0;r0?0:-1));a=isNaN(u)?null:new te(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(u>=55296&&u<56320?2:1))),-n)}else a=i?function(t,e,n,r){var i=ct(e,t.doc.direction);if(!i)return Qo(e,n,r);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=st(i,n.ch,n.sticky),a=i[o];if("ltr"==t.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&f>=u.begin)){var p=h?"before":"after";return new te(n.line,f,p)}}var d=function(t,e,r){for(var o=function(t,e){return e?new te(n.line,l(t,1),"before"):new te(n.line,t,"after")};t>=0&&t0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==e.text.length||!(m=d(r>0?0:i.length-1,r,c(g)))?null:m}(t.cm,s,e,n):Qo(s,e,n);if(null==a){if(o||(c=e.line+l)=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(s=Kt(t,c))))return!1;e=ta(i,t.cm,s,e.line,l)}else e=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,h="group"==r,f=t.cm&&t.cm.getHelper(e,"wordChars"),p=!0;!(n<0)||c(!p);p=!1){var d=s.text.charAt(e.ch)||"\n",m=tt(d,f)?"w":h&&"\n"==d?"n":!h||/\s/.test(d)?null:"p";if(!h||p||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),e.sticky="after");break}if(m&&(u=m),n>0&&!c(!p))break}var g=oo(t,e,o,a,!0);return ne(o,g)&&(g.hitSide=!0),g}function Fa(t,e,n,r){var i,o,a=t.doc,s=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(t.display),3);i=(n>0?e.bottom:e.top)+n*c}else"line"==r&&(i=n>0?e.bottom+3:e.top-3);for(;(o=qn(t,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Wa=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new F,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ba(t,e){var n=In(t,e.line);if(!n||n.hidden)return null;var r=Kt(t.doc,e.line),i=Ln(n,r,e.line),o=ct(r,t.doc.direction),a="left";o&&(a=st(o,e.ch)%2?"right":"left");var s=jn(i.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ha(t,e){return e&&(t.bad=!0),t}function Ga(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return Ha(t.clipPos(te(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var i=0;i=e.display.viewTo||o.line=e.display.viewFrom&&Ba(e,i)||{node:l[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=te(a.line-1,Kt(r.doc,a.line-1).length)),s.ch==Kt(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(t=ur(r,a.line))?(e=qt(i.view[0].line),n=i.view[0].node):(e=qt(i.view[t].line),n=i.view[t-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=qt(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(t,e,n,r,i){var o="",a=!1,s=t.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(t){t&&(c(),o+=t)}function h(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,f=e.getAttribute("cm-marker");if(f){var p=t.findMarks(te(r,0),te(i+1,0),(g=+f,function(t){return t.id==g}));return void(p.length&&(o=p[0].find(0))&&u(Yt(t.doc,o.from,o.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var d=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;d&&c();for(var m=0;m1&&f.length>1;)if($(h)==$(f))h.pop(),f.pop(),l--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),e++}for(var p=0,d=0,m=h[0],g=f[0],v=Math.min(m.length,g.length);pa.ch&&y.charCodeAt(y.length-d-1)==b.charCodeAt(b.length-d-1);)p--,d++;h[h.length-1]=y.slice(0,y.length-d).replace(/^\u200b+/,""),h[0]=h[0].slice(p).replace(/\u200b+$/,"");var O=te(e,p),S=te(l,f.length?$(f).length-d:0);return h.length>1||h[0]||ee(O,S)?(mo(r.doc,h,O,S,"+input"),!0):void 0},Wa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Wa.prototype.reset=function(){this.forceCompositionEnd()},Wa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Wa.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Wa.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return hr(t.cm)}))},Wa.prototype.setUneditable=function(t){t.contentEditable="false"},Wa.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||ti(this.cm,Ra)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Wa.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Wa.prototype.onContextMenu=function(){},Wa.prototype.resetPosition=function(){},Wa.prototype.needsContentAttribute=!0;var Va=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new F,this.hasSelection=!1,this.composing=null};Va.prototype.init=function(t){var e=this,n=this,r=this.cm;this.createField(t);var i=this.textarea;function o(t){if(!mt(r,t)){if(r.somethingSelected())Ia({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Pa(r);Ia({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,H):(n.prevInput="",i.value=e.text.join("\n"),P(i))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),m&&(i.style.width="0px"),ht(i,"input",(function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),ht(i,"paste",(function(t){mt(r,t)||Ma(t,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),ht(i,"cut",o),ht(i,"copy",o),ht(t.scroller,"paste",(function(e){if(!Sn(t,e)&&!mt(r,e)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,i.dispatchEvent(o)}})),ht(t.lineSpace,"selectstart",(function(e){Sn(t,e)||bt(e)})),ht(i,"compositionstart",(function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ht(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Va.prototype.createField=function(t){this.wrapper=Da(),this.textarea=this.wrapper.firstChild},Va.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Va.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=vr(t);if(t.options.moveInputWithCursor){var i=Yn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Va.prototype.showSelection=function(t){var e=this.cm.display;w(e.cursorDiv,t.cursors),w(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Va.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&P(this.textarea),a&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Va.prototype.getField=function(){return this.textarea},Va.prototype.supportsTouch=function(){return!1},Va.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||R()!=this.textarea))try{this.textarea.focus()}catch(t){}},Va.prototype.blur=function(){this.textarea.blur()},Va.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Va.prototype.receivedFocus=function(){this.slowPoll()},Va.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Va.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}))},Va.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||Rt(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==r&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Va.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Va.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Va.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,i=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=cr(n,t),c=r.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ti(n,Qi)(n.doc,Ci(o),H);var u,f=i.style.cssText,p=e.wrapper.style.cssText,d=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-d.top-5)+"px; left: "+(t.clientX-d.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),x){St(t);var m=function(){pt(window,"mouseup",m),setTimeout(v,20)};ht(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var t=n.somethingSelected(),o="​"+(t?i.value:"");i.value="⇚",i.value=o,e.prevInput=t?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=p,i.style.cssText=f,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&g();var t=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==e.prevInput?ti(n,so)(n):t++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Va.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Va.prototype.setUneditable=function(){},Va.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,r,i,o){t.defaults[n]=r,i&&(e[n]=o?function(t,e,n){n!=Sa&&i(t,e,n)}:i)}t.defineOption=n,t.Init=Sa,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,Ai(t)}),!0),n("indentUnit",2,Ai,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){Ii(t),Wn(t),hr(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter((function(t){for(var i=0;;){var o=t.text.indexOf(e,i);if(-1==o)break;i=o+e.length,n.push(te(r,o))}r++}));for(var i=n.length-1;i>=0;i--)mo(t.doc,e,n[i],te(n[i].line,n[i].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Sa&&t.refresh()})),n("specialCharPlaceholder",Je,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!T),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){Oa(t),mi(t)}),!0),n("keyMap","default",(function(t,e,n){var r=qo(e),i=n!=Sa&&qo(n);i&&i.detach&&i.detach(t,r),r.attach&&r.attach(t,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,ka,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=pi(e,t.options.lineNumbers),mi(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?ar(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return Br(t)}),!0),n("scrollbarStyle","native",(function(t){zr(t),Br(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=pi(t.options.gutters,e),mi(t)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(t){return t}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(Cr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,Ca),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ii,!0),n("addModeClass",!1,Ii,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,Ii,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}(Na),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var r=this.options,i=r[t];r[t]==n&&"mode"!=t||(r[t]=n,e.hasOwnProperty(t)&&ti(this,e[t])(this,n,i),dt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](qo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(La(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&Ir(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&qi(this.doc,r,new xi(o,c[r].to()),H)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,te(t),e,!0)},getTokenTypeAt:function(t){t=se(this.doc,t);var e,n=fe(this,Kt(this.doc,t.line)),r=0,i=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(t=o,i=!0),r=Kt(this.doc,t)}else r=t;return zn(this,r,{top:0,left:0},e||"page",n||i).top+(i?this.doc.height-Ge(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,i){var o,a,s,l=this.display,c=(t=Yn(this,se(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==r)c=t.top;else if("above"==r||"near"==r){var h=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>h)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=h&&(c=t.bottom),u+e.offsetWidth>f&&(u=f-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==i?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(s=Lr(o,a)).scrollTop&&Pr(o,s.scrollTop),null!=s.scrollLeft&&Dr(o,s.scrollLeft))},triggerOnKeyDown:ei(ua),triggerOnKeyPress:ei(fa),triggerOnKeyUp:ha,triggerOnMouseDown:ei(ga),execCommand:function(t){if(ea.hasOwnProperty(t))return ea[t].call(null,this)},triggerElectric:ei((function(t){_a(this,t)})),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var o=se(this.doc,t),a=0;a0&&a(e.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&lr(this),dt(this,"refresh",this)})),swapDoc:ei((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Pi(this,t),Wn(this),this.display.input.reset(),Rr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(t),t.registerHelper=function(e,r,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=i},t.registerGlobalHelper=function(e,r,i,o){t.registerHelper(e,r,o),n[e]._global.push({pred:i,val:o})}}(Na);var Ka="iter insert remove copy getEditor constructor".split(" ");for(var Ya in Io.prototype)Io.prototype.hasOwnProperty(Ya)&&W(Ka,Ya)<0&&(Na.prototype[Ya]=function(t){return function(){return t.apply(this.doc,arguments)}}(Io.prototype[Ya]));return yt(Io),Na.inputStyles={textarea:Va,contenteditable:Wa},Na.defineMode=function(t){Na.defaults.mode||"null"==t||(Na.defaults.mode=t),Dt.apply(this,arguments)},Na.defineMIME=function(t,e){jt[t]=e},Na.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Na.defineMIME("text/plain","null"),Na.defineExtension=function(t,e){Na.prototype[t]=e},Na.defineDocExtension=function(t,e){Io.prototype[t]=e},Na.fromTextArea=function(t,e){if((e=e?D(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=R();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=s.getValue()}var i;if(t.form&&(ht(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(n){n.save=r,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,r(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(pt(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var s=Na((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return s},function(t){t.off=pt,t.on=ht,t.wheelEventPixels=Ti,t.Doc=Io,t.splitLines=It,t.countColumn=U,t.findColumn=V,t.isWordChar=Q,t.Pass=B,t.signal=dt,t.Line=Ke,t.changeEnd=ki,t.scrollbarModel=Gr,t.Pos=te,t.cmpPos=ee,t.modes=Pt,t.mimeModes=jt,t.resolveMode=Ut,t.getMode=Ft,t.modeExtensions=Wt,t.extendMode=Bt,t.copyState=Ht,t.startState=zt,t.innerMode=Gt,t.commands=ea,t.keyMap=Go,t.keyName=Xo,t.isModifierKey=Yo,t.lookupKey=Ko,t.normalizeKeyMap=Vo,t.StringStream=Vt,t.SharedTextMarker=No,t.TextMarker=Co,t.LineWidget=So,t.e_preventDefault=bt,t.e_stopPropagation=Tt,t.e_stop=St,t.addClass=M,t.contains=I,t.rmClass=k,t.keyNames=Fo}(Na),Na.version="5.58.3",Na}()},function(t,e,n){"use strict";n.r(e),n.d(e,"VERSION",(function(){return r})),n.d(e,"CstParser",(function(){return nn})),n.d(e,"EmbeddedActionsParser",(function(){return rn})),n.d(e,"ParserDefinitionErrorType",(function(){return Ze})),n.d(e,"EMPTY_ALT",(function(){return tn})),n.d(e,"Lexer",(function(){return $})),n.d(e,"LexerDefinitionErrorType",(function(){return V})),n.d(e,"createToken",(function(){return J})),n.d(e,"createTokenInstance",(function(){return tt})),n.d(e,"EOF",(function(){return Q})),n.d(e,"tokenLabel",(function(){return X})),n.d(e,"tokenMatcher",(function(){return et})),n.d(e,"tokenName",(function(){return q})),n.d(e,"defaultGrammarResolverErrorProvider",(function(){return Lt})),n.d(e,"defaultGrammarValidatorErrorProvider",(function(){return At})),n.d(e,"defaultParserErrorProvider",(function(){return wt})),n.d(e,"EarlyExitException",(function(){return ve})),n.d(e,"isRecognitionException",(function(){return pe})),n.d(e,"MismatchedTokenException",(function(){return de})),n.d(e,"NotAllInputParsedException",(function(){return ge})),n.d(e,"NoViableAltException",(function(){return me})),n.d(e,"defaultLexerErrorProvider",(function(){return K})),n.d(e,"Alternation",(function(){return ft})),n.d(e,"Alternative",(function(){return at})),n.d(e,"NonTerminal",(function(){return it})),n.d(e,"Option",(function(){return st})),n.d(e,"Repetition",(function(){return ut})),n.d(e,"RepetitionMandatory",(function(){return lt})),n.d(e,"RepetitionMandatoryWithSeparator",(function(){return ct})),n.d(e,"RepetitionWithSeparator",(function(){return ht})),n.d(e,"Rule",(function(){return ot})),n.d(e,"Terminal",(function(){return pt})),n.d(e,"serializeGrammar",(function(){return dt})),n.d(e,"serializeProduction",(function(){return mt})),n.d(e,"GAstVisitor",(function(){return yt})),n.d(e,"assignOccurrenceIndices",(function(){return he})),n.d(e,"resolveGrammar",(function(){return ce})),n.d(e,"validateGrammar",(function(){return ue})),n.d(e,"clearCache",(function(){return gn})),n.d(e,"createSyntaxDiagramsCode",(function(){return on})),n.d(e,"generateParserFactory",(function(){return dn})),n.d(e,"generateParserModule",(function(){return mn})),n.d(e,"Parser",(function(){return vn}));var r="7.0.3",i=n(0),o=n(1),a={},s=new o.RegExpParser;function l(t){var e=t.toString();if(a.hasOwnProperty(e))return a[e];var n=s.pattern(e);return a[e]=n,n}var c,u=(c=function(t,e){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h='Unable to use "first char" lexer optimizations:\n';function f(t,e){void 0===e&&(e=!1);try{var n=l(t);return function t(e,n,r){switch(e.type){case"Disjunction":for(var o=0;o=_)for(var o=e.from>=_?e.from:_,a=e.to,s=P(o),l=P(a),c=s;c<=l;c++)n[c]=c}}}));break;case"Group":t(l.value,n,r);break;default:throw Error("Non Exhaustive Match")}var c=void 0!==l.quantifier&&0===l.quantifier.atLeast;if("Group"===l.type&&!1===m(l)||"Group"!==l.type&&!1===c)break}break;default:throw Error("non exhaustive match!")}return Object(i.U)(n)}(n.value,{},n.flags.ignoreCase)}catch(n){if("Complement Sets are not supported for first char optimization"===n.message)e&&Object(i.d)(h+"\tUnable to optimize: < "+t.toString()+" >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var r="";e&&(r="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Object(i.c)(h+"\n\tFailed parsing: < "+t.toString()+" >\n\tUsing the regexp-to-ast library version: "+o.VERSION+"\n\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues"+r)}}return[]}function p(t,e,n){var r=P(t);e[r]=r,!0===n&&function(t,e){var n=String.fromCharCode(t),r=n.toUpperCase();if(r!==n){var i=P(r.charCodeAt(0));e[i]=i}else{var o=n.toLowerCase();if(o!==n){i=P(o.charCodeAt(0));e[i]=i}}}(t,e)}function d(t,e){return Object(i.q)(t.value,(function(t){if("number"==typeof t)return Object(i.j)(e,t);var n=t;return void 0!==Object(i.q)(e,(function(t){return n.from<=t&&t<=n.to}))}))}function m(t){return!(!t.quantifier||0!==t.quantifier.atLeast)||!!t.value&&(Object(i.y)(t.value)?Object(i.o)(t.value,m):m(t.value))}var g=function(t){function e(e){var n=t.call(this)||this;return n.targetCharCodes=e,n.found=!1,n}return u(e,t),e.prototype.visitChildren=function(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e)}t.prototype.visitChildren.call(this,e)}},e.prototype.visitCharacter=function(t){Object(i.j)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?void 0===d(t,this.targetCharCodes)&&(this.found=!0):void 0!==d(t,this.targetCharCodes)&&(this.found=!0)},e}(o.BaseRegExpVisitor);function v(t,e){if(e instanceof RegExp){var n=l(e),r=new g(t);return r.visit(n),r.found}return void 0!==Object(i.q)(e,(function(e){return Object(i.j)(t,e.charCodeAt(0))}))}var y=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b="PATTERN",T="boolean"==typeof new RegExp("(?:)").sticky;function O(t,e){var n,r=(e=Object(i.k)(e,{useSticky:T,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(t,e){return e()}})).tracer;r("initCharCodeToOptimizedIndexMap",(function(){!function(){if(Object(i.A)(j)){j=new Array(65536);for(var t=0;t<65536;t++)j[t]=t>255?255+~~(t/255):t}}()})),r("Reject Lexer.NA",(function(){n=Object(i.P)(t,(function(t){return t[b]===$.NA}))}));var o,a,s,l,c,u,p,d,m,g,y,O=!1;r("Transform Patterns",(function(){O=!1,o=Object(i.I)(n,(function(t){var n=t[b];if(Object(i.D)(n)){var r=n.source;return 1!==r.length||"^"===r||"$"===r||"."===r||n.ignoreCase?2!==r.length||"\\"!==r[0]||Object(i.j)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?e.useSticky?k(n):C(n):r[1]:r}if(Object(i.B)(n))return O=!0,{exec:n};if(Object(i.w)(n,"exec"))return O=!0,n;if("string"==typeof n){if(1===n.length)return n;var o=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),a=new RegExp(o);return e.useSticky?k(a):C(a)}throw Error("non exhaustive match")}))})),r("misc mapping",(function(){a=Object(i.I)(n,(function(t){return t.tokenTypeIdx})),s=Object(i.I)(n,(function(t){var e=t.GROUP;if(e!==$.SKIPPED){if(Object(i.E)(e))return e;if(Object(i.F)(e))return!1;throw Error("non exhaustive match")}})),l=Object(i.I)(n,(function(t){var e=t.LONGER_ALT;if(e)return Object(i.x)(n,e)})),c=Object(i.I)(n,(function(t){return t.PUSH_MODE})),u=Object(i.I)(n,(function(t){return Object(i.w)(t,"POP_MODE")}))})),r("Line Terminator Handling",(function(){var t=R(e.lineTerminatorCharacters);p=Object(i.I)(n,(function(t){return!1})),"onlyOffset"!==e.positionTracking&&(p=Object(i.I)(n,(function(e){return Object(i.w)(e,"LINE_BREAKS")?e.LINE_BREAKS:!1===I(e,t)?v(t,e.PATTERN):void 0})))})),r("Misc Mapping #2",(function(){d=Object(i.I)(n,w),m=Object(i.I)(o,L),g=Object(i.O)(n,(function(t,e){var n=e.GROUP;return Object(i.E)(n)&&n!==$.SKIPPED&&(t[n]=[]),t}),{}),y=Object(i.I)(o,(function(t,e){return{pattern:o[e],longerAlt:l[e],canLineTerminator:p[e],isCustom:d[e],short:m[e],group:s[e],push:c[e],pop:u[e],tokenTypeIdx:a[e],tokenType:n[e]}}))}));var S=!0,x=[];return e.safeMode||r("First Char Optimization",(function(){x=Object(i.O)(n,(function(t,n,r){if("string"==typeof n.PATTERN){var o=P(n.PATTERN.charCodeAt(0));M(t,o,y[r])}else if(Object(i.y)(n.START_CHARS_HINT)){var a;Object(i.u)(n.START_CHARS_HINT,(function(e){var n=P("string"==typeof e?e.charCodeAt(0):e);a!==n&&(a=n,M(t,n,y[r]))}))}else if(Object(i.D)(n.PATTERN))if(n.PATTERN.unicode)S=!1,e.ensureOptimizations&&Object(i.c)(h+"\tUnable to analyze < "+n.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var s=f(n.PATTERN,e.ensureOptimizations);Object(i.A)(s)&&(S=!1),Object(i.u)(s,(function(e){M(t,e,y[r])}))}else e.ensureOptimizations&&Object(i.c)(h+"\tTokenType: <"+n.name+"> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),S=!1;return t}),[])})),r("ArrayPacking",(function(){x=Object(i.L)(x)})),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:x,hasCustom:O,canBeOptimized:S}}function S(t,e){var n=[],r=function(t){var e=Object(i.p)(t,(function(t){return!Object(i.w)(t,b)})),n=Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:V.MISSING_PATTERN,tokenTypes:[t]}})),r=Object(i.l)(t,e);return{errors:n,valid:r}}(t);n=n.concat(r.errors);var a=function(t){var e=Object(i.p)(t,(function(t){var e=t[b];return!(Object(i.D)(e)||Object(i.B)(e)||Object(i.w)(e,"exec")||Object(i.E)(e))})),n=Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:V.INVALID_PATTERN,tokenTypes:[t]}})),r=Object(i.l)(t,e);return{errors:n,valid:r}}(r.valid),s=a.valid;return n=(n=(n=(n=(n=n.concat(a.errors)).concat(function(t){var e=[],n=Object(i.p)(t,(function(t){return Object(i.D)(t[b])}));return e=(e=(e=(e=(e=e.concat(function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.found=!1,e}return y(e,t),e.prototype.visitEndAnchor=function(t){this.found=!0},e}(o.BaseRegExpVisitor),n=Object(i.p)(t,(function(t){var n=t[b];try{var r=l(n),i=new e;return i.visit(r),i.found}catch(t){return x.test(n.source)}}));return Object(i.I)(n,(function(t){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:V.EOI_ANCHOR_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.found=!1,e}return y(e,t),e.prototype.visitStartAnchor=function(t){this.found=!0},e}(o.BaseRegExpVisitor),n=Object(i.p)(t,(function(t){var n=t[b];try{var r=l(n),i=new e;return i.visit(r),i.found}catch(t){return E.test(n.source)}}));return Object(i.I)(n,(function(t){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:V.SOI_ANCHOR_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=Object(i.p)(t,(function(t){var e=t[b];return e instanceof RegExp&&(e.multiline||e.global)}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:V.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=[],n=Object(i.I)(t,(function(n){return Object(i.O)(t,(function(t,r){return n.PATTERN.source!==r.PATTERN.source||Object(i.j)(e,r)||r.PATTERN===$.NA||(e.push(r),t.push(r)),t}),[])}));n=Object(i.i)(n);var r=Object(i.p)(n,(function(t){return t.length>1}));return Object(i.I)(r,(function(t){var e=Object(i.I)(t,(function(t){return t.name}));return{message:"The same RegExp pattern ->"+Object(i.s)(t).PATTERN+"<-has been used in all of the following Token Types: "+e.join(", ")+" <-",type:V.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}}))}(n))).concat(function(t){var e=Object(i.p)(t,(function(t){return t[b].test("")}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:V.EMPTY_MATCH_PATTERN,tokenTypes:[t]}}))}(n))}(s))).concat(function(t){var e=Object(i.p)(t,(function(t){if(!Object(i.w)(t,"GROUP"))return!1;var e=t.GROUP;return e!==$.SKIPPED&&e!==$.NA&&!Object(i.E)(e)}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:V.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}}))}(s))).concat(function(t,e){var n=Object(i.p)(t,(function(t){return void 0!==t.PUSH_MODE&&!Object(i.j)(e,t.PUSH_MODE)}));return Object(i.I)(n,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+t.PUSH_MODE+"<-which does not exist",type:V.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}}))}(s,e))).concat(function(t){var e=[],n=Object(i.O)(t,(function(t,e,n){var r,o=e.PATTERN;return o===$.NA||(Object(i.E)(o)?t.push({str:o,idx:n,tokenType:e}):Object(i.D)(o)&&(r=o,void 0===Object(i.q)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(function(t){return-1!==r.source.indexOf(t)})))&&t.push({str:o.source,idx:n,tokenType:e})),t}),[]);return Object(i.u)(t,(function(t,r){Object(i.u)(n,(function(n){var o=n.str,a=n.idx,s=n.tokenType;if(r"+t.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";e.push({message:l,type:V.UNREACHABLE_PATTERN,tokenTypes:[t,s]})}}))})),e}(s))}var x=/[^\\][\$]/;var E=/[^\\[][\^]|^\^/;function C(t){var e=t.ignoreCase?"i":"";return new RegExp("^(?:"+t.source+")",e)}function k(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function N(t,e,n){var r=[],o=!1,a=Object(i.i)(Object(i.t)(Object(i.J)(t.modes,(function(t){return t})))),s=Object(i.P)(a,(function(t){return t[b]===$.NA})),l=R(n);return e&&Object(i.u)(s,(function(t){var e=I(t,l);if(!1!==e){var n={message:function(t,e){if(e.issue===V.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+t.name+"> Token Type\n\t Root cause: "+e.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===V.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <"+t.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}(t,e),type:e.issue,tokenType:t};r.push(n)}else Object(i.w)(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(o=!0):v(l,t.PATTERN)&&(o=!0)})),e&&!o&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:V.NO_LINE_BREAKS_FLAGS}),r}function w(t){var e=t.PATTERN;if(Object(i.D)(e))return!1;if(Object(i.B)(e))return!0;if(Object(i.w)(e,"exec"))return!0;if(Object(i.E)(e))return!1;throw Error("non exhaustive match")}function L(t){return!(!Object(i.E)(t)||1!==t.length)&&t.charCodeAt(0)}var A={test:function(t){for(var e=t.length,n=this.lastIndex;n0?t.charCodeAt(0):t}))}function M(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}var _=256;function P(t){return t<_?t:j[t]}var j=[];function D(t,e){var n=t.tokenTypeIdx;return n===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[n]}function U(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}var F=1,W={};function B(t){var e=function(t){var e=Object(i.g)(t),n=t,r=!0;for(;r;){n=Object(i.i)(Object(i.t)(Object(i.I)(n,(function(t){return t.CATEGORIES}))));var o=Object(i.l)(n,e);e=e.concat(o),Object(i.A)(o)?r=!1:n=o}return e}(t);!function(t){Object(i.u)(t,(function(t){var e;H(t)||(W[F]=t,t.tokenTypeIdx=F++),G(t)&&!Object(i.y)(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),G(t)||(t.CATEGORIES=[]),e=t,Object(i.w)(e,"categoryMatches")||(t.categoryMatches=[]),function(t){return Object(i.w)(t,"categoryMatchesMap")}(t)||(t.categoryMatchesMap={})}))}(e),function(t){Object(i.u)(t,(function(t){!function t(e,n){Object(i.u)(e,(function(t){n.categoryMatchesMap[t.tokenTypeIdx]=!0})),Object(i.u)(n.CATEGORIES,(function(r){var o=e.concat(n);Object(i.j)(o,r)||t(o,r)}))}([],t)}))}(e),function(t){Object(i.u)(t,(function(t){t.categoryMatches=[],Object(i.u)(t.categoryMatchesMap,(function(e,n){t.categoryMatches.push(W[n].tokenTypeIdx)}))}))}(e),Object(i.u)(e,(function(t){t.isParent=t.categoryMatches.length>0}))}function H(t){return Object(i.w)(t,"tokenTypeIdx")}function G(t){return Object(i.w)(t,"CATEGORIES")}function z(t){return Object(i.w)(t,"tokenTypeIdx")}var V,K={buildUnableToPopLexerModeMessage:function(t){return"Unable to pop Lexer Mode after encountering Token ->"+t.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(t,e,n,r,i){return"unexpected character: ->"+t.charAt(e)+"<- at offset: "+e+", skipped "+n+" characters."}};!function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"}(V||(V={}));var Y={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:K,traceInitPerf:!1,skipValidations:!1};Object.freeze(Y);var $=function(){function t(t,e){var n=this;if(void 0===e&&(e=Y),this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"==typeof e)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Object(i.K)(Y,e);var r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(function(){var r,o=!0;n.TRACE_INIT("Lexer Config handling",(function(){if(n.config.lineTerminatorsPattern===Y.lineTerminatorsPattern)n.config.lineTerminatorsPattern=A;else if(n.config.lineTerminatorCharacters===Y.lineTerminatorCharacters)throw Error("Error: Missing property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(e.safeMode&&e.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');n.trackStartLines=/full|onlyStart/i.test(n.config.positionTracking),n.trackEndLines=/full/i.test(n.config.positionTracking),Object(i.y)(t)?((r={modes:{}}).modes.defaultMode=Object(i.g)(t),r.defaultMode="defaultMode"):(o=!1,r=Object(i.h)(t))})),!1===n.config.skipValidations&&(n.TRACE_INIT("performRuntimeChecks",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(function(t,e,n){var r=[];return Object(i.w)(t,"defaultMode")||r.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:V.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object(i.w)(t,"modes")||r.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:V.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object(i.w)(t,"modes")&&Object(i.w)(t,"defaultMode")&&!Object(i.w)(t.modes,t.defaultMode)&&r.push({message:"A MultiMode Lexer cannot be initialized with a defaultMode: <"+t.defaultMode+">which does not exist\n",type:V.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object(i.w)(t,"modes")&&Object(i.u)(t.modes,(function(t,e){Object(i.u)(t,(function(t,n){Object(i.F)(t)&&r.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+e+"> at index: <"+n+">\n",type:V.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),r}(r,n.trackStartLines,n.config.lineTerminatorCharacters))})),n.TRACE_INIT("performWarningRuntimeChecks",(function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat(N(r,n.trackStartLines,n.config.lineTerminatorCharacters))}))),r.modes=r.modes?r.modes:{},Object(i.u)(r.modes,(function(t,e){r.modes[e]=Object(i.P)(t,(function(t){return Object(i.F)(t)}))}));var s=Object(i.G)(r.modes);if(Object(i.u)(r.modes,(function(t,r){n.TRACE_INIT("Mode: <"+r+"> processing",(function(){var o;(n.modes.push(r),!1===n.config.skipValidations&&n.TRACE_INIT("validatePatterns",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(S(t,s))})),Object(i.A)(n.lexerDefinitionErrors))&&(B(t),n.TRACE_INIT("analyzeTokenTypes",(function(){o=O(t,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:e.positionTracking,ensureOptimizations:e.ensureOptimizations,safeMode:e.safeMode,tracer:n.TRACE_INIT.bind(n)})})),n.patternIdxToConfig[r]=o.patternIdxToConfig,n.charCodeToPatternIdxToConfig[r]=o.charCodeToPatternIdxToConfig,n.emptyGroups=Object(i.K)(n.emptyGroups,o.emptyGroups),n.hasCustom=o.hasCustom||n.hasCustom,n.canModeBeOptimized[r]=o.canBeOptimized)}))})),n.defaultMode=r.defaultMode,!Object(i.A)(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var l=Object(i.I)(n.lexerDefinitionErrors,(function(t){return t.message})).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+l)}Object(i.u)(n.lexerDefinitionWarning,(function(t){Object(i.d)(t.message)})),n.TRACE_INIT("Choosing sub-methods implementations",(function(){if(T?(n.chopInput=i.a,n.match=n.matchWithTest):(n.updateLastIndex=i.b,n.match=n.matchWithExec),o&&(n.handleModes=i.b),!1===n.trackStartLines&&(n.computeNewColumn=i.a),!1===n.trackEndLines&&(n.updateTokenEndLineColumnLocation=i.b),/full/i.test(n.config.positionTracking))n.createTokenInstance=n.createFullToken;else if(/onlyStart/i.test(n.config.positionTracking))n.createTokenInstance=n.createStartOnlyToken;else{if(!/onlyOffset/i.test(n.config.positionTracking))throw Error('Invalid config option: "'+n.config.positionTracking+'"');n.createTokenInstance=n.createOffsetOnlyToken}n.hasCustom?(n.addToken=n.addTokenUsingPush,n.handlePayload=n.handlePayloadWithCustom):(n.addToken=n.addTokenUsingMemberAccess,n.handlePayload=n.handlePayloadNoCustom)})),n.TRACE_INIT("Failed Optimization Warnings",(function(){var t=Object(i.O)(n.canModeBeOptimized,(function(t,e,n){return!1===e&&t.push(n),t}),[]);if(e.ensureOptimizations&&!Object(i.A)(t))throw Error("Lexer Modes: < "+t.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),n.TRACE_INIT("clearRegExpParserCache",(function(){a={}})),n.TRACE_INIT("toFastProperties",(function(){Object(i.S)(n)}))}))}return t.prototype.tokenize=function(t,e){if(void 0===e&&(e=this.defaultMode),!Object(i.A)(this.lexerDefinitionErrors)){var n=Object(i.I)(this.lexerDefinitionErrors,(function(t){return t.message})).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+n)}return this.tokenizeInternal(t,e)},t.prototype.tokenizeInternal=function(t,e){var n,r,o,a,s,l,c,u,h,f,p,d,m,g,v,y,b,T=this,O=t,S=O.length,x=0,E=0,C=this.hasCustom?0:Math.floor(t.length/10),k=new Array(C),N=[],w=this.trackStartLines?1:void 0,L=this.trackStartLines?1:void 0,A=(v=this.emptyGroups,y={},b=Object(i.G)(v),Object(i.u)(b,(function(t){var e=v[t];if(!Object(i.y)(e))throw Error("non exhaustive match");y[t]=[]})),y),I=this.trackStartLines,R=this.config.lineTerminatorsPattern,M=0,_=[],j=[],D=[],U=[];Object.freeze(U);var F=void 0;function W(){return _}function B(t){var e=P(t),n=j[e];return void 0===n?U:n}var H,G=function(t){if(1===D.length&&void 0===t.tokenType.PUSH_MODE){var e=T.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t);N.push({offset:t.startOffset,line:void 0!==t.startLine?t.startLine:void 0,column:void 0!==t.startColumn?t.startColumn:void 0,length:t.image.length,message:e})}else{D.pop();var n=Object(i.H)(D);_=T.patternIdxToConfig[n],j=T.charCodeToPatternIdxToConfig[n],M=_.length;var r=T.canModeBeOptimized[n]&&!1===T.config.safeMode;F=j&&r?B:W}};function z(t){D.push(t),j=this.charCodeToPatternIdxToConfig[t],_=this.patternIdxToConfig[t],M=_.length,M=_.length;var e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;F=j&&e?B:W}for(z.call(this,e);xs.length&&(s=o,l=c,H=X)}break}}if(null!==s){if(u=s.length,void 0!==(h=H.group)&&(f=H.tokenTypeIdx,p=this.createTokenInstance(s,x,f,H.tokenType,w,L,u),this.handlePayload(p,l),!1===h?E=this.addToken(k,E,p):A[h].push(p)),t=this.chopInput(t,u),x+=u,L=this.computeNewColumn(L,u),!0===I&&!0===H.canLineTerminator){var Z=0,J=void 0,Q=void 0;R.lastIndex=0;do{!0===(J=R.test(s))&&(Q=R.lastIndex-1,Z++)}while(!0===J);0!==Z&&(w+=Z,L=u-Q,this.updateTokenEndLineColumnLocation(p,h,Q,Z,w,L,u))}this.handleModes(H,G,z,p)}else{for(var tt=x,et=w,nt=L,rt=!1;!rt&&x");var r=Object(i.R)(e),o=r.time,a=r.value,s=o>10?console.warn:console.log;return this.traceInitIndent time: "+o+"ms"),this.traceInitIndent--,a}return e()},t.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",t.NA=/NOT_APPLICABLE/,t}();function X(t){return Z(t)?t.LABEL:t.name}function q(t){return t.name}function Z(t){return Object(i.E)(t.LABEL)&&""!==t.LABEL}function J(t){return function(t){var e=t.pattern,n={};n.name=t.name,Object(i.F)(e)||(n.PATTERN=e);if(Object(i.w)(t,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";Object(i.w)(t,"categories")&&(n.CATEGORIES=t.categories);B([n]),Object(i.w)(t,"label")&&(n.LABEL=t.label);Object(i.w)(t,"group")&&(n.GROUP=t.group);Object(i.w)(t,"pop_mode")&&(n.POP_MODE=t.pop_mode);Object(i.w)(t,"push_mode")&&(n.PUSH_MODE=t.push_mode);Object(i.w)(t,"longer_alt")&&(n.LONGER_ALT=t.longer_alt);Object(i.w)(t,"line_breaks")&&(n.LINE_BREAKS=t.line_breaks);Object(i.w)(t,"start_chars_hint")&&(n.START_CHARS_HINT=t.start_chars_hint);return n}(t)}var Q=J({name:"EOF",pattern:$.NA});function tt(t,e,n,r,i,o,a,s){return{image:e,startOffset:n,endOffset:r,startLine:i,endLine:o,startColumn:a,endColumn:s,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function et(t,e){return D(t,e)}B([Q]);var nt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rt=function(){function t(t){this._definition=t}return Object.defineProperty(t.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),t.prototype.accept=function(t){t.visit(this),Object(i.u)(this.definition,(function(e){e.accept(t)}))},t}(),it=function(t){function e(e){var n=t.call(this,[])||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),Object.defineProperty(e.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(rt),ot=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.orgText="",Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),at=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.ignoreAmbiguities=!1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),st=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),lt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ct=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ut=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ht=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ft=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(rt),pt=function(){function t(t){this.idx=1,Object(i.f)(this,Object(i.N)(t,(function(t){return void 0!==t})))}return t.prototype.accept=function(t){t.visit(this)},t}();function dt(t){return Object(i.I)(t,mt)}function mt(t){function e(t){return Object(i.I)(t,mt)}if(t instanceof it)return{type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};if(t instanceof at)return{type:"Alternative",definition:e(t.definition)};if(t instanceof st)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof lt)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof ct)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:mt(new pt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ht)return{type:"RepetitionWithSeparator",idx:t.idx,separator:mt(new pt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ut)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof ft)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof pt){var n={type:"Terminal",name:t.terminalType.name,label:X(t.terminalType),idx:t.idx},r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=Object(i.D)(r)?r.source:r),n}if(t instanceof ot)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var gt=function(){function t(){}return t.prototype.walk=function(t,e){var n=this;void 0===e&&(e=[]),Object(i.u)(t.definition,(function(r,o){var a=Object(i.m)(t.definition,o+1);if(r instanceof it)n.walkProdRef(r,a,e);else if(r instanceof pt)n.walkTerminal(r,a,e);else if(r instanceof at)n.walkFlat(r,a,e);else if(r instanceof st)n.walkOption(r,a,e);else if(r instanceof lt)n.walkAtLeastOne(r,a,e);else if(r instanceof ct)n.walkAtLeastOneSep(r,a,e);else if(r instanceof ht)n.walkManySep(r,a,e);else if(r instanceof ut)n.walkMany(r,a,e);else{if(!(r instanceof ft))throw Error("non exhaustive match");n.walkOr(r,a,e)}}))},t.prototype.walkTerminal=function(t,e,n){},t.prototype.walkProdRef=function(t,e,n){},t.prototype.walkFlat=function(t,e,n){var r=e.concat(n);this.walk(t,r)},t.prototype.walkOption=function(t,e,n){var r=e.concat(n);this.walk(t,r)},t.prototype.walkAtLeastOne=function(t,e,n){var r=[new st({definition:t.definition})].concat(e,n);this.walk(t,r)},t.prototype.walkAtLeastOneSep=function(t,e,n){var r=vt(t,e,n);this.walk(t,r)},t.prototype.walkMany=function(t,e,n){var r=[new st({definition:t.definition})].concat(e,n);this.walk(t,r)},t.prototype.walkManySep=function(t,e,n){var r=vt(t,e,n);this.walk(t,r)},t.prototype.walkOr=function(t,e,n){var r=this,o=e.concat(n);Object(i.u)(t.definition,(function(t){var e=new at({definition:[t]});r.walk(e,o)}))},t}();function vt(t,e,n){return[new st({definition:[new pt({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}var yt=function(){function t(){}return t.prototype.visit=function(t){var e=t;switch(e.constructor){case it:return this.visitNonTerminal(e);case at:return this.visitAlternative(e);case st:return this.visitOption(e);case lt:return this.visitRepetitionMandatory(e);case ct:return this.visitRepetitionMandatoryWithSeparator(e);case ht:return this.visitRepetitionWithSeparator(e);case ut:return this.visitRepetition(e);case ft:return this.visitAlternation(e);case pt:return this.visitTerminal(e);case ot:return this.visitRule(e);default:throw Error("non exhaustive match")}},t.prototype.visitNonTerminal=function(t){},t.prototype.visitAlternative=function(t){},t.prototype.visitOption=function(t){},t.prototype.visitRepetition=function(t){},t.prototype.visitRepetitionMandatory=function(t){},t.prototype.visitRepetitionMandatoryWithSeparator=function(t){},t.prototype.visitRepetitionWithSeparator=function(t){},t.prototype.visitAlternation=function(t){},t.prototype.visitTerminal=function(t){},t.prototype.visitRule=function(t){},t}(),bt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Tt(t,e){return void 0===e&&(e=[]),!!(t instanceof st||t instanceof ut||t instanceof ht)||(t instanceof ft?Object(i.Q)(t.definition,(function(t){return Tt(t,e)})):!(t instanceof it&&Object(i.j)(e,t))&&(t instanceof rt&&(t instanceof it&&e.push(t),Object(i.o)(t.definition,(function(t){return Tt(t,e)})))))}function Ot(t){if(t instanceof it)return"SUBRULE";if(t instanceof st)return"OPTION";if(t instanceof ft)return"OR";if(t instanceof lt)return"AT_LEAST_ONE";if(t instanceof ct)return"AT_LEAST_ONE_SEP";if(t instanceof ht)return"MANY_SEP";if(t instanceof ut)return"MANY";if(t instanceof pt)return"CONSUME";throw Error("non exhaustive match")}var St=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.separator="-",e.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},e}return bt(e,t),e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var e=t.terminalType.name+this.separator+"Terminal";Object(i.w)(this.dslMethods,e)||(this.dslMethods[e]=[]),this.dslMethods[e].push(t)},e.prototype.visitNonTerminal=function(t){var e=t.nonTerminalName+this.separator+"Terminal";Object(i.w)(this.dslMethods,e)||(this.dslMethods[e]=[]),this.dslMethods[e].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(yt),xt=new St;function Et(t){if(t instanceof it)return Et(t.referencedRule);if(t instanceof pt)return[t.terminalType];if(function(t){return t instanceof at||t instanceof st||t instanceof ut||t instanceof lt||t instanceof ct||t instanceof ht||t instanceof pt||t instanceof ot}(t))return function(t){var e,n=[],r=t.definition,o=0,a=r.length>o,s=!0;for(;a&&s;)e=r[o],s=Tt(e),n=n.concat(Et(e)),o+=1,a=r.length>o;return Object(i.T)(n)}(t);if(function(t){return t instanceof ft}(t))return function(t){var e=Object(i.I)(t.definition,(function(t){return Et(t)}));return Object(i.T)(Object(i.t)(e))}(t);throw Error("non exhaustive match")}var Ct="_~IN~_",kt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nt=function(t){function e(e){var n=t.call(this)||this;return n.topProd=e,n.follows={},n}return kt(e,t),e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,e,n){},e.prototype.walkProdRef=function(t,e,n){var r,i,o=(r=t.referencedRule,i=t.idx,r.name+i+Ct+this.topProd.name),a=e.concat(n),s=Et(new at({definition:a}));this.follows[o]=s},e}(gt);var wt={buildMismatchTokenMessage:function(t){var e=t.expected,n=t.actual;t.previous,t.ruleName;return"Expecting "+(Z(e)?"--\x3e "+X(e)+" <--":"token of type --\x3e "+e.name+" <--")+" but found --\x3e '"+n.image+"' <--"},buildNotAllInputParsedMessage:function(t){var e=t.firstRedundant;t.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(t){var e=t.expectedPathsPerAlt,n=t.actual,r=(t.previous,t.customUserDescription),o=(t.ruleName,"\nbut found: '"+Object(i.s)(n).image+"'");if(r)return"Expecting: "+r+o;var a=Object(i.O)(e,(function(t,e){return t.concat(e)}),[]),s=Object(i.I)(a,(function(t){return"["+Object(i.I)(t,(function(t){return X(t)})).join(", ")+"]"}));return"Expecting: "+("one of these possible Token sequences:\n"+Object(i.I)(s,(function(t,e){return" "+(e+1)+". "+t})).join("\n"))+o},buildEarlyExitMessage:function(t){var e=t.expectedIterationPaths,n=t.actual,r=t.customUserDescription,o=(t.ruleName,"\nbut found: '"+Object(i.s)(n).image+"'");return r?"Expecting: "+r+o:"Expecting: "+("expecting at least one iteration which starts with one of these possible Token sequences::\n <"+Object(i.I)(e,(function(t){return"["+Object(i.I)(t,(function(t){return X(t)})).join(",")+"]"})).join(" ,")+">")+o}};Object.freeze(wt);var Lt={buildRuleNotFoundError:function(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+"<-\ninside top level rule: ->"+t.name+"<-"}},At={buildDuplicateFoundError:function(t,e){var n,r=t.name,o=Object(i.s)(e),a=o.idx,s=Ot(o),l=(n=o)instanceof pt?n.terminalType.name:n instanceof it?n.nonTerminalName:"",c="->"+s+(a>0?a:"")+"<- "+(l?"with argument: ->"+l+"<-":"")+"\n appears more than once ("+e.length+" times) in the top level rule: ->"+r+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return c=(c=c.replace(/[ \t]+/g," ")).replace(/\s\s+/g,"\n")},buildNamespaceConflictError:function(t){return"Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+t.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter."},buildAlternationPrefixAmbiguityError:function(t){var e=Object(i.I)(t.prefixPath,(function(t){return X(t)})).join(", "),n=0===t.alternation.idx?"":t.alternation.idx;return"Ambiguous alternatives: <"+t.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin inside <"+t.topLevelRule.name+"> Rule,\n<"+e+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details."},buildAlternationAmbiguityError:function(t){var e=Object(i.I)(t.prefixPath,(function(t){return X(t)})).join(", "),n=0===t.alternation.idx?"":t.alternation.idx,r="Ambiguous Alternatives Detected: <"+t.ambiguityIndices.join(" ,")+"> in inside <"+t.topLevelRule.name+"> Rule,\n<"+e+"> may appears as a prefix path in all these alternatives.\n";return r+="See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."},buildEmptyRepetitionError:function(t){var e=Ot(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),"The repetition <"+e+"> within Rule <"+t.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop."},buildTokenNameError:function(t){return"Invalid Grammar Token name: ->"+t.tokenType.name+"<- it must match the pattern: ->"+t.expectedPattern.toString()+"<-"},buildEmptyAlternationError:function(t){return"Ambiguous empty alternative: <"+(t.emptyChoiceIdx+1)+"> in inside <"+t.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative."},buildTooManyAlternativesError:function(t){return"An Alternation cannot have more than 256 alternatives:\n inside <"+t.topLevelRule.name+"> Rule.\n has "+(t.alternation.definition.length+1)+" alternatives."},buildLeftRecursionError:function(t){var e=t.topLevelRule.name;return"Left Recursion found in grammar.\nrule: <"+e+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+(e+" --\x3e "+i.I(t.leftRecursionPath,(function(t){return t.name})).concat([e]).join(" --\x3e "))+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."},buildInvalidRuleNameError:function(t){return"Invalid grammar rule name: ->"+t.topLevelRule.name+"<- it must match the pattern: ->"+t.expectedPattern.toString()+"<-"},buildDuplicateRuleNameError:function(t){return"Duplicate definition, rule: ->"+(t.topLevelRule instanceof ot?t.topLevelRule.name:t.topLevelRule)+"<- is already defined in the grammar: ->"+t.grammarName+"<-"}},It=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();var Rt=function(t){function e(e,n){var r=t.call(this)||this;return r.nameToTopRule=e,r.errMsgProvider=n,r.errors=[],r}return It(e,t),e.prototype.resolveRefs=function(){var t=this;Object(i.u)(Object(i.U)(this.nameToTopRule),(function(e){t.currTopLevel=e,e.accept(t)}))},e.prototype.visitNonTerminal=function(t){var e=this.nameToTopRule[t.nonTerminalName];if(e)t.referencedRule=e;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:Ze.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(yt),Mt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_t=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.path=n,r.nextTerminalName="",r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return Mt(e,t),e.prototype.walkTerminal=function(t,e,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var r=e.concat(n),i=new at({definition:r});this.possibleTokTypes=Et(i),this.found=!0}},e}(function(t){function e(e,n){var r=t.call(this)||this;return r.topProd=e,r.path=n,r.possibleTokTypes=[],r.nextProductionName="",r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return Mt(e,t),e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Object(i.g)(this.path.ruleStack).reverse(),this.occurrenceStack=Object(i.g)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(e,n){void 0===n&&(n=[]),this.found||t.prototype.walk.call(this,e,n)},e.prototype.walkProdRef=function(t,e,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var r=e.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,r)}},e.prototype.updateExpectedNext=function(){Object(i.A)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(gt)),Pt=function(t){function e(e,n){var r=t.call(this)||this;return r.topRule=e,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return Mt(e,t),e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(gt),jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkMany=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkMany.call(this,e,n,r)},e}(Pt),Dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkManySep=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkManySep.call(this,e,n,r)},e}(Pt),Ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkAtLeastOne=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkAtLeastOne.call(this,e,n,r)},e}(Pt),Ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkAtLeastOneSep=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkAtLeastOneSep.call(this,e,n,r)},e}(Pt);function Wt(t,e,n){void 0===n&&(n=[]),n=Object(i.g)(n);var r=[],o=0;function a(a){var s=Wt(a.concat(Object(i.m)(t,o+1)),e,n);return r.concat(s)}for(;n.length=0;k--){var N={idx:p,def:g.definition[k].definition.concat(Object(i.m)(f)),ruleStack:d,occurrenceStack:m};u.push(N),u.push("EXIT_ALTERNATIVE")}else if(g instanceof at)u.push({idx:p,def:g.definition.concat(Object(i.m)(f)),ruleStack:d,occurrenceStack:m});else{if(!(g instanceof ot))throw Error("non exhaustive match");u.push(Ht(g,p,d,m))}}}else a&&Object(i.H)(u).idx<=l&&u.pop()}return c}function Ht(t,e,n,r){var o=Object(i.g)(n);o.push(t.name);var a=Object(i.g)(r);return a.push(1),{idx:e,def:t.definition,ruleStack:o,occurrenceStack:a}}var Gt,zt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"}(Gt||(Gt={}));var Vt=function(t){function e(e,n,r){var i=t.call(this)||this;return i.topProd=e,i.targetOccurrence=n,i.targetProdType=r,i}return zt(e,t),e.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},e.prototype.checkIsTarget=function(t,e,n,r){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=n.concat(r),!0)},e.prototype.walkOption=function(e,n,r){this.checkIsTarget(e,Gt.OPTION,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkAtLeastOne=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION_MANDATORY,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkAtLeastOneSep=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkMany=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkManySep=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION_WITH_SEPARATOR,n,r)||t.prototype.walkOption.call(this,e,n,r)},e}(gt),Kt=function(t){function e(e,n,r){var i=t.call(this)||this;return i.targetOccurrence=e,i.targetProdType=n,i.targetRef=r,i.result=[],i}return zt(e,t),e.prototype.checkIsTarget=function(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)},e.prototype.visitOption=function(t){this.checkIsTarget(t,Gt.OPTION)},e.prototype.visitRepetition=function(t){this.checkIsTarget(t,Gt.REPETITION)},e.prototype.visitRepetitionMandatory=function(t){this.checkIsTarget(t,Gt.REPETITION_MANDATORY)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.checkIsTarget(t,Gt.REPETITION_MANDATORY_WITH_SEPARATOR)},e.prototype.visitRepetitionWithSeparator=function(t){this.checkIsTarget(t,Gt.REPETITION_WITH_SEPARATOR)},e.prototype.visitAlternation=function(t){this.checkIsTarget(t,Gt.ALTERNATION)},e}(yt);function Yt(t){for(var e=new Array(t),n=0;n1}));return i.I(i.U(a),(function(n){var r=i.s(n),o=e.buildDuplicateFoundError(t,n),a=Ot(r),s={message:o,type:Ze.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:a,occurrence:r.idx},l=ie(r);return l&&(s.parameter=l),s}))}(t,r)})),s=i.I(t,(function(t){return function t(e,n,r,o){void 0===o&&(o=[]);var a=[],s=function t(e){var n=[];if(i.A(e))return n;var r=i.s(e);if(r instanceof it)n.push(r.referencedRule);else if(r instanceof at||r instanceof st||r instanceof lt||r instanceof ct||r instanceof ht||r instanceof ut)n=n.concat(t(r.definition));else if(r instanceof ft)n=i.t(i.I(r.definition,(function(e){return t(e.definition)})));else if(!(r instanceof pt))throw Error("non exhaustive match");var o=Tt(r),a=e.length>1;if(o&&a){var s=i.m(e);return n.concat(t(s))}return n}(n.definition);if(i.A(s))return[];var l=e.name;i.j(s,e)&&a.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:o}),type:Ze.LEFT_RECURSION,ruleName:l});var c=i.l(s,o.concat([e])),u=i.I(c,(function(n){var a=i.g(o);return a.push(n),t(e,n,r,a)}));return a.concat(i.t(u))}(t,t,r)})),l=[],c=[],u=[];Object(i.o)(s,i.A)&&(l=Object(i.I)(t,(function(t){return function(t,e){var n=new se;t.accept(n);var r=n.alternations;return i.O(r,(function(n,r){var o=i.n(r.definition),a=i.I(o,(function(n,o){var a=Bt([n],[],null,1);return i.A(a)?{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:r,emptyChoiceIdx:o}),type:Ze.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:r.idx,alternative:o+1}:null}));return n.concat(i.i(a))}),[])}(t,r)})),c=Object(i.I)(t,(function(t){return function(t,e,n){var r=new se;t.accept(r);var o=r.alternations;return o=Object(i.P)(o,(function(t){return!0===t.ignoreAmbiguities})),i.O(o,(function(r,o){var a=o.idx,s=o.maxLookahead||e,l=Zt(a,t,s,o),c=function(t,e,n,r){var o=[],a=Object(i.O)(t,(function(n,r,a){return!0===e.definition[a].ignoreAmbiguities||Object(i.u)(r,(function(r){var s=[a];Object(i.u)(t,(function(t,n){a!==n&&Qt(t,r)&&!0!==e.definition[n].ignoreAmbiguities&&s.push(n)})),s.length>1&&!Qt(o,r)&&(o.push(r),n.push({alts:s,path:r}))})),n}),[]);return i.I(a,(function(t){var o=Object(i.I)(t.alts,(function(t){return t+1}));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:o,prefixPath:t.path}),type:Ze.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:[t.alts]}}))}(l,o,t,n),u=function(t,e,n,r){var o=[],a=Object(i.O)(t,(function(t,e,n){var r=Object(i.I)(e,(function(t){return{idx:n,path:t}}));return t.concat(r)}),[]);return Object(i.u)(a,(function(t){if(!0!==e.definition[t.idx].ignoreAmbiguities){var s=t.idx,l=t.path,c=Object(i.r)(a,(function(t){return!0!==e.definition[t.idx].ignoreAmbiguities&&t.idx255&&n.push({message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:r}),type:Ze.TOO_MANY_ALTS,ruleName:t.name,occurrence:r.idx}),n}),[])}(t,r)})),d=Object(i.I)(t,(function(t){return function(t,e){var n=[],r=t.name;r.match(ae)||n.push({message:e.buildInvalidRuleNameError({topLevelRule:t,expectedPattern:ae}),type:Ze.INVALID_RULE_NAME,ruleName:r});return n}(t,r)})),m=Object(i.I)(t,(function(e){return function(t,e,n,r){var o=[];if(Object(i.O)(e,(function(e,n){return n.name===t.name?e+1:e}),0)>1){var a=r.buildDuplicateRuleNameError({topLevelRule:t,grammarName:n});o.push({message:a,type:Ze.DUPLICATE_RULE_NAME,ruleName:t.name})}return o}(e,t,o,r)}));return i.t(a.concat(f,u,s,l,c,h,p,d,m))}function re(t){return Ot(t)+"_#_"+t.idx+"_#_"+ie(t)}function ie(t){return t instanceof pt?t.terminalType.name:t instanceof it?t.nonTerminalName:""}var oe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allProductions=[],e}return ee(e,t),e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}(yt),ae=/^[a-zA-Z_]\w*$/;var se=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.alternations=[],e}return ee(e,t),e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}(yt);var le=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allProductions=[],e}return ee(e,t),e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}(yt);function ce(t){t=Object(i.k)(t,{errMsgProvider:Lt});var e,n,r,o={};return Object(i.u)(t.rules,(function(t){o[t.name]=t})),e=o,n=t.errMsgProvider,(r=new Rt(e,n)).resolveRefs(),r.errors}function ue(t){return ne((t=Object(i.k)(t,{errMsgProvider:At})).rules,t.maxLookahead,t.tokenTypes,t.errMsgProvider,t.grammarName)}function he(t){Object(i.u)(t.rules,(function(t){var e=new St;t.accept(e),Object(i.u)(e.dslMethods,(function(t){Object(i.u)(t,(function(t,e){t.idx=e+1}))}))}))}var fe=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"];function pe(t){return Object(i.j)(fe,t.name)}function de(t,e,n){this.name="MismatchedTokenException",this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}function me(t,e,n){this.name="NoViableAltException",this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}function ge(t,e){this.name="NotAllInputParsedException",this.message=t,this.token=e,this.resyncedTokens=[]}function ve(t,e,n){this.name="EarlyExitException",this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}Object.freeze(fe),de.prototype=Error.prototype,me.prototype=Error.prototype,ge.prototype=Error.prototype,ve.prototype=Error.prototype;var ye={};function be(t){this.name="InRuleRecoveryException",this.message=t}be.prototype=Error.prototype;var Te=function(){function t(){}return t.prototype.initRecoverable=function(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object(i.w)(t,"recoveryEnabled")?t.recoveryEnabled:Je.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Oe)},t.prototype.getTokenToInsert=function(t){var e=tt(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return e.isInsertedInRecovery=!0,e},t.prototype.canTokenTypeBeInsertedInRecovery=function(t){return!0},t.prototype.tryInRepetitionRecovery=function(t,e,n,r){for(var o=this,a=this.findReSyncTokenType(),s=this.exportLexerState(),l=[],c=!1,u=this.LA(1),h=this.LA(1),f=function(){var t=o.LA(0),e=new de(o.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:u,previous:t,ruleName:o.getCurrRuleFullName()}),u,o.LA(0));e.resyncedTokens=Object(i.n)(l),o.SAVE_ERROR(e)};!c;){if(this.tokenMatcher(h,r))return void f();if(n.call(this))return f(),void t.apply(this,e);this.tokenMatcher(h,a)?c=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,l))}this.importLexerState(s)},t.prototype.shouldInRepetitionRecoveryBeTried=function(t,e,n){return!1!==n&&(void 0!==t&&void 0!==e&&(!this.tokenMatcher(this.LA(1),t)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e)))))},t.prototype.getFollowsForInRuleRecovery=function(t,e){var n=this.getCurrentGrammarPath(t,e);return this.getNextPossibleTokenTypes(n)},t.prototype.tryInRuleRecovery=function(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new be("sad sad panda")},t.prototype.canPerformInRuleRecovery=function(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)},t.prototype.canRecoverWithSingleTokenInsertion=function(t,e){var n=this;if(!this.canTokenTypeBeInsertedInRecovery(t))return!1;if(Object(i.A)(e))return!1;var r=this.LA(1);return void 0!==Object(i.q)(e,(function(t){return n.tokenMatcher(r,t)}))},t.prototype.canRecoverWithSingleTokenDeletion=function(t){return this.tokenMatcher(this.LA(2),t)},t.prototype.isInCurrentRuleReSyncSet=function(t){var e=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(e);return Object(i.j)(n,t)},t.prototype.findReSyncTokenType=function(){for(var t=this.flattenFollowSet(),e=this.LA(1),n=2;;){var r=e.tokenType;if(Object(i.j)(t,r))return r;e=this.LA(n),n++}},t.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return ye;var t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(n)}},t.prototype.buildFullFollowKeyStack=function(){var t=this,e=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return Object(i.I)(e,(function(r,i){return 0===i?ye:{ruleName:t.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:t.shortRuleNameToFullName(e[i-1])}}))},t.prototype.flattenFollowSet=function(){var t=this,e=Object(i.I)(this.buildFullFollowKeyStack(),(function(e){return t.getFollowSetFromFollowKey(e)}));return Object(i.t)(e)},t.prototype.getFollowSetFromFollowKey=function(t){if(t===ye)return[Q];var e=t.ruleName+t.idxInCallingRule+Ct+t.inRule;return this.resyncFollows[e]},t.prototype.addToResyncTokens=function(t,e){return this.tokenMatcher(t,Q)||e.push(t),e},t.prototype.reSyncTo=function(t){for(var e=[],n=this.LA(1);!1===this.tokenMatcher(n,t);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,e);return Object(i.n)(e)},t.prototype.attemptInRepetitionRecovery=function(t,e,n,r,i,o,a){},t.prototype.getCurrentGrammarPath=function(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Object(i.g)(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}},t.prototype.getHumanReadableRuleStack=function(){var t=this;return Object(i.I)(this.RULE_STACK,(function(e){return t.shortRuleNameToFullName(e)}))},t}();function Oe(t,e,n,r,i,o,a){var s=this.getKeyForAutomaticLookahead(r,i),l=this.firstAfterRepMap[s];if(void 0===l){var c=this.getCurrRuleFullName();l=new o(this.getGAstProductions()[c],i).startWalking(),this.firstAfterRepMap[s]=l}var u=l.token,h=l.occurrence,f=l.isEndOfRule;1===this.RULE_STACK.length&&f&&void 0===u&&(u=Q,h=1),this.shouldInRepetitionRecoveryBeTried(u,h,a)&&this.tryInRepetitionRecovery(t,e,n,u)}function Se(t,e,n){return n|e|t}var xe=function(){function t(){}return t.prototype.initLooksAhead=function(t){this.dynamicTokensEnabled=Object(i.w)(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:Je.dynamicTokensEnabled,this.maxLookahead=Object(i.w)(t,"maxLookahead")?t.maxLookahead:Je.maxLookahead,this.lookAheadFuncsCache=Object(i.z)()?new Map:[],Object(i.z)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},t.prototype.preComputeLookaheadFunctions=function(t){var e=this;Object(i.u)(t,(function(t){e.TRACE_INIT(t.name+" Rule Lookahead",(function(){var n=function(t){xt.reset(),t.accept(xt);var e=xt.dslMethods;return xt.reset(),e}(t),r=n.alternation,o=n.repetition,a=n.option,s=n.repetitionMandatory,l=n.repetitionMandatoryWithSeparator,c=n.repetitionWithSeparator;Object(i.u)(r,(function(n){var r=0===n.idx?"":n.idx;e.TRACE_INIT(""+Ot(n)+r,(function(){var r,i,o,a,s,l,c,u=(r=n.idx,i=t,o=n.maxLookahead||e.maxLookahead,a=n.hasPredicates,s=e.dynamicTokensEnabled,l=e.lookAheadBuilderForAlternatives,c=Zt(r,i,o),l(c,a,te(c)?U:D,s)),h=Se(e.fullRuleNameToShort[t.name],256,n.idx);e.setLaFuncCache(h,u)}))})),Object(i.u)(o,(function(n){e.computeLookaheadFunc(t,n.idx,768,Gt.REPETITION,n.maxLookahead,Ot(n))})),Object(i.u)(a,(function(n){e.computeLookaheadFunc(t,n.idx,512,Gt.OPTION,n.maxLookahead,Ot(n))})),Object(i.u)(s,(function(n){e.computeLookaheadFunc(t,n.idx,1024,Gt.REPETITION_MANDATORY,n.maxLookahead,Ot(n))})),Object(i.u)(l,(function(n){e.computeLookaheadFunc(t,n.idx,1536,Gt.REPETITION_MANDATORY_WITH_SEPARATOR,n.maxLookahead,Ot(n))})),Object(i.u)(c,(function(n){e.computeLookaheadFunc(t,n.idx,1280,Gt.REPETITION_WITH_SEPARATOR,n.maxLookahead,Ot(n))}))}))}))},t.prototype.computeLookaheadFunc=function(t,e,n,r,i,o){var a=this;this.TRACE_INIT(""+o+(0===e?"":e),(function(){var o=function(t,e,n,r,i,o){var a=Jt(t,e,i,n),s=te(a)?U:D;return o(a[0],s,r)}(e,t,i||a.maxLookahead,a.dynamicTokensEnabled,r,a.lookAheadBuilderForOptional),s=Se(a.fullRuleNameToShort[t.name],n,e);a.setLaFuncCache(s,o)}))},t.prototype.lookAheadBuilderForOptional=function(t,e,n){return function(t,e,n){var r=Object(i.o)(t,(function(t){return 1===t.length})),o=t.length;if(r&&!n){var a=Object(i.t)(t);if(1===a.length&&Object(i.A)(a[0].categoryMatches)){var s=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}var l=Object(i.O)(a,(function(t,e,n){return t[e.tokenTypeIdx]=!0,Object(i.u)(e.categoryMatches,(function(e){t[e]=!0})),t}),[]);return function(){var t=this.LA(1);return!0===l[t.tokenTypeIdx]}}return function(){t:for(var n=0;n on "+Ne(t.constructor)+" CST Visitor.",type:ke.MISSING_METHOD,methodName:e}}));return Object(i.i)(n)}(t,e),r=function(t,e){var n=[];for(var r in t)ae.test(r)&&Object(i.B)(t[r])&&!Object(i.j)(Ie,r)&&!Object(i.j)(e,r)&&n.push({msg:"Redundant visitor method: <"+r+"> on "+Ne(t.constructor)+" CST Visitor\nThere is no Grammar Rule corresponding to this method's name.\nFor utility methods on visitor classes use methods names that do not match /"+ae.source+"/.",type:ke.REDUNDANT_METHOD,methodName:r});return n}(t,e);return n.concat(r)}(this,e);if(!Object(i.A)(t)){var n=Object(i.I)(t,(function(t){return t.msg}));throw Error("Errors Detected in CST Visitor <"+Ne(this.constructor)+">:\n\t"+n.join("\n\n").replace(/\n/g,"\n\t"))}}}).constructor=n,n._RULE_NAMES=e,n}!function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"}(ke||(ke={}));var Ie=["constructor","visit","validateVisitor"];var Re=function(){function t(){}return t.prototype.initTreeBuilder=function(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=Object(i.w)(t,"nodeLocationTracking")?t.nodeLocationTracking:Je.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ce,this.setNodeLocationFromNode=Ce,this.cstPostRule=i.b,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ee,this.setNodeLocationFromNode=Ee,this.cstPostRule=i.b,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error('Invalid config option: "'+t.nodeLocationTracking+'"');this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=i.b,this.setInitialNodeLocation=i.b}else this.cstInvocationStateUpdate=i.b,this.cstFinallyStateUpdate=i.b,this.cstPostTerminal=i.b,this.cstPostNonTerminal=i.b,this.cstPostRule=i.b},t.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(t){t.location={startOffset:NaN,endOffset:NaN}},t.prototype.setInitialNodeLocationOnlyOffsetRegular=function(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},t.prototype.setInitialNodeLocationFullRecovery=function(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.setInitialNodeLocationFullRegular=function(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.cstInvocationStateUpdate=function(t,e){var n={name:t,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},t.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},t.prototype.cstPostRuleFull=function(t){var e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==!0?(n.endOffset=e.endOffset,n.endLine=e.endLine,n.endColumn=e.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},t.prototype.cstPostRuleOnlyOffset=function(t){var e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==!0?n.endOffset=e.endOffset:n.startOffset=NaN},t.prototype.cstPostTerminal=function(t,e){var n,r,i,o=this.CST_STACK[this.CST_STACK.length-1];r=e,i=t,void 0===(n=o).children[i]?n.children[i]=[r]:n.children[i].push(r),this.setNodeLocationFromToken(o.location,e)},t.prototype.cstPostNonTerminal=function(t,e){var n=this.CST_STACK[this.CST_STACK.length-1];!function(t,e,n){void 0===t.children[e]?t.children[e]=[n]:t.children[e].push(n)}(n,e,t),this.setNodeLocationFromNode(n.location,t.location)},t.prototype.getBaseCstVisitorConstructor=function(){if(Object(i.F)(this.baseCstVisitorConstructor)){var t=Ae(this.className,Object(i.G)(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor},t.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(Object(i.F)(this.baseCstVisitorWithDefaultsConstructor)){var t=function(t,e,n){var r=function(){};we(r,t+"BaseSemanticsWithDefaults");var o=Object.create(n.prototype);return Object(i.u)(e,(function(t){o[t]=Le})),(r.prototype=o).constructor=r,r}(this.className,Object(i.G)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor},t.prototype.getLastExplicitRuleShortName=function(){var t=this.RULE_STACK;return t[t.length-1]},t.prototype.getPreviousExplicitRuleShortName=function(){var t=this.RULE_STACK;return t[t.length-2]},t.prototype.getLastExplicitRuleOccurrenceIndex=function(){var t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]},t}(),Me=function(){function t(){}return t.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(t.prototype,"input",{get:function(){return this.tokVector},set:function(t){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length},enumerable:!1,configurable:!0}),t.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):qe},t.prototype.LA=function(t){var e=this.currIdx+t;return e<0||this.tokVectorLength<=e?qe:this.tokVector[e]},t.prototype.consumeToken=function(){this.currIdx++},t.prototype.exportLexerState=function(){return this.currIdx},t.prototype.importLexerState=function(t){this.currIdx=t},t.prototype.resetLexerState=function(){this.currIdx=-1},t.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},t.prototype.getLexerPosition=function(){return this.exportLexerState()},t}(),_e=function(){function t(){}return t.prototype.ACTION=function(t){return t.call(this)},t.prototype.consume=function(t,e,n){return this.consumeInternal(e,t,n)},t.prototype.subrule=function(t,e,n){return this.subruleInternal(e,t,n)},t.prototype.option=function(t,e){return this.optionInternal(e,t)},t.prototype.or=function(t,e){return this.orInternal(e,t)},t.prototype.many=function(t,e){return this.manyInternal(t,e)},t.prototype.atLeastOne=function(t,e){return this.atLeastOneInternal(t,e)},t.prototype.CONSUME=function(t,e){return this.consumeInternal(t,0,e)},t.prototype.CONSUME1=function(t,e){return this.consumeInternal(t,1,e)},t.prototype.CONSUME2=function(t,e){return this.consumeInternal(t,2,e)},t.prototype.CONSUME3=function(t,e){return this.consumeInternal(t,3,e)},t.prototype.CONSUME4=function(t,e){return this.consumeInternal(t,4,e)},t.prototype.CONSUME5=function(t,e){return this.consumeInternal(t,5,e)},t.prototype.CONSUME6=function(t,e){return this.consumeInternal(t,6,e)},t.prototype.CONSUME7=function(t,e){return this.consumeInternal(t,7,e)},t.prototype.CONSUME8=function(t,e){return this.consumeInternal(t,8,e)},t.prototype.CONSUME9=function(t,e){return this.consumeInternal(t,9,e)},t.prototype.SUBRULE=function(t,e){return this.subruleInternal(t,0,e)},t.prototype.SUBRULE1=function(t,e){return this.subruleInternal(t,1,e)},t.prototype.SUBRULE2=function(t,e){return this.subruleInternal(t,2,e)},t.prototype.SUBRULE3=function(t,e){return this.subruleInternal(t,3,e)},t.prototype.SUBRULE4=function(t,e){return this.subruleInternal(t,4,e)},t.prototype.SUBRULE5=function(t,e){return this.subruleInternal(t,5,e)},t.prototype.SUBRULE6=function(t,e){return this.subruleInternal(t,6,e)},t.prototype.SUBRULE7=function(t,e){return this.subruleInternal(t,7,e)},t.prototype.SUBRULE8=function(t,e){return this.subruleInternal(t,8,e)},t.prototype.SUBRULE9=function(t,e){return this.subruleInternal(t,9,e)},t.prototype.OPTION=function(t){return this.optionInternal(t,0)},t.prototype.OPTION1=function(t){return this.optionInternal(t,1)},t.prototype.OPTION2=function(t){return this.optionInternal(t,2)},t.prototype.OPTION3=function(t){return this.optionInternal(t,3)},t.prototype.OPTION4=function(t){return this.optionInternal(t,4)},t.prototype.OPTION5=function(t){return this.optionInternal(t,5)},t.prototype.OPTION6=function(t){return this.optionInternal(t,6)},t.prototype.OPTION7=function(t){return this.optionInternal(t,7)},t.prototype.OPTION8=function(t){return this.optionInternal(t,8)},t.prototype.OPTION9=function(t){return this.optionInternal(t,9)},t.prototype.OR=function(t){return this.orInternal(t,0)},t.prototype.OR1=function(t){return this.orInternal(t,1)},t.prototype.OR2=function(t){return this.orInternal(t,2)},t.prototype.OR3=function(t){return this.orInternal(t,3)},t.prototype.OR4=function(t){return this.orInternal(t,4)},t.prototype.OR5=function(t){return this.orInternal(t,5)},t.prototype.OR6=function(t){return this.orInternal(t,6)},t.prototype.OR7=function(t){return this.orInternal(t,7)},t.prototype.OR8=function(t){return this.orInternal(t,8)},t.prototype.OR9=function(t){return this.orInternal(t,9)},t.prototype.MANY=function(t){this.manyInternal(0,t)},t.prototype.MANY1=function(t){this.manyInternal(1,t)},t.prototype.MANY2=function(t){this.manyInternal(2,t)},t.prototype.MANY3=function(t){this.manyInternal(3,t)},t.prototype.MANY4=function(t){this.manyInternal(4,t)},t.prototype.MANY5=function(t){this.manyInternal(5,t)},t.prototype.MANY6=function(t){this.manyInternal(6,t)},t.prototype.MANY7=function(t){this.manyInternal(7,t)},t.prototype.MANY8=function(t){this.manyInternal(8,t)},t.prototype.MANY9=function(t){this.manyInternal(9,t)},t.prototype.MANY_SEP=function(t){this.manySepFirstInternal(0,t)},t.prototype.MANY_SEP1=function(t){this.manySepFirstInternal(1,t)},t.prototype.MANY_SEP2=function(t){this.manySepFirstInternal(2,t)},t.prototype.MANY_SEP3=function(t){this.manySepFirstInternal(3,t)},t.prototype.MANY_SEP4=function(t){this.manySepFirstInternal(4,t)},t.prototype.MANY_SEP5=function(t){this.manySepFirstInternal(5,t)},t.prototype.MANY_SEP6=function(t){this.manySepFirstInternal(6,t)},t.prototype.MANY_SEP7=function(t){this.manySepFirstInternal(7,t)},t.prototype.MANY_SEP8=function(t){this.manySepFirstInternal(8,t)},t.prototype.MANY_SEP9=function(t){this.manySepFirstInternal(9,t)},t.prototype.AT_LEAST_ONE=function(t){this.atLeastOneInternal(0,t)},t.prototype.AT_LEAST_ONE1=function(t){return this.atLeastOneInternal(1,t)},t.prototype.AT_LEAST_ONE2=function(t){this.atLeastOneInternal(2,t)},t.prototype.AT_LEAST_ONE3=function(t){this.atLeastOneInternal(3,t)},t.prototype.AT_LEAST_ONE4=function(t){this.atLeastOneInternal(4,t)},t.prototype.AT_LEAST_ONE5=function(t){this.atLeastOneInternal(5,t)},t.prototype.AT_LEAST_ONE6=function(t){this.atLeastOneInternal(6,t)},t.prototype.AT_LEAST_ONE7=function(t){this.atLeastOneInternal(7,t)},t.prototype.AT_LEAST_ONE8=function(t){this.atLeastOneInternal(8,t)},t.prototype.AT_LEAST_ONE9=function(t){this.atLeastOneInternal(9,t)},t.prototype.AT_LEAST_ONE_SEP=function(t){this.atLeastOneSepFirstInternal(0,t)},t.prototype.AT_LEAST_ONE_SEP1=function(t){this.atLeastOneSepFirstInternal(1,t)},t.prototype.AT_LEAST_ONE_SEP2=function(t){this.atLeastOneSepFirstInternal(2,t)},t.prototype.AT_LEAST_ONE_SEP3=function(t){this.atLeastOneSepFirstInternal(3,t)},t.prototype.AT_LEAST_ONE_SEP4=function(t){this.atLeastOneSepFirstInternal(4,t)},t.prototype.AT_LEAST_ONE_SEP5=function(t){this.atLeastOneSepFirstInternal(5,t)},t.prototype.AT_LEAST_ONE_SEP6=function(t){this.atLeastOneSepFirstInternal(6,t)},t.prototype.AT_LEAST_ONE_SEP7=function(t){this.atLeastOneSepFirstInternal(7,t)},t.prototype.AT_LEAST_ONE_SEP8=function(t){this.atLeastOneSepFirstInternal(8,t)},t.prototype.AT_LEAST_ONE_SEP9=function(t){this.atLeastOneSepFirstInternal(9,t)},t.prototype.RULE=function(t,e,n){if(void 0===n&&(n=Qe),Object(i.j)(this.definedRulesNames,t)){var r={message:At.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Ze.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(r)}this.definedRulesNames.push(t);var o=this.defineRule(t,e,n);return this[t]=o,o},t.prototype.OVERRIDE_RULE=function(t,e,n){void 0===n&&(n=Qe);var r,o,a,s,l,c=[];c=c.concat((r=t,o=this.definedRulesNames,a=this.className,l=[],i.j(o,r)||(s="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+a+"<-as it is not defined in any of the super grammars ",l.push({message:s,type:Ze.INVALID_RULE_OVERRIDE,ruleName:r})),l)),this.definitionErrors.push.apply(this.definitionErrors,c);var u=this.defineRule(t,e,n);return this[t]=u,u},t.prototype.BACKTRACK=function(t,e){return function(){this.isBackTrackingStack.push(1);var n=this.saveRecogState();try{return t.apply(this,e),!0}catch(t){if(pe(t))return!1;throw t}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}},t.prototype.getGAstProductions=function(){return this.gastProductionsCache},t.prototype.getSerializedGastProductions=function(){return dt(Object(i.U)(this.gastProductionsCache))},t}(),Pe=function(){function t(){}return t.prototype.initRecognizerEngine=function(t,e){if(this.className=Ne(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=U,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Object(i.w)(e,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a property.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(Object(i.y)(t)){if(Object(i.A)(t))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof t[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(Object(i.y)(t))this.tokensMap=Object(i.O)(t,(function(t,e){return t[e.name]=e,t}),{});else if(Object(i.w)(t,"modes")&&Object(i.o)(Object(i.t)(Object(i.U)(t.modes)),z)){var n=Object(i.t)(Object(i.U)(t.modes)),r=Object(i.T)(n);this.tokensMap=Object(i.O)(r,(function(t,e){return t[e.name]=e,t}),{})}else{if(!Object(i.C)(t))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Object(i.h)(t)}this.tokensMap.EOF=Q;var o=Object(i.o)(Object(i.U)(t),(function(t){return Object(i.A)(t.categoryMatches)}));this.tokenMatcher=o?U:D,B(Object(i.U)(this.tokensMap))},t.prototype.defineRule=function(t,e,n){if(this.selfAnalysisDone)throw Error("Grammar rule <"+t+"> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");var r,o=Object(i.w)(n,"resyncEnabled")?n.resyncEnabled:Qe.resyncEnabled,a=Object(i.w)(n,"recoveryValueFunc")?n.recoveryValueFunc:Qe.recoveryValueFunc,s=this.ruleShortNameIdx<<12;function l(t){try{if(!0===this.outputCst){e.apply(this,t);var n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}return e.apply(this,t)}catch(t){return this.invokeRuleCatch(t,o,a)}finally{this.ruleFinallyStateUpdate()}}this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=t,this.fullRuleNameToShort[t]=s;return(r=function(e,n){return void 0===e&&(e=0),this.ruleInvocationStateUpdate(s,t,e),l.call(this,n)}).ruleName=t,r.originalGrammarAction=e,r},t.prototype.invokeRuleCatch=function(t,e,n){var r=1===this.RULE_STACK.length,i=e&&!this.isBackTracking()&&this.recoveryEnabled;if(pe(t)){var o=t;if(i){var a,s=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(s))return o.resyncedTokens=this.reSyncTo(s),this.outputCst?((a=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,a):n();throw this.outputCst&&((a=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,o.partialCstResult=a),o}if(r)return this.moveToTerminatedState(),n();throw o}throw t},t.prototype.optionInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,n)},t.prototype.optionInternalLogic=function(t,e,n){var r,i,o=this,a=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,void 0!==(i=t.GATE)){var s=a;a=function(){return i.call(o)&&s.call(o)}}}else r=t;if(!0===a.call(this))return r.call(this)},t.prototype.atLeastOneInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,e,n)},t.prototype.atLeastOneInternalLogic=function(t,e,n){var r,i,o=this,a=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,void 0!==(i=e.GATE)){var s=a;a=function(){return i.call(o)&&s.call(o)}}}else r=e;if(!0!==a.call(this))throw this.raiseEarlyExitException(t,Gt.REPETITION_MANDATORY,e.ERR_MSG);for(var l=this.doSingleRepetition(r);!0===a.call(this)&&!0===l;)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,e],a,1024,t,Ut)},t.prototype.atLeastOneSepFirstInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,e,n)},t.prototype.atLeastOneSepFirstInternalLogic=function(t,e,n){var r=this,i=e.DEF,o=e.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(t,Gt.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);i.call(this);for(var a=function(){return r.tokenMatcher(r.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,a,i,Ft],a,1536,t,Ft)},t.prototype.manyInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,n)},t.prototype.manyInternalLogic=function(t,e,n){var r,i,o=this,a=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,void 0!==(i=e.GATE)){var s=a;a=function(){return i.call(o)&&s.call(o)}}}else r=e;for(var l=!0;!0===a.call(this)&&!0===l;)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[t,e],a,768,t,jt,l)},t.prototype.manySepFirstInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,e,n)},t.prototype.manySepFirstInternalLogic=function(t,e,n){var r=this,i=e.DEF,o=e.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){i.call(this);for(var a=function(){return r.tokenMatcher(r.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,a,i,Dt],a,1280,t,Dt)}},t.prototype.repetitionSepSecondInternal=function(t,e,n,r,i){for(;n();)this.CONSUME(e),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,n,r,i],n,1536,t,i)},t.prototype.doSingleRepetition=function(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e},t.prototype.orInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(256,e),r=Object(i.y)(t)?t:t.DEF,o=this.getLaFuncFromCache(n).call(this,r);if(void 0!==o)return r[o].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)},t.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){var t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new ge(e,t))}},t.prototype.subruleInternal=function(t,e,n){var r;try{var i=void 0!==n?n.ARGS:void 0;return r=t.call(this,e,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:t.ruleName),r}catch(e){this.subruleInternalError(e,n,t.ruleName)}},t.prototype.subruleInternalError=function(t,e,n){throw pe(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:n),delete t.partialCstResult),t},t.prototype.consumeInternal=function(t,e,n){var r;try{var i=this.LA(1);!0===this.tokenMatcher(i,t)?(this.consumeToken(),r=i):this.consumeInternalError(t,i,n)}catch(n){r=this.consumeInternalRecovery(t,e,n)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:t.name,r),r},t.prototype.consumeInternalError=function(t,e,n){var r,i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new de(r,e,i))},t.prototype.consumeInternalRecovery=function(t,e,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;var r=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,r)}catch(t){throw"InRuleRecoveryException"===t.name?n:t}},t.prototype.saveRecogState=function(){var t=this.errors,e=Object(i.g)(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}},t.prototype.reloadRecogState=function(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK},t.prototype.ruleInvocationStateUpdate=function(t,e,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e,t)},t.prototype.isBackTracking=function(){return 0!==this.isBackTrackingStack.length},t.prototype.getCurrRuleFullName=function(){var t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]},t.prototype.shortRuleNameToFullName=function(t){return this.shortRuleNameToFull[t]},t.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),Q)},t.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},t}(),je=function(){function t(){}return t.prototype.initErrorHandler=function(t){this._errors=[],this.errorMessageProvider=Object(i.w)(t,"errorMessageProvider")?t.errorMessageProvider:Je.errorMessageProvider},t.prototype.SAVE_ERROR=function(t){if(pe(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Object(i.g)(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(t.prototype,"errors",{get:function(){return Object(i.g)(this._errors)},set:function(t){this._errors=t},enumerable:!1,configurable:!0}),t.prototype.raiseEarlyExitException=function(t,e,n){for(var r=this.getCurrRuleFullName(),i=Jt(t,this.getGAstProductions()[r],e,this.maxLookahead)[0],o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new ve(s,this.LA(1),this.LA(0)))},t.prototype.raiseNoAltException=function(t,e){for(var n=this.getCurrRuleFullName(),r=Zt(t,this.getGAstProductions()[n],this.maxLookahead),i=[],o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));var a=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:a,customUserDescription:e,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new me(s,this.LA(1),a))},t}(),De=function(){function t(){}return t.prototype.initContentAssist=function(){},t.prototype.computeContentAssist=function(t,e){var n=this.gastProductionsCache[t];if(Object(i.F)(n))throw Error("Rule ->"+t+"<- does not exist in this grammar.");return Bt([n],e,this.tokenMatcher,this.maxLookahead)},t.prototype.getNextPossibleTokenTypes=function(t){var e=Object(i.s)(t.ruleStack),n=this.getGAstProductions()[e];return new _t(n,t).startWalking()},t}(),Ue={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Ue);var Fe=Math.pow(2,8)-1,We=J({name:"RECORDING_PHASE_TOKEN",pattern:$.NA});B([We]);var Be=tt(We,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Be);var He={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},Ge=function(){function t(){}return t.prototype.initGastRecorder=function(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1},t.prototype.enableRecording=function(){var t=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(function(){for(var e=function(e){var n=e>0?e:"";t["CONSUME"+n]=function(t,n){return this.consumeInternalRecord(t,e,n)},t["SUBRULE"+n]=function(t,n){return this.subruleInternalRecord(t,e,n)},t["OPTION"+n]=function(t){return this.optionInternalRecord(t,e)},t["OR"+n]=function(t){return this.orInternalRecord(t,e)},t["MANY"+n]=function(t){this.manyInternalRecord(e,t)},t["MANY_SEP"+n]=function(t){this.manySepFirstInternalRecord(e,t)},t["AT_LEAST_ONE"+n]=function(t){this.atLeastOneInternalRecord(e,t)},t["AT_LEAST_ONE_SEP"+n]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}},n=0;n<10;n++)e(n);t.consume=function(t,e,n){return this.consumeInternalRecord(e,t,n)},t.subrule=function(t,e,n){return this.subruleInternalRecord(e,t,n)},t.option=function(t,e){return this.optionInternalRecord(e,t)},t.or=function(t,e){return this.orInternalRecord(e,t)},t.many=function(t,e){this.manyInternalRecord(t,e)},t.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},t.ACTION=t.ACTION_RECORD,t.BACKTRACK=t.BACKTRACK_RECORD,t.LA=t.LA_RECORD}))},t.prototype.disableRecording=function(){var t=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(function(){for(var e=0;e<10;e++){var n=e>0?e:"";delete t["CONSUME"+n],delete t["SUBRULE"+n],delete t["OPTION"+n],delete t["OR"+n],delete t["MANY"+n],delete t["MANY_SEP"+n],delete t["AT_LEAST_ONE"+n],delete t["AT_LEAST_ONE_SEP"+n]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA}))},t.prototype.ACTION_RECORD=function(t){},t.prototype.BACKTRACK_RECORD=function(t,e){return function(){return!0}},t.prototype.LA_RECORD=function(t){return qe},t.prototype.topLevelRuleRecord=function(t,e){try{var n=new ot({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),e.call(this),this.recordingProdStack.pop(),n}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(e){throw t}throw t}},t.prototype.optionInternalRecord=function(t,e){return ze.call(this,st,t,e)},t.prototype.atLeastOneInternalRecord=function(t,e){ze.call(this,lt,e,t)},t.prototype.atLeastOneSepFirstInternalRecord=function(t,e){ze.call(this,ct,e,t,!0)},t.prototype.manyInternalRecord=function(t,e){ze.call(this,ut,e,t)},t.prototype.manySepFirstInternalRecord=function(t,e){ze.call(this,ht,e,t,!0)},t.prototype.orInternalRecord=function(t,e){return Ve.call(this,t,e)},t.prototype.subruleInternalRecord=function(t,e,n){if(Ye(e),!t||!1===Object(i.w)(t,"ruleName")){var r=new Error(" argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(t)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var o=Object(i.M)(this.recordingProdStack),a=t.ruleName,s=new it({idx:e,nonTerminalName:a,referencedRule:void 0});return o.definition.push(s),this.outputCst?He:Ue},t.prototype.consumeInternalRecord=function(t,e,n){if(Ye(e),!H(t)){var r=new Error(" argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(t)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var o=Object(i.M)(this.recordingProdStack),a=new pt({idx:e,terminalType:t});return o.definition.push(a),Be},t}();function ze(t,e,n,r){void 0===r&&(r=!1),Ye(n);var o=Object(i.M)(this.recordingProdStack),a=Object(i.B)(e)?e:e.DEF,s=new t({definition:[],idx:n});return r&&(s.separator=e.SEP),Object(i.w)(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),o.definition.push(s),this.recordingProdStack.pop(),Ue}function Ve(t,e){var n=this;Ye(e);var r=Object(i.M)(this.recordingProdStack),o=!1===Object(i.y)(t),a=!1===o?t:t.DEF,s=new ft({definition:[],idx:e,ignoreAmbiguities:o&&!0===t.IGNORE_AMBIGUITIES});Object(i.w)(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD);var l=Object(i.Q)(a,(function(t){return Object(i.B)(t.GATE)}));return s.hasPredicates=l,r.definition.push(s),Object(i.u)(a,(function(t){var e=new at({definition:[]});s.definition.push(e),Object(i.w)(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:Object(i.w)(t,"GATE")&&(e.ignoreAmbiguities=!0),n.recordingProdStack.push(e),t.ALT.call(n),n.recordingProdStack.pop()})),Ue}function Ke(t){return 0===t?"":""+t}function Ye(t){if(t<0||t>Fe){var e=new Error("Invalid DSL Method idx value: <"+t+">\n\tIdx value must be a none negative value smaller than "+(Fe+1));throw e.KNOWN_RECORDER_ERROR=!0,e}}var $e=function(){function t(){}return t.prototype.initPerformanceTracer=function(t){if(Object(i.w)(t,"traceInitPerf")){var e=t.traceInitPerf,n="number"==typeof e;this.traceInitMaxIdent=n?e:1/0,this.traceInitPerf=n?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=Je.traceInitPerf;this.traceInitIndent=-1},t.prototype.TRACE_INIT=function(t,e){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent");var r=Object(i.R)(e),o=r.time,a=r.value,s=o>10?console.warn:console.log;return this.traceInitIndent time: "+o+"ms"),this.traceInitIndent--,a}return e()},t}(),Xe=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qe=tt(Q,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(qe);var Ze,Je=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:wt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Qe=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function tn(t){return void 0===t&&(t=void 0),function(){return t}}!function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"}(Ze||(Ze={}));var en=function(){function t(t,e){this.definitionErrors=[],this.selfAnalysisDone=!1;if(this.initErrorHandler(e),this.initLexerAdapter(),this.initLooksAhead(e),this.initRecognizerEngine(t,e),this.initRecoverable(e),this.initTreeBuilder(e),this.initContentAssist(),this.initGastRecorder(e),this.initPerformanceTracer(e),Object(i.w)(e,"ignoredIssues"))throw new Error("The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=Object(i.w)(e,"skipValidations")?e.skipValidations:Je.skipValidations}return t.performSelfAnalysis=function(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")},t.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",(function(){var n;e.selfAnalysisDone=!0;var r=e.className;e.TRACE_INIT("toFastProps",(function(){Object(i.S)(e)})),e.TRACE_INIT("Grammar Recording",(function(){try{e.enableRecording(),Object(i.u)(e.definedRulesNames,(function(t){var n=e[t].originalGrammarAction,r=void 0;e.TRACE_INIT(t+" Rule",(function(){r=e.topLevelRuleRecord(t,n)})),e.gastProductionsCache[t]=r}))}finally{e.disableRecording()}}));var o=[];if(e.TRACE_INIT("Grammar Resolving",(function(){o=ce({rules:Object(i.U)(e.gastProductionsCache)}),e.definitionErrors.push.apply(e.definitionErrors,o)})),e.TRACE_INIT("Grammar Validations",(function(){if(Object(i.A)(o)&&!1===e.skipValidations){var t=ue({rules:Object(i.U)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:Object(i.U)(e.tokensMap),errMsgProvider:At,grammarName:r});e.definitionErrors.push.apply(e.definitionErrors,t)}})),Object(i.A)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",(function(){var t,n,r=(t=Object(i.U)(e.gastProductionsCache),n={},Object(i.u)(t,(function(t){var e=new Nt(t).startWalking();Object(i.f)(n,e)})),n);e.resyncFollows=r})),e.TRACE_INIT("ComputeLookaheadFunctions",(function(){e.preComputeLookaheadFunctions(Object(i.U)(e.gastProductionsCache))}))),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Object(i.A)(e.definitionErrors))throw n=Object(i.I)(e.definitionErrors,(function(t){return t.message})),new Error("Parser Definition Errors detected:\n "+n.join("\n-------------------------------\n"))}))},t.DEFER_DEFINITION_ERRORS_HANDLING=!1,t}();Object(i.e)(en,[Te,xe,Re,Me,Pe,_e,je,De,Ge,$e]);var nn=function(t){function e(e,n){void 0===n&&(n=Je);var r=Object(i.h)(n);return r.outputCst=!0,t.call(this,e,r)||this}return Xe(e,t),e}(en),rn=function(t){function e(e,n){void 0===n&&(n=Je);var r=Object(i.h)(n);return r.outputCst=!1,t.call(this,e,r)||this}return Xe(e,t),e}(en);function on(t,e){var n=void 0===e?{}:e,i=n.resourceBase,o=void 0===i?"https://unpkg.com/chevrotain@"+r+"/diagrams/":i,a=n.css;return'\n\x3c!-- This is a generated file --\x3e\n\n\n\n\n'+("\n\n")+("\n \ No newline at end of file +Error 404 - Not Found

404

Not Found



The resource could not be found.

\ No newline at end of file diff --git a/docs/bundle.min.css b/docs/bundle.min.css index 66fc672..3de55f8 100644 --- a/docs/bundle.min.css +++ b/docs/bundle.min.css @@ -10,4 +10,4 @@ * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-clean-blog/blob/master/LICENSE) */body{font-size:20px;color:#212529}p{line-height:1.5}p a{text-decoration:underline}@media (max-width:575px){.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline label{-ms-flex-align:center;-ms-flex-pack:center;justify-content:center}.form-inline .form-group,.form-inline label{display:-ms-flexbox;display:flex;align-items:center;margin-bottom:0}.form-inline .form-group{-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center}}h1,h2,h3,h4,h5,h6{font-weight:800;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif}::-moz-selection{color:#fff;background:#0085a1;text-shadow:none}::selection{color:#fff;background:#0085a1;text-shadow:none}#mainNav{position:absolute;border-bottom:1px solid transparent;background-color:#232323;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif}#mainNav .navbar-brand{font-weight:800}@media only screen and (max-width:991px){#mainNav{position:fixed}}#mainNav .navbar-brand{padding-left:20px;color:#fff}#mainNav .navbar-brand:focus,#mainNav .navbar-brand:hover{color:hsla(0,0%,100%,.8)}@media only screen and (min-width:992px){#mainNav .navbar-brand{padding-top:10px}}.wrapper{display:flex;flex-direction:column;height:100vh}#maincontent{flex:1 0 auto}footer{flex-shrink:0;width:100%;right:0;left:0;padding:20px 0;background-color:#232323;color:#fff}.copyright{font-size:14px;margin-bottom:0;text-align:center}.btn{font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif}.btn-lg{font-size:16px;padding:25px 35px}.CodeMirror{height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5)}.cm-animate-fat-cursor,.cm-fat-cursor-mark{-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-idea span.cm-meta{color:olive}.cm-s-idea span.cm-number{color:#00f}.cm-s-idea span.cm-keyword{line-height:1em;font-weight:700;color:navy}.cm-s-idea span.cm-atom{font-weight:700;color:navy}.cm-s-idea span.cm-def,.cm-s-idea span.cm-operator,.cm-s-idea span.cm-property,.cm-s-idea span.cm-type,.cm-s-idea span.cm-variable,.cm-s-idea span.cm-variable-2,.cm-s-idea span.cm-variable-3{color:#000}.cm-s-idea span.cm-comment{color:grey}.cm-s-idea span.cm-string,.cm-s-idea span.cm-string-2{color:green}.cm-s-idea span.cm-qualifier{color:#555}.cm-s-idea span.cm-error{color:red}.cm-s-idea span.cm-attribute{color:#00f}.cm-s-idea span.cm-tag{color:navy}.cm-s-idea span.cm-link{color:#00f}.cm-s-idea .CodeMirror-activeline-background{background:#fffae3}.cm-s-idea span.cm-builtin{color:#30a}.cm-s-idea span.cm-bracket{color:#cc7}.cm-s-idea{font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif}.cm-s-idea .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important}.CodeMirror-hints.idea{font-family:Menlo,Monaco,Consolas,Courier New,monospace;color:#616569;background-color:#ebf3fd!important}.CodeMirror-hints.idea .CodeMirror-hint-active{background-color:#a2b8c9!important;color:#5c6065!important}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:#ffd;border:1px solid #000;border-radius:4px 4px 4px 4px;color:#000;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark{background-position:0 100%;background-repeat:repeat-x}.CodeMirror-lint-mark-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=")}.CodeMirror-lint-mark-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")}.CodeMirror-lint-marker{background-position:50%;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message{padding-left:18px;background-position:0 0;background-repeat:no-repeat}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=")}.CodeMirror-lint-marker-multiple{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:100% 100%;width:100%;height:100%} -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */.align_header{text-align:center;margin-bottom:20px}.tenpx-margin-bottom{margin-bottom:10px}h4{margin-top:10px}.cheatsheet{height:100%;padding:10px;border-radius:10px;border:1px solid #ced4da}p{font-size:16px!important}.cheatsheet p{line-height:1!important}.zero-margin-bottom{margin-bottom:0}#maincontent{margin-top:75px}.skip-top{top:10px;margin:10px 40%!important}.skip{background:#335075!important;color:#fff!important;position:absolute!important;clip:rect(1px,1px,1px,1px);float:left;margin-left:20%}.skip:active,.skip:focus{font-weight:700;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;display:block;text-decoration:underline;padding:5px;top:auto;min-width:20%;text-align:center;z-index:10000}a:hover{color:#208bff}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.54)}.navbar{padding:0!important}#errors{resize:none}#errors,.CodeMirror{background-color:#fff}.CodeMirror{box-sizing:border-box;margin:0;font:inherit;overflow:auto;font-family:inherit;display:block;width:100%;padding:6px;font-size:14px;line-height:1.42857143;color:#555;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);font-family:monospace;position:relative;overflow:hidden;resize:vertical;height:400px}.CodeMirror,.CodeMirror-focused{transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.CodeMirror-focused{border-color:#80bdff;outline:0;box-shadow:0 0 .2rem rgba(102,175,233,.6)}code{font-style:italic!important}.tutorial-code{display:block;padding-left:20px;margin-top:10px;margin-bottom:10px;font-size:16px!important;white-space:pre;background-color:rgb(0 0 0/.05);overflow:auto}@media (min-width:576px){.contained-container{max-width:540px}}@media (min-width:768px){.contained-container{max-width:720px}}@media (min-width:992px){.contained-container{max-width:960px}}@media (min-width:1200px){.contained-container{max-width:1140px}}td{font-size:16px}pre code{font-size:87.5%}.heading-links{color:#fff;padding-right:10px}.heading-link{color:#fff}.heading-link:focus,.heading-link:hover{color:hsla(0,0%,100%,.8)} \ No newline at end of file +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */.align_header{text-align:center;margin-bottom:20px}.tenpx-margin-bottom{margin-bottom:10px}h4{margin-top:10px}.cheatsheet{height:100%;padding:10px;border-radius:10px;border:1px solid #ced4da}p{font-size:16px!important}.cheatsheet p{line-height:1!important}.zero-margin-bottom{margin-bottom:0}#maincontent{margin-top:75px}.skip-top{top:10px;margin:10px 40%!important}.skip{background:#335075!important;color:#fff!important;position:absolute!important;clip:rect(1px,1px,1px,1px);float:left;margin-left:20%}.skip:active,.skip:focus{font-weight:700;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;display:block;text-decoration:underline;padding:5px;top:auto;min-width:20%;text-align:center;z-index:10000}a:hover{color:#208bff}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.54)}.navbar{padding:0!important}#errors{resize:none}#errors,.CodeMirror{background-color:#fff}.CodeMirror{box-sizing:border-box;margin:0;font:inherit;overflow:auto;font-family:inherit;display:block;width:100%;padding:6px;font-size:14px;line-height:1.42857143;color:#555;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);font-family:monospace;position:relative;overflow:hidden;resize:vertical;height:400px}.CodeMirror,.CodeMirror-focused{transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.CodeMirror-focused{border-color:#80bdff;outline:0;box-shadow:0 0 .2rem rgba(102,175,233,.6)}code{font-style:italic!important}.tutorial-code{display:block;padding-left:20px;margin-top:10px;margin-bottom:10px;font-size:16px!important;white-space:pre;background-color:rgb(0 0 0/.05);overflow:auto}@media (min-width:576px){.contained-container{max-width:540px}}@media (min-width:768px){.contained-container{max-width:720px}}@media (min-width:992px){.contained-container{max-width:960px}}@media (min-width:1200px){.contained-container{max-width:1140px}}td{font-size:16px}pre code{font-size:87.5%}.heading-links{color:#fff;padding-right:10px}.heading-link{color:#fff}.heading-link:focus,.heading-link:hover{color:hsla(0,0%,100%,.8)} \ No newline at end of file diff --git a/docs/bundle.min.js b/docs/bundle.min.js index 7e360f8..204a3ed 100644 --- a/docs/bundle.min.js +++ b/docs/bundle.min.js @@ -1,8 +1,8 @@ !function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(t,e,n){"use strict";function r(t){return t&&0===t.length}function i(t){return null==t?[]:Object.keys(t)}function o(t){for(var e=[],n=Object.keys(t),r=0;r=this.input.length)throw Error("Unexpected end of input");this.idx++},t.prototype.loc=function(t){return{begin:t,end:this.idx}};var e,n=/[0-9a-fA-F]/,r=/[0-9]/,i=/[1-9]/;function o(t){return t.charCodeAt(0)}function a(t,e){void 0!==t.length?t.forEach((function(t){e.push(t)})):e.push(t)}function s(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e]=!0}function l(t){if(void 0===t)throw Error("Internal Error - Should never get here!")}var c=[];for(e=o("0");e<=o("9");e++)c.push(e);var u=[o("_")].concat(c);for(e=o("a");e<=o("z");e++)u.push(e);for(e=o("A");e<=o("Z");e++)u.push(e);var h=[o(" "),o("\f"),o("\n"),o("\r"),o("\t"),o("\v"),o("\t"),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o("\u2028"),o("\u2029"),o(" "),o(" "),o(" "),o("\ufeff")];function f(){}return f.prototype.visitChildren=function(t){for(var e in t){var n=t[e];t.hasOwnProperty(e)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((function(t){this.visit(t)}),this))}},f.prototype.visit=function(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)},f.prototype.visitPattern=function(t){},f.prototype.visitFlags=function(t){},f.prototype.visitDisjunction=function(t){},f.prototype.visitAlternative=function(t){},f.prototype.visitStartAnchor=function(t){},f.prototype.visitEndAnchor=function(t){},f.prototype.visitWordBoundary=function(t){},f.prototype.visitNonWordBoundary=function(t){},f.prototype.visitLookahead=function(t){},f.prototype.visitNegativeLookahead=function(t){},f.prototype.visitCharacter=function(t){},f.prototype.visitSet=function(t){},f.prototype.visitGroup=function(t){},f.prototype.visitGroupBackReference=function(t){},f.prototype.visitQuantifier=function(t){},{RegExpParser:t,BaseRegExpVisitor:f,VERSION:"0.5.0"}})?r.apply(e,i):r)||(t.exports=o)},function(t,e,n){"use strict"; -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */Object.defineProperty(e,"__esModule",{value:!0}),e.CommonError=e.append=e.regexEscape=e.removeQuotes=e.findLastIndex=e.last=e.first=e.isSingleRegexCharacter=e.combineFlags=e.hasFlag=e.makeFlag=e.usefulConditional=e.unusedParameter=void 0,e.unusedParameter=function(t,e){},e.usefulConditional=function(t,e){return Boolean(t)},e.makeFlag=function(t){return 1<=0;n--)if(t[n]===e)return n;return-1},e.removeQuotes=function(t){return t.substring(1,t.length-1)},e.regexEscape=function(t){return t.replace(/([:\\\-\.\[\]\^\|\(\)\*\+\?\{\}\$\/])/g,"\\$1")},e.append=function(t,...e){for(const n of e)for(const e of n)t.push(e)};class r{constructor(t,e,n,r,i){this.type=t,this.start_line=e,this.start_column=n,this.length=r,this.message=i}static fromLexError(t){const e=t.message.replace(/(--?>|<--?)/g,"");return new r("Lexer Error",t.line,t.column,t.length,e)}static fromParseError(t){var e,n,i;const o=t.name+" - "+t.message.replace(/(--?>|<--?)/g,"");return new r("Parser Error",null!==(e=t.token.startLine)&&void 0!==e?e:NaN,null!==(n=t.token.startColumn)&&void 0!==n?n:NaN,null!==(i=t.token.endOffset)&&void 0!==i?i:NaN-t.token.startOffset,o)}static fromSemanticError(t){return new r("Semantic Error",t.startLine,t.startColumn,t.length,t.message)}toString(){return`${this.type} @ (${this.start_line}, ${this.start_column}): ${this.message}`}}e.CommonError=r},function(t,e,n){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),h=/Opera\//.test(t),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),d=/PhantomJS/.test(t),m=f&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),g=/Android/.test(t),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=m||/Mac/.test(e),b=/\bCrOS\b/.test(t),T=/win/i.test(e),O=h&&t.match(/Version\/(\d*\.\d*)/);O&&(O=Number(O[1])),O&&O>=15&&(h=!1,l=!0);var S=y&&(c||h&&(null==O||O<12.11)),x=n||a&&s>=9;function E(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var C,k=function(t,e){var n=t.className,r=E(e).exec(n);if(r){var i=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function N(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function w(t,e){return N(t).appendChild(e)}function L(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}}m?P=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(P=function(t){try{t.select()}catch(t){}});var F=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function W(t,e){for(var n=0;n=e)return r+Math.min(a,e-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=e)return r}}var K=[""];function Y(t){for(;K.length<=t;)K.push($(K)+" ");return K[t]}function $(t){return t[t.length-1]}function X(t,e){for(var n=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||J.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&Q(t))||e.test(t):Q(t)}function et(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var nt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function rt(t){return t.charCodeAt(0)>=768&&nt.test(t)}function it(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var i=(e+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+r}}var at=null;function st(t,e,n){var r;at=null;for(var i=0;ie)return i;o.to==e&&(o.from!=o.to&&"before"==n?r=i:at=i),o.from==e&&(o.from!=o.to&&"before"!=n?r=i:at=i)}return null!=r?r:at}var lt=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(t,e,n){this.level=t,this.from=e,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!t.test(a))return!1;for(var c,u=a.length,h=[],f=0;f-1&&(r[e]=i.slice(0,o).concat(i.slice(o+1)))}}}function dt(t,e){var n=ft(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){pt(this,t,e)}}function bt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Tt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ot(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function St(t){bt(t),Tt(t)}function xt(t){return t.target||t.srcElement}function Et(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var Ct,kt,Nt=function(){if(a&&s<9)return!1;var t=L("div");return"draggable"in t||"dragDrop"in t}();function wt(t){if(null==Ct){var e=L("span","​");w(t,L("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Ct=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var n=Ct?L("span","​"):L("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Lt(t){if(null!=kt)return kt;var e=w(t,document.createTextNode("AخA")),n=C(e,0,1).getBoundingClientRect(),r=C(e,1,2).getBoundingClientRect();return N(t),!(!n||n.left==n.right)&&(kt=r.right-n.right<3)}var At,It=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var o=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=i+1)}return n}:function(t){return t.split(/\r\n?|\n/)},Rt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Mt="oncopy"in(At=L("div"))||(At.setAttribute("oncopy","return;"),"function"==typeof At.oncopy),_t=null,Pt={},jt={};function Dt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Pt[t]=e}function Ut(t){if("string"==typeof t&&jt.hasOwnProperty(t))t=jt[t];else if(t&&"string"==typeof t.name&&jt.hasOwnProperty(t.name)){var e=jt[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ut("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ut("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ft(t,e){e=Ut(e);var n=Pt[e.name];if(!n)return Ft(t,"text/plain");var r=n(t,e);if(Wt.hasOwnProperty(e.name)){var i=Wt[e.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)r[a]=e.modeProps[a];return r}var Wt={};function Bt(t,e){D(e,Wt.hasOwnProperty(t)?Wt[t]:Wt[t]={})}function Ht(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Gt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function zt(t,e,n){return!t.startState||t.startState(e,n)}var Vt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Kt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e=t.first&&en?te(n,Kt(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?te(t.line,e):n<0?te(t.line,0):t}(e,Kt(t,e.line).text.length)}function le(t,e){for(var n=[],r=0;r=this.string.length},Vt.prototype.sol=function(){return this.pos==this.lineStart},Vt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vt.prototype.next=function(){if(this.pose},Vt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Vt.prototype.skipToEnd=function(){this.pos=this.string.length},Vt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Vt.prototype.backUp=function(t){this.pos-=t},Vt.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var i=function(t){return n?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},Vt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Vt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Vt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ce=function(t,e){this.state=t,this.lookAhead=e},ue=function(t,e,n,r){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function he(t,e,n,r){var i=[t.state.modeGen],o={};Te(t,e.text,t.doc.mode,n,(function(t,e){return i.push(t,e)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=t.state.overlays[r],l=1,c=0;n.state=!0,Te(t,e.text,s.mode,n,(function(t,e){for(var n=l;ct&&i.splice(l,1,t,i[l+1],r),l+=2,c=Math.min(t,r)}if(e)if(s.opaque)i.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&Ht(t.doc.mode,r.state),o=he(t,e,r);i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function pe(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return new ue(r,!0,e);var o=function(t,e,n){for(var r,i,o=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=o.first)return o.first;var l=Kt(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ce?c.lookAhead:0)<=o.modeFrontier))return s;var u=U(l.text,null,t.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(t,e,n),a=o>r.first&&Kt(r,o-1).stateAfter,s=a?ue.fromSaved(r,a,o):new ue(r,zt(r.mode),o);return r.iter(o,e,(function(n){de(t,n.text,s);var r=s.line;n.stateAfter=r==e-1||r%5==0||r>=i.viewFrom&&re.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}ue.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ue.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(t,e,n){return e instanceof ce?new ue(t,Ht(t.mode,e.state),n,e.lookAhead):new ue(t,Ht(t.mode,e),n)},ue.prototype.save=function(t){var e=!1!==t?Ht(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(e,this.maxLookAhead):e};var ve=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function ye(t,e,n,r){var i,o,a=t.doc,s=a.mode,l=Kt(a,(e=se(a,e)).line),c=pe(t,e.line,n),u=new Vt(l.text,t.options.tabSize,c);for(r&&(o=[]);(r||u.post.options.maxHighlightLength?(s=!1,a&&de(t,e,r,h.pos),h.pos=e.length,l=null):l=be(ge(n,h,r.state,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c=e:o.to>e);(r||(r=[])).push(new xe(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(t,e,n){var r;if(t)for(var i=0;i=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from0&&s)for(var b=0;be)&&(!n||Re(n,o.marker)<0)&&(n=o.marker)}return n}function De(t,e,n,r,i){var o=Kt(t,e),a=Se&&o.markedSpans;if(a)for(var s=0;s=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ee(c.to,n)>=0:ee(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ee(c.from,r)<=0:ee(c.from,r)<0)))return!0}}}function Ue(t){for(var e;e=_e(t);)t=e.find(-1,!0).line;return t}function Fe(t,e){var n=Kt(t,e),r=Ue(n);return n==r?e:qt(r)}function We(t,e){if(e>t.lastLine())return e;var n,r=Kt(t,e);if(!Be(t,r))return e;for(;n=Pe(r);)r=n.find(1,!0).line;return qt(r)+1}function Be(t,e){var n=Se&&e.markedSpans;if(n)for(var r=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var Ke=function(t,e,n){this.text=t,Le(this,e),this.height=n?n(this):1};function Ye(t){t.parent=null,we(t)}Ke.prototype.lineNo=function(){return qt(this)},yt(Ke);var $e={},Xe={};function qe(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Xe:$e;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var n=A("span",null,null,l?"padding-right: .1px":null),r={pre:A("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var o=i?e.rest[i-1]:e.line,a=void 0;r.pos=0,r.addToken=Qe,Lt(t.display.measure)&&(a=ct(o,t.doc.direction))&&(r.addToken=tn(r.addToken,a)),r.map=[],nn(o,r,fe(t,o,e!=t.display.externalMeasured&&qt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=_(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=_(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(wt(t.display.measure))),0==i?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return dt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=_(r.pre.className,r.textClass||"")),r}function Je(t){var e=L("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Qe(t,e,n,r,i,o,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",i=0;ic&&h.from<=c);f++);if(h.to>=u)return t(n,r,i,o,a,s,l);t(n,r.slice(0,h.to-c),i,o,null,s,l),o=null,r=r.slice(h.to-c),c=h.to}}}function en(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function nn(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var a,s,l,c,u,h,f,p=i.length,d=0,m=1,g="",v=0;;){if(v==d){l=c=u=s="",f=null,h=null,v=1/0;for(var y=[],b=void 0,T=0;Td||S.collapsed&&O.to==d&&O.from==d)){if(null!=O.to&&O.to!=d&&v>O.to&&(v=O.to,c=""),S.className&&(l+=" "+S.className),S.css&&(s=(s?s+";":"")+S.css),S.startStyle&&O.from==d&&(u+=" "+S.startStyle),S.endStyle&&O.to==v&&(b||(b=[])).push(S.endStyle,O.to),S.title&&((f||(f={})).title=S.title),S.attributes)for(var x in S.attributes)(f||(f={}))[x]=S.attributes[x];S.collapsed&&(!h||Re(h.marker,S)<0)&&(h=O)}else O.from>d&&v>O.from&&(v=O.from)}if(b)for(var E=0;E=p)break;for(var k=Math.min(p,v);;){if(g){var N=d+g.length;if(!h){var w=N>k?g.slice(0,k-d):g;e.addToken(e,w,a?a+l:l,u,d+w.length==v?c:"",s,f)}if(N>=k){g=g.slice(k-d),d=k;break}d=N,u=""}g=i.slice(o,o=n[m++]),a=qe(n[m++],e.cm.options)}}else for(var L=1;Ln)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function An(t,e,n,r){return Mn(t,Rn(t,e),n,r)}function In(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&e2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,r){var i,o=jn(e.map,n,r),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&rt(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,i))}else{var p;c>0&&(h=r="right"),i=t.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var d=l.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+ir(t.display),top:d.top,bottom:d.bottom}:Pn}for(var m=i.top-e.rect.top,g=i.bottom-e.rect.top,v=(m+g)/2,y=e.view.measure.heights,b=0;be)&&(i=(o=l-s)-1,e>=l&&(a="right")),null!=i){if(r=t[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=t[i]).left==n.right;i--);return n}function Un(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(t,e,n){return a(n?t-1:t,1==s[e].level!=n)}var h=st(s,l,c),f=at,p=u(l,h,"before"==c);return null!=f&&(p.other=u(l,f,"before"!=c)),p}function $n(t,e){var n=0;e=se(t.doc,e),t.options.lineWrapping||(n=ir(t.display)*e.ch);var r=Kt(t.doc,e.line),i=Ge(r)+xn(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Xn(t,e,n,r,i){var o=te(t,e,n);return o.xRel=i,r&&(o.outside=r),o}function qn(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return Xn(r.first,0,null,-1,-1);var i=Zt(r,n),o=r.first+r.size-1;if(i>o)return Xn(r.first+r.size-1,Kt(r,o).text.length,null,1,1);e<0&&(e=0);for(var a=Kt(r,i);;){var s=tr(t,a,i,e,n),l=je(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Kt(r,i=c.line)}}function Zn(t,e,n,r){r-=Gn(e);var i=e.text.length,o=ot((function(e){return Mn(t,n,e-1).bottom<=r}),i,0);return{begin:o,end:i=ot((function(e){return Mn(t,n,e).top>r}),o,i)}}function Jn(t,e,n,r){return n||(n=Rn(t,e)),Zn(t,e,n,zn(t,e,Mn(t,n,r),"line").top)}function Qn(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function tr(t,e,n,r,i){i-=Ge(e);var o=Rn(t,e),a=Gn(e),s=0,l=e.text.length,c=!0,u=ct(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?nr:er)(t,e,n,o,u,r,i);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var f,p,d=null,m=null,g=ot((function(e){var n=Mn(t,o,e);return n.top+=a,n.bottom+=a,!!Qn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(d=e,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left=T.bottom?1:0}return Xn(n,g=it(e.text,g,1),p,v,r-f)}function er(t,e,n,r,i,o,a){var s=ot((function(s){var l=i[s],c=1!=l.level;return Qn(Yn(t,te(n,c?l.to:l.from,c?"before":"after"),"line",e,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Yn(t,te(n,c?l.from:l.to,c?"after":"before"),"line",e,r);Qn(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function nr(t,e,n,r,i,o,a){var s=Zn(t,e,r,a),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,f=0;f=c||p.to<=l)){var d=Mn(t,r,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=dm)&&(u=p,h=m)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function rr(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==_n){_n=L("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)_n.appendChild(document.createTextNode("x")),_n.appendChild(L("br"));_n.appendChild(document.createTextNode("x"))}w(t.measure,_n);var n=_n.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),N(t.measure),n||1}function ir(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=L("span","xxxxxxxxxx"),n=L("pre",[e],"CodeMirror-line-like");w(t.measure,n);var r=e.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function or(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ar(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function ar(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function sr(t){var e=rr(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/ir(t.display)-3);return function(i){if(Be(t.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(l=Kt(t.doc,c.line).text).length==c.ch){var u=U(l,l.length,t.options.tabSize)-l.length;c=te(c.line,Math.max(0,Math.round((o-Cn(t.display).left)/ir(t.display))-u))}return c}function ur(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;re)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Se&&Fe(t.doc,e)i.viewFrom?pr(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)pr(t);else if(e<=i.viewFrom){var o=dr(t,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):pr(t)}else if(n>=i.viewTo){var a=dr(t,e,e,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):pr(t)}else{var s=dr(t,e,e,-1),l=dr(t,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(on(t,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):pr(t)}var c=i.externalMeasured;c&&(n=i.lineN&&e=r.viewTo)){var o=r.view[ur(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==W(a,n)&&a.push(n)}}}function pr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function dr(t,e,n,r){var i,o=ur(t,e),a=t.display.view;if(!Se||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=t.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-e,o++}else i=s-e;e+=i,n+=i}for(;Fe(t.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function mr(t){for(var e=t.display.view,n=0,r=0;r=t.display.viewTo||s.to().linee||e==n&&a.to==e)&&(r(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(e,n,"ltr")}(m,n||0,null==r?f:r,(function(t,e,i,h){var g="ltr"==i,v=p(t,g?"left":"right"),y=p(e-1,g?"right":"left"),b=null==n&&0==t,T=null==r&&e==f,O=0==h,S=!m||h==m.length-1;if(y.top-v.top<=3){var x=(c?T:b)&&S,E=(c?b:T)&&O?s:(g?v:y).left,C=x?l:(g?y:v).right;u(E,v.top,C-E,v.bottom)}else{var k,N,w,L;g?(k=c&&b&&O?s:v.left,N=c?l:d(t,i,"before"),w=c?s:d(e,i,"after"),L=c&&T&&S?l:y.right):(k=c?d(t,i,"before"):s,N=!c&&b&&O?l:v.right,w=!c&&T&&S?s:y.left,L=c?d(e,i,"after"):l),u(k,v.top,N-k,v.bottom),v.bottom0?e.blinker=setInterval((function(){t.hasFocus()||Cr(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Sr(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||Er(t))}function xr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&Cr(t))}),100)}function Er(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(dt(t,"focus",t,e),t.state.focused=!0,M(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Or(t))}function Cr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(dt(t,"blur",t,e),t.state.focused=!1,k(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function kr(t){for(var e=t.display,n=e.lineDiv.offsetTop,r=0;r.005||f<-.005)&&(Xt(i.line,l),Nr(i.line),i.rest))for(var p=0;pt.display.sizerWidth){var d=Math.ceil(c/ir(t.display));d>t.display.maxLineLength&&(t.display.maxLineLength=d,t.display.maxLine=i.line,t.display.maxLineChanged=!0)}}}}function Nr(t){if(t.widgets)for(var e=0;e=a&&(o=Zt(e,Ge(Kt(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Lr(t,e){var n=t.display,r=rr(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=wn(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var s=t.doc.height+En(n),l=e.tops-r;if(e.topi+o){var u=Math.min(e.top,(c?s:e.bottom)-o);u!=i&&(a.scrollTop=u)}var h=t.options.fixedGutter?0:n.gutters.offsetWidth,f=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-h,p=Nn(t)-n.gutters.offsetWidth,d=e.right-e.left>p;return d&&(e.right=e.left+p),e.left<10?a.scrollLeft=0:e.leftp+f-3&&(a.scrollLeft=e.right+(d?0:10)-p),a}function Ar(t,e){null!=e&&(Mr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Ir(t){Mr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Rr(t,e,n){null==e&&null==n||Mr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Mr(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,_r(t,$n(t,e.from),$n(t,e.to),e.margin))}function _r(t,e,n,r){var i=Lr(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});Rr(t,i.scrollLeft,i.scrollTop)}function Pr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||li(t,{top:e}),jr(t,e,!0),n&&li(t),ri(t,100))}function jr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Dr(t,e,n,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,hi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Ur(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+En(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+kn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var Fr=function(t,e,n){this.cm=n;var r=this.vert=L("div",[L("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=L("div",[L("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),ht(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),ht(i,"scroll",(function(){i.clientWidth&&e(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var i=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},Fr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var t=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new F,this.disableVert=new F},Fr.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,(function r(){var i=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)}))},Fr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Wr=function(){};function Br(t,e){e||(e=Ur(t));var n=t.display.barWidth,r=t.display.barHeight;Hr(t,e);for(var i=0;i<4&&n!=t.display.barWidth||r!=t.display.barHeight;i++)n!=t.display.barWidth&&t.options.lineWrapping&&kr(t),Hr(t,Ur(t)),n=t.display.barWidth,r=t.display.barHeight}function Hr(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Wr.prototype.update=function(){return{bottom:0,right:0}},Wr.prototype.setScrollLeft=function(){},Wr.prototype.setScrollTop=function(){},Wr.prototype.clear=function(){};var Gr={native:Fr,null:Wr};function zr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&k(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Gr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?Dr(t,e):Pr(t,e)}),t),t.display.scrollbars.addClass&&M(t.display.wrapper,t.display.scrollbars.addClass)}var Vr=0;function Kr(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vr},e=t.curOp,an?an.ops.push(e):e.ownsGroup=an={ops:[e],delayedCallbacks:[]}}function Yr(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new oi(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Xr(t){t.updatedDisplay=t.mustUpdate&&ai(t.cm,t.update)}function qr(t){var e=t.cm,n=e.display;t.updatedDisplay&&kr(e),t.barMeasure=Ur(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=An(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+kn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Nn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Zr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!d){var o=L("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-xn(t.display))+"px;\n height: "+(e.bottom-e.top+kn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(i),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,n,r){var i;null==r&&(r=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?te(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?te(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,s=Yn(t,e),l=n&&n!=e?Yn(t,n):s,c=Lr(t,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Pr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Dr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(a=!0)),!a)break}return i}(e,se(r,t.scrollToPos.from),se(r,t.scrollToPos.to),t.scrollToPos.margin));var i=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(i)for(var a=0;a=t.display.viewTo)){var n=+new Date+t.options.workTime,r=pe(t,e.highlightFrontier),i=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(r.line>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength?Ht(e.mode,r.state):null,l=he(t,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!h&&fn)return ri(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),i.length&&Qr(t,(function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(t))return!1;fi(t)&&(pr(t),e.dims=or(t));var i=r.first+r.size,o=Math.max(e.visible.from-t.options.viewportMargin,r.first),a=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Se&&(o=Fe(t.doc,o),a=We(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=on(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=on(t,e,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,ur(t,n)))),r.viewTo=n}(t,o,a),n.viewOffset=Ge(Kt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=mr(t);if(!s&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=R();if(!e||!I(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&I(t.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var r=t.display,i=t.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=r.view,u=r.viewFrom,h=0;h-1&&(p=!1),un(t,f,u,n)),p&&(N(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Qt(t.options,u)))),a=f.node.nextSibling}else{var d=vn(t,f,u,n);o.insertBefore(d,a)}u+=f.size}for(;a;)a=s(a)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=R()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&I(document.body,t.anchorNode)&&I(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),N(n.cursorDiv),N(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,ri(t,400)),n.updateLineNumbers=null,!0}function si(t,e){for(var n=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Nn(t))r&&(e.visible=wr(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+En(t.display)-wn(t),n.top)}),e.visible=wr(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!ai(t,e))break;kr(t);var i=Ur(t);gr(t),Br(t,i),ui(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function li(t,e){var n=new oi(t,e);if(ai(t,n)){kr(t),si(t,n);var r=Ur(t);gr(t),Br(t,r),ui(t,r),n.finish()}}function ci(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function ui(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+kn(t)+"px"}function hi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=ar(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)t:for(var f=e.target,p=a.view;f!=s;f=f.parentNode)for(var d=0;d=0&&ee(t,r.to())<=0)return n}return-1};var xi=function(t,e){this.anchor=t,this.head=e};function Ei(t,e,n){var r=t&&t.options.selectionsMayTouch,i=e[n];e.sort((function(t,e){return ee(t.from(),e.from())})),n=W(e,i);for(var o=1;o0:l>=0){var c=oe(s.from(),a.from()),u=ie(s.to(),a.to()),h=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,e.splice(--o,2,new xi(h?u:c,h?c:u))}}return new Si(e,n)}function Ci(t,e){return new Si([new xi(t,e||t)],0)}function ki(t){return t.text?te(t.from.line+t.text.length-1,$(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Ni(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return ki(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=ki(e).ch-e.to.ch),te(n,r)}function wi(t,e){for(var n=[],r=0;r1&&t.remove(s.line+1,d-1),t.insert(s.line+1,v)}ln(t,"change",t,e)}function _i(t,e,n){!function t(r,i,o){if(r.linked)for(var a=0;as-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(Fi(t.done),$(t.done)):t.done.length&&!$(t.done).ranges?$(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),$(t.done)):void 0}(i,i.lastOp==r)))a=$(o.changes),0==ee(e.from,e.to)&&0==ee(e.from,a.to)?a.to=ki(e):o.changes.push(Ui(t,e));else{var l=$(i.done);for(l&&l.ranges||Hi(t.sel,i.done),o={changes:[Ui(t,e)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,a||dt(t,"historyAdded")}function Bi(t,e,n,r){var i=t.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(t,e,n,r){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,$(i.done),e))?i.done[i.done.length-1]=e:Hi(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Fi(i.undone)}function Hi(t,e){var n=$(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Gi(t,e,n,r){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),(function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=n.markedSpans),++o}))}function zi(t){if(!t)return null;for(var e,n=0;n-1&&($(s)[h]=c[h],delete c[h])}}}return r}function Yi(t,e,n,r){if(r){var i=t.anchor;if(n){var o=ee(e,i)<0;o!=ee(n,i)<0?(i=e,e=n):o!=ee(e,n)<0&&(e=n)}return new xi(i,e)}return new xi(n||e,e)}function $i(t,e,n,r,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),Qi(t,new Si([Yi(t.sel.primary(),e,n,i)],0),r)}function Xi(t,e,n){for(var r=[],i=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:s.to>e.ch))){if(i&&(dt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var h=l.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(h=ao(t,h,-r,h&&h.line==e.line?o:null)),h&&h.line==e.line&&(f=ee(h,n))&&(r<0?f<0:f>0))return io(t,h,e,r,i)}var p=l.find(r<0?-1:1);return(r<0?c:u)&&(p=ao(t,p,r,p.line==e.line?o:null)),p?io(t,p,e,r,i):null}}return e}function oo(t,e,n,r,i){var o=r||1,a=io(t,e,n,o,i)||!i&&io(t,e,n,o,!0)||io(t,e,n,-o,i)||!i&&io(t,e,n,-o,!0);return a||(t.cantEdit=!0,te(t.first,0))}function ao(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?se(t,te(e.line-1)):null:n>0&&e.ch==(r||Kt(t,e.line)).text.length?e.line0)){var u=[l,1],h=ee(c.from,s.from),f=ee(c.to,s.to);(h<0||!a.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(t,e.from,e.to);if(r)for(var i=r.length-1;i>=0;--i)uo(t,{from:r[i].from,to:r[i].to,text:i?[""]:e.text,origin:e.origin});else uo(t,e)}}function uo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var n=wi(t,e);Wi(t,e,n,t.cm?t.cm.curOp.id:NaN),po(t,e,n,ke(t,e));var r=[];_i(t,(function(t,n){n||-1!=W(r,t.history)||(yo(t.history,e),r.push(t.history)),po(t,e,null,ke(t,e))}))}}function ho(t,e,n){var r=t.cm&&t.cm.state.suppressEdits;if(!r||n){for(var i,o=t.history,a=t.sel,s="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c=0;--p){var d=f(p);if(d)return d.v}}}}function fo(t,e){if(0!=e&&(t.first+=e,t.sel=new Si(X(t.sel.ranges,(function(t){return new xi(te(t.anchor.line+e,t.anchor.ch),te(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){hr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;rt.lastLine())){if(e.from.lineo&&(e={from:e.from,to:te(o,Kt(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Yt(t,e.from,e.to),n||(n=wi(t,e)),t.cm?function(t,e,n){var r=t.doc,i=t.display,o=e.from,a=e.to,s=!1,l=o.line;t.options.lineWrapping||(l=qt(Ue(Kt(r,o.line))),r.iter(l,a.line+1,(function(t){if(t==i.maxLine)return s=!0,!0}))),r.sel.contains(e.from,e.to)>-1&>(t),Mi(r,e,n,sr(t)),t.options.lineWrapping||(r.iter(l,o.line+e.text.length,(function(t){var e=ze(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)})),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;r--){var i=Kt(t,r).stateAfter;if(i&&(!(i instanceof ce)||r+i.lookAhead1||!(this.children[0]instanceof To))){var s=[];this.collapse(s),this.children=[new To(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var a=i.lines.length%25+25,s=a;s10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(De(t,e.line,e,n,o)||e.line!=n.line&&De(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Se=!0}o.addToHistory&&Wi(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,n.line+1,(function(t){c&&o.collapsed&&!c.options.lineWrapping&&Ue(t)==c.display.maxLine&&(s=!0),o.collapsed&&l!=e.line&&Xt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new xe(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&t.iter(e.line,n.line+1,(function(e){Be(t,e)&&Xt(e,0)})),o.clearOnEnter&&ht(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Oe=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++Eo,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)hr(c,e.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=e.line;u<=n.line;u++)fr(c,u,"text");o.atomic&&no(c.doc),ln(c,"markerAdded",c,o)}return o}Co.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Kr(t),vt(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&hr(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&no(t.doc)),t&&ln(t,"markerCleared",t,this,r,i),e&&Yr(t),this.parent&&this.parent.clear()}},Co.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i=0;l--)co(this,r[l]);s?Ji(this,s):this.cm&&Ir(this.cm)})),undo:ni((function(){ho(this,"undo")})),redo:ni((function(){ho(this,"redo")})),undoSelection:ni((function(){ho(this,"undo",!0)})),redoSelection:ni((function(){ho(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,n){t=se(this,t),e=se(this,e);var r=[],i=t.line;return this.iter(t.line,e.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=t.line||null!=l.from&&i==e.line&&l.from>=e.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var r=0;rt)return e=t,!0;t-=o,++n})),se(this,te(n,e))},indexFromPos:function(t){var e=(t=se(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var f;if(e.state.draggingText&&!e.state.draggingText.copy&&(f=e.listSelections()),to(e.doc,Ci(n,n)),f)for(var p=0;p=0;e--)mo(t.doc,"",r[e].from,r[e].to,"+delete");Ir(t)}))}function Jo(t,e,n){var r=it(t.text,e+n,n);return r<0||r>t.text.length?null:r}function Qo(t,e,n){var r=Jo(t,e.ch,n);return null==r?null:new te(e.line,r,n<0?"after":"before")}function ta(t,e,n,r,i){if(t){"rtl"==e.doc.direction&&(i=-i);var o=ct(n,e.doc.direction);if(o){var a,s=i<0?$(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var c=Rn(e,n);a=i<0?n.text.length-1:0;var u=Mn(e,c,a).top;a=ot((function(t){return Mn(e,c,t).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Jo(n,a,1))}else a=i<0?s.to:s.from;return new te(r,a,l)}}return new te(r,i<0?n.text.length:0,i<0?"before":"after")}Go.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Go.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Go.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Go.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Go.default=y?Go.macDefault:Go.pcDefault;var ea={selectAll:so,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),H)},killLine:function(t){return Zo(t,(function(e){if(e.empty()){var n=Kt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)i=new te(i.line,i.ch+1),t.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),te(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var a=Kt(t.doc,i.line-1).text;a&&(i=new te(i.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),te(i.line-1,a.length-1),i,"+transpose"))}n.push(new xi(i,i))}t.setSelections(n)}))},newlineAndIndent:function(t){return Qr(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;r-1&&(ee((i=c.ranges[i]).from(),e)<0||e.xRel>0)&&(ee(i.to(),e)>0||e.xRel<0)?function(t,e,n,r){var i=t.display,o=!1,c=ti(t,(function(e){l&&(i.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:xr(t)),pt(i.wrapper.ownerDocument,"mouseup",c),pt(i.wrapper.ownerDocument,"mousemove",u),pt(i.scroller,"dragstart",h),pt(i.scroller,"drop",c),o||(bt(e),r.addNew||$i(t.doc,n,null,null,r.extend),l&&!f||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return o=!0};l&&(i.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,ht(i.wrapper.ownerDocument,"mouseup",c),ht(i.wrapper.ownerDocument,"mousemove",u),ht(i.scroller,"dragstart",h),ht(i.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(t,r,e,o):function(t,e,n,r){a&&xr(t);var i=t.display,o=t.doc;bt(e);var s,l,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?u[l]:new xi(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new xi(n,n)),n=cr(t,e,!0,!0),l=-1;else{var h=va(t,n,r.unit);s=r.extend?Yi(s,h.anchor,h.head,r.extend):h}r.addNew?-1==l?(l=u.length,Qi(o,Ei(t,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(Qi(o,Ei(t,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):qi(o,l,s,G):(l=0,Qi(o,new Si([s],0),G),c=o.sel);var f=n;function p(e){if(0!=ee(f,e))if(f=e,"rectangle"==r.unit){for(var i=[],a=t.options.tabSize,u=U(Kt(o,n.line).text,n.ch,a),h=U(Kt(o,e.line).text,e.ch,a),p=Math.min(u,h),d=Math.max(u,h),m=Math.min(n.line,e.line),g=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=g;m++){var v=Kt(o,m).text,y=V(v,p,a);p==d?i.push(new xi(te(m,y),te(m,y))):v.length>y&&i.push(new xi(te(m,y),te(m,V(v,d,a))))}i.length||i.push(new xi(n,n)),Qi(o,Ei(t,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,T=s,O=va(t,e,r.unit),S=T.anchor;ee(O.anchor,S)>0?(b=O.head,S=oe(T.from(),O.anchor)):(b=O.anchor,S=ie(T.to(),O.head));var x=c.ranges.slice(0);x[l]=function(t,e){var n=e.anchor,r=e.head,i=Kt(t.doc,n.line);if(0==ee(n,r)&&n.sticky==r.sticky)return e;var o=ct(i);if(!o)return e;var a=st(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return e;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=st(o,r.ch,r.sticky),h=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var f=o[c+(l?-1:0)],p=l==(1==f.level),d=p?f.from:f.to,m=p?"after":"before";return n.ch==d&&n.sticky==m?e:new xi(new te(n.line,d,m),r)}(t,new xi(se(o,S),b)),Qi(o,Ei(t,x,l),G)}}var d=i.wrapper.getBoundingClientRect(),m=0;function g(e){t.state.selectingText=!1,m=1/0,e&&(bt(e),i.input.focus()),pt(i.wrapper.ownerDocument,"mousemove",v),pt(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var v=ti(t,(function(e){0!==e.buttons&&Et(e)?function e(n){var a=++m,s=cr(t,n,!0,"rectangle"==r.unit);if(s)if(0!=ee(s,f)){t.curOp.focus=R(),p(s);var l=wr(i,o);(s.line>=l.to||s.lined.bottom?20:0;c&&setTimeout(ti(t,(function(){m==a&&(i.scroller.scrollTop+=c,e(n))})),50)}}(e):g(e)})),y=ti(t,g);t.state.selectingText=y,ht(i.wrapper.ownerDocument,"mousemove",v),ht(i.wrapper.ownerDocument,"mouseup",y)}(t,r,e,o)}(e,r,o,t):xt(t)==n.scroller&&bt(t):2==i?(r&&$i(e.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(x?e.display.input.onContextMenu(t):xr(e)))}}function va(t,e,n){if("char"==n)return new xi(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new xi(te(e.line,0),se(t.doc,te(e.line+1,0)));var r=n(t,e);return new xi(r.from,r.to)}function ya(t,e,n,r){var i,o;if(e.touches)i=e.touches[0].clientX,o=e.touches[0].clientY;else try{i=e.clientX,o=e.clientY}catch(t){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&bt(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!vt(t,n))return Ot(e);o-=s.top-a.viewOffset;for(var l=0;l=i)return dt(t,n,t,Zt(t.doc,o),t.display.gutterSpecs[l].className,e),Ot(e)}}function ba(t,e){return ya(t,e,"gutterClick",!0)}function Ta(t,e){Sn(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&ya(t,e,"gutterContextMenu",!1)}(t,e)||mt(t,e,"contextmenu")||x||t.display.input.onContextMenu(e)}function Oa(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Wn(t)}ma.prototype.compare=function(t,e,n){return this.time+400>t&&0==ee(e,this.pos)&&n==this.button};var Sa={toString:function(){return"CodeMirror.Init"}},xa={},Ea={};function Ca(t,e,n){if(!e!=!(n&&n!=Sa)){var r=t.display.dragFunctions,i=e?ht:pt;i(t.display.scroller,"dragstart",r.start),i(t.display.scroller,"dragenter",r.enter),i(t.display.scroller,"dragover",r.over),i(t.display.scroller,"dragleave",r.leave),i(t.display.scroller,"drop",r.drop)}}function ka(t){t.options.lineWrapping?(M(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(k(t.display.wrapper,"CodeMirror-wrap"),Ve(t)),lr(t),hr(t),Wn(t),setTimeout((function(){return Br(t)}),100)}function Na(t,e){var n=this;if(!(this instanceof Na))return new Na(t,e);this.options=e=e?D(e):{},D(xa,e,!1);var r=e.value;"string"==typeof r?r=new Io(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var i=new Na.inputStyles[e.inputStyle](this),o=this.display=new gi(t,r,i,e);for(var c in o.wrapper.CodeMirror=this,Oa(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),zr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new F,keySeq:null,specialChars:null},e.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",ti(t,ga)),ht(e.scroller,"dblclick",a&&s<11?ti(t,(function(e){if(!mt(t,e)){var n=cr(t,e);if(n&&!ba(t,e)&&!Sn(t.display,e)){bt(e);var r=t.findWordAt(n);$i(t.doc,r.anchor,r.head)}}})):function(e){return mt(t,e)||bt(e)}),ht(e.scroller,"contextmenu",(function(e){return Ta(t,e)})),ht(e.input.getField(),"contextmenu",(function(n){e.scroller.contains(n.target)||Ta(t,n)}));var n,r={end:0};function i(){e.activeTouch&&(n=setTimeout((function(){return e.activeTouch=null}),1e3),(r=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,r=e.top-t.top;return n*n+r*r>400}ht(e.scroller,"touchstart",(function(i){if(!mt(t,i)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(i)&&!ba(t,i)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}})),ht(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ht(e.scroller,"touchend",(function(n){var r=e.activeTouch;if(r&&!Sn(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=t.coordsChar(e.activeTouch,"page");a=!r.prev||o(r,r.prev)?new xi(s,s):!r.prev.prev||o(r,r.prev.prev)?t.findWordAt(s):new xi(te(s.line,0),se(t.doc,te(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),bt(n)}i()})),ht(e.scroller,"touchcancel",i),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Pr(t,e.scroller.scrollTop),Dr(t,e.scroller.scrollLeft,!0),dt(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return Oi(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return Oi(t,e)})),ht(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){mt(t,e)||St(e)},over:function(e){mt(t,e)||(function(t,e){var n=cr(t,e);if(n){var r=document.createDocumentFragment();yr(t,n,r),t.display.dragCursor||(t.display.dragCursor=L("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),w(t.display.dragCursor,r)}}(t,e),St(e))},start:function(e){return function(t,e){if(a&&(!t.state.draggingText||+new Date-Ro<100))St(e);else if(!mt(t,e)&&!Sn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!f)){var n=L("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(t,e)},drop:ti(t,Mo),leave:function(e){mt(t,e)||_o(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return ha.call(t,e)})),ht(l,"keydown",ti(t,ua)),ht(l,"keypress",ti(t,fa)),ht(l,"focus",(function(e){return Er(t,e)})),ht(l,"blur",(function(e){return Cr(t,e)}))}(this),Do(),Kr(this),this.curOp.forceUpdate=!0,Pi(this,r),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Er(n)}),20):Cr(this),Ea)Ea.hasOwnProperty(c)&&Ea[c](this,e[c],Sa);fi(this),e.finishInit&&e.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?U(Kt(o,e-1).text,null,a):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",f=0;if(t.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)f+=a,h+="\t";if(fa,l=It(e),c=null;if(s&&r.ranges.length>1)if(Aa&&Aa.text.join("\n")==e){if(r.ranges.length%Aa.text.length==0){c=[];for(var u=0;u=0;f--){var p=r.ranges[f],d=p.from(),m=p.to();p.empty()&&(n&&n>0?d=te(d.line,d.ch-n):t.state.overwrite&&!s?m=te(m.line,Math.min(Kt(o,m.line).text.length,m.ch+$(l).length)):s&&Aa&&Aa.lineWise&&Aa.text.join("\n")==l.join("\n")&&(d=m=te(d.line,0)));var g={from:d,to:m,text:c?c[f%c.length]:l,origin:i||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};co(t.doc,g),ln(t,"inputRead",t,g)}e&&!s&&_a(t,e),Ir(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Ma(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Qr(e,(function(){return Ra(e,n,0,null,"paste")})),!0}function _a(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=t.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=La(t,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Kt(t.doc,i.head.line).text.slice(0,i.head.ch))&&(a=La(t,i.head.line,"smart"));a&&ln(t,"electricInput",t,i.head.line)}}}function Pa(t){for(var e=[],n=[],r=0;r0?0:-1));if(isNaN(u))a=null;else{var h=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new te(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(h?2:1))),-n)}}else a=i?function(t,e,n,r){var i=ct(e,t.doc.direction);if(!i)return Qo(e,n,r);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=st(i,n.ch,n.sticky),a=i[o];if("ltr"==t.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&f>=u.begin)){var p=h?"before":"after";return new te(n.line,f,p)}}var d=function(t,e,r){for(var o=function(t,e){return e?new te(n.line,l(t,1),"before"):new te(n.line,t,"after")};t>=0&&t0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==e.text.length||!(m=d(r>0?0:i.length-1,r,c(g)))?null:m}(t.cm,s,e,n):Qo(s,e,n);if(null==a){if(o||(c=e.line+l)=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(s=Kt(t,c))))return!1;e=ta(i,t.cm,s,e.line,l)}else e=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,h="group"==r,f=t.cm&&t.cm.getHelper(e,"wordChars"),p=!0;!(n<0)||c(!p);p=!1){var d=s.text.charAt(e.ch)||"\n",m=tt(d,f)?"w":h&&"\n"==d?"n":!h||/\s/.test(d)?null:"p";if(!h||p||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),e.sticky="after");break}if(m&&(u=m),n>0&&!c(!p))break}var g=oo(t,e,o,a,!0);return ne(o,g)&&(g.hitSide=!0),g}function Fa(t,e,n,r){var i,o,a=t.doc,s=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(t.display),3);i=(n>0?e.bottom:e.top)+n*c}else"line"==r&&(i=n>0?e.bottom+3:e.top-3);for(;(o=qn(t,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Wa=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new F,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ba(t,e){var n=In(t,e.line);if(!n||n.hidden)return null;var r=Kt(t.doc,e.line),i=Ln(n,r,e.line),o=ct(r,t.doc.direction),a="left";o&&(a=st(o,e.ch)%2?"right":"left");var s=jn(i.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ha(t,e){return e&&(t.bad=!0),t}function Ga(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return Ha(t.clipPos(te(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var i=0;i=e.display.viewTo||o.line=e.display.viewFrom&&Ba(e,i)||{node:l[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=te(a.line-1,Kt(r.doc,a.line-1).length)),s.ch==Kt(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(t=ur(r,a.line))?(e=qt(i.view[0].line),n=i.view[0].node):(e=qt(i.view[t].line),n=i.view[t-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=qt(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(t,e,n,r,i){var o="",a=!1,s=t.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(t){t&&(c(),o+=t)}function h(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,f=e.getAttribute("cm-marker");if(f){var p=t.findMarks(te(r,0),te(i+1,0),(g=+f,function(t){return t.id==g}));return void(p.length&&(o=p[0].find(0))&&u(Yt(t.doc,o.from,o.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var d=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;d&&c();for(var m=0;m1&&f.length>1;)if($(h)==$(f))h.pop(),f.pop(),l--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),e++}for(var p=0,d=0,m=h[0],g=f[0],v=Math.min(m.length,g.length);pa.ch&&y.charCodeAt(y.length-d-1)==b.charCodeAt(b.length-d-1);)p--,d++;h[h.length-1]=y.slice(0,y.length-d).replace(/^\u200b+/,""),h[0]=h[0].slice(p).replace(/\u200b+$/,"");var O=te(e,p),S=te(l,f.length?$(f).length-d:0);return h.length>1||h[0]||ee(O,S)?(mo(r.doc,h,O,S,"+input"),!0):void 0},Wa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Wa.prototype.reset=function(){this.forceCompositionEnd()},Wa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Wa.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Wa.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return hr(t.cm)}))},Wa.prototype.setUneditable=function(t){t.contentEditable="false"},Wa.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||ti(this.cm,Ra)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Wa.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Wa.prototype.onContextMenu=function(){},Wa.prototype.resetPosition=function(){},Wa.prototype.needsContentAttribute=!0;var Va=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new F,this.hasSelection=!1,this.composing=null};Va.prototype.init=function(t){var e=this,n=this,r=this.cm;this.createField(t);var i=this.textarea;function o(t){if(!mt(r,t)){if(r.somethingSelected())Ia({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Pa(r);Ia({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,H):(n.prevInput="",i.value=e.text.join("\n"),P(i))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),m&&(i.style.width="0px"),ht(i,"input",(function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),ht(i,"paste",(function(t){mt(r,t)||Ma(t,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),ht(i,"cut",o),ht(i,"copy",o),ht(t.scroller,"paste",(function(e){if(!Sn(t,e)&&!mt(r,e)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,i.dispatchEvent(o)}})),ht(t.lineSpace,"selectstart",(function(e){Sn(t,e)||bt(e)})),ht(i,"compositionstart",(function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ht(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Va.prototype.createField=function(t){this.wrapper=Da(),this.textarea=this.wrapper.firstChild},Va.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Va.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=vr(t);if(t.options.moveInputWithCursor){var i=Yn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Va.prototype.showSelection=function(t){var e=this.cm.display;w(e.cursorDiv,t.cursors),w(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Va.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&P(this.textarea),a&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Va.prototype.getField=function(){return this.textarea},Va.prototype.supportsTouch=function(){return!1},Va.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||R()!=this.textarea))try{this.textarea.focus()}catch(t){}},Va.prototype.blur=function(){this.textarea.blur()},Va.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Va.prototype.receivedFocus=function(){this.slowPoll()},Va.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Va.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}))},Va.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||Rt(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==r&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Va.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Va.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Va.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,i=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=cr(n,t),c=r.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ti(n,Qi)(n.doc,Ci(o),H);var u,f=i.style.cssText,p=e.wrapper.style.cssText,d=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-d.top-5)+"px; left: "+(t.clientX-d.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),x){St(t);var m=function(){pt(window,"mouseup",m),setTimeout(v,20)};ht(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var t=n.somethingSelected(),o="​"+(t?i.value:"");i.value="⇚",i.value=o,e.prevInput=t?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=p,i.style.cssText=f,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&g();var t=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==e.prevInput?ti(n,so)(n):t++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Va.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Va.prototype.setUneditable=function(){},Va.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,r,i,o){t.defaults[n]=r,i&&(e[n]=o?function(t,e,n){n!=Sa&&i(t,e,n)}:i)}t.defineOption=n,t.Init=Sa,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,Ai(t)}),!0),n("indentUnit",2,Ai,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){Ii(t),Wn(t),hr(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter((function(t){for(var i=0;;){var o=t.text.indexOf(e,i);if(-1==o)break;i=o+e.length,n.push(te(r,o))}r++}));for(var i=n.length-1;i>=0;i--)mo(t.doc,e,n[i],te(n[i].line,n[i].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Sa&&t.refresh()})),n("specialCharPlaceholder",Je,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!T),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){Oa(t),mi(t)}),!0),n("keyMap","default",(function(t,e,n){var r=qo(e),i=n!=Sa&&qo(n);i&&i.detach&&i.detach(t,r),r.attach&&r.attach(t,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,ka,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=pi(e,t.options.lineNumbers),mi(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?ar(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return Br(t)}),!0),n("scrollbarStyle","native",(function(t){zr(t),Br(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=pi(t.options.gutters,e),mi(t)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(t){return t}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(Cr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,Ca),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ii,!0),n("addModeClass",!1,Ii,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,Ii,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}(Na),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var r=this.options,i=r[t];r[t]==n&&"mode"!=t||(r[t]=n,e.hasOwnProperty(t)&&ti(this,e[t])(this,n,i),dt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](qo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(La(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&Ir(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&qi(this.doc,r,new xi(o,c[r].to()),H)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,te(t),e,!0)},getTokenTypeAt:function(t){t=se(this.doc,t);var e,n=fe(this,Kt(this.doc,t.line)),r=0,i=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(t=o,i=!0),r=Kt(this.doc,t)}else r=t;return zn(this,r,{top:0,left:0},e||"page",n||i).top+(i?this.doc.height-Ge(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,i){var o,a,s,l=this.display,c=(t=Yn(this,se(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==r)c=t.top;else if("above"==r||"near"==r){var h=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>h)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=h&&(c=t.bottom),u+e.offsetWidth>f&&(u=f-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==i?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(s=Lr(o,a)).scrollTop&&Pr(o,s.scrollTop),null!=s.scrollLeft&&Dr(o,s.scrollLeft))},triggerOnKeyDown:ei(ua),triggerOnKeyPress:ei(fa),triggerOnKeyUp:ha,triggerOnMouseDown:ei(ga),execCommand:function(t){if(ea.hasOwnProperty(t))return ea[t].call(null,this)},triggerElectric:ei((function(t){_a(this,t)})),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var o=se(this.doc,t),a=0;a0&&a(e.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&lr(this),dt(this,"refresh",this)})),swapDoc:ei((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Pi(this,t),Wn(this),this.display.input.reset(),Rr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(t),t.registerHelper=function(e,r,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=i},t.registerGlobalHelper=function(e,r,i,o){t.registerHelper(e,r,o),n[e]._global.push({pred:i,val:o})}}(Na);var Ka="iter insert remove copy getEditor constructor".split(" ");for(var Ya in Io.prototype)Io.prototype.hasOwnProperty(Ya)&&W(Ka,Ya)<0&&(Na.prototype[Ya]=function(t){return function(){return t.apply(this.doc,arguments)}}(Io.prototype[Ya]));return yt(Io),Na.inputStyles={textarea:Va,contenteditable:Wa},Na.defineMode=function(t){Na.defaults.mode||"null"==t||(Na.defaults.mode=t),Dt.apply(this,arguments)},Na.defineMIME=function(t,e){jt[t]=e},Na.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Na.defineMIME("text/plain","null"),Na.defineExtension=function(t,e){Na.prototype[t]=e},Na.defineDocExtension=function(t,e){Io.prototype[t]=e},Na.fromTextArea=function(t,e){if((e=e?D(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=R();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=s.getValue()}var i;if(t.form&&(ht(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(n){n.save=r,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,r(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(pt(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var s=Na((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return s},function(t){t.off=pt,t.on=ht,t.wheelEventPixels=Ti,t.Doc=Io,t.splitLines=It,t.countColumn=U,t.findColumn=V,t.isWordChar=Q,t.Pass=B,t.signal=dt,t.Line=Ke,t.changeEnd=ki,t.scrollbarModel=Gr,t.Pos=te,t.cmpPos=ee,t.modes=Pt,t.mimeModes=jt,t.resolveMode=Ut,t.getMode=Ft,t.modeExtensions=Wt,t.extendMode=Bt,t.copyState=Ht,t.startState=zt,t.innerMode=Gt,t.commands=ea,t.keyMap=Go,t.keyName=Xo,t.isModifierKey=Yo,t.lookupKey=Ko,t.normalizeKeyMap=Vo,t.StringStream=Vt,t.SharedTextMarker=No,t.TextMarker=Co,t.LineWidget=So,t.e_preventDefault=bt,t.e_stopPropagation=Tt,t.e_stop=St,t.addClass=M,t.contains=I,t.rmClass=k,t.keyNames=Fo}(Na),Na.version="5.59.1",Na}()},function(t,e,n){"use strict";n.r(e),n.d(e,"VERSION",(function(){return r})),n.d(e,"CstParser",(function(){return en})),n.d(e,"EmbeddedActionsParser",(function(){return nn})),n.d(e,"ParserDefinitionErrorType",(function(){return qe})),n.d(e,"EMPTY_ALT",(function(){return Qe})),n.d(e,"Lexer",(function(){return $})),n.d(e,"LexerDefinitionErrorType",(function(){return V})),n.d(e,"createToken",(function(){return J})),n.d(e,"createTokenInstance",(function(){return tt})),n.d(e,"EOF",(function(){return Q})),n.d(e,"tokenLabel",(function(){return X})),n.d(e,"tokenMatcher",(function(){return et})),n.d(e,"tokenName",(function(){return q})),n.d(e,"defaultGrammarResolverErrorProvider",(function(){return Lt})),n.d(e,"defaultGrammarValidatorErrorProvider",(function(){return At})),n.d(e,"defaultParserErrorProvider",(function(){return wt})),n.d(e,"EarlyExitException",(function(){return ge})),n.d(e,"isRecognitionException",(function(){return fe})),n.d(e,"MismatchedTokenException",(function(){return pe})),n.d(e,"NotAllInputParsedException",(function(){return me})),n.d(e,"NoViableAltException",(function(){return de})),n.d(e,"defaultLexerErrorProvider",(function(){return K})),n.d(e,"Alternation",(function(){return ft})),n.d(e,"Alternative",(function(){return at})),n.d(e,"NonTerminal",(function(){return it})),n.d(e,"Option",(function(){return st})),n.d(e,"Repetition",(function(){return ut})),n.d(e,"RepetitionMandatory",(function(){return lt})),n.d(e,"RepetitionMandatoryWithSeparator",(function(){return ct})),n.d(e,"RepetitionWithSeparator",(function(){return ht})),n.d(e,"Rule",(function(){return ot})),n.d(e,"Terminal",(function(){return pt})),n.d(e,"serializeGrammar",(function(){return dt})),n.d(e,"serializeProduction",(function(){return mt})),n.d(e,"GAstVisitor",(function(){return yt})),n.d(e,"assignOccurrenceIndices",(function(){return ue})),n.d(e,"resolveGrammar",(function(){return le})),n.d(e,"validateGrammar",(function(){return ce})),n.d(e,"clearCache",(function(){return mn})),n.d(e,"createSyntaxDiagramsCode",(function(){return rn})),n.d(e,"generateParserFactory",(function(){return pn})),n.d(e,"generateParserModule",(function(){return dn})),n.d(e,"Parser",(function(){return gn}));var r="7.1.0",i=n(0),o=n(1),a={},s=new o.RegExpParser;function l(t){var e=t.toString();if(a.hasOwnProperty(e))return a[e];var n=s.pattern(e);return a[e]=n,n}var c,u=(c=function(t,e){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h='Unable to use "first char" lexer optimizations:\n';function f(t,e){void 0===e&&(e=!1);try{var n=l(t);return function t(e,n,r){switch(e.type){case"Disjunction":for(var o=0;o=_)for(var o=e.from>=_?e.from:_,a=e.to,s=P(o),l=P(a),c=s;c<=l;c++)n[c]=c}}}));break;case"Group":t(l.value,n,r);break;default:throw Error("Non Exhaustive Match")}var c=void 0!==l.quantifier&&0===l.quantifier.atLeast;if("Group"===l.type&&!1===m(l)||"Group"!==l.type&&!1===c)break}break;default:throw Error("non exhaustive match!")}return Object(i.U)(n)}(n.value,{},n.flags.ignoreCase)}catch(n){if("Complement Sets are not supported for first char optimization"===n.message)e&&Object(i.d)(h+"\tUnable to optimize: < "+t.toString()+" >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var r="";e&&(r="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Object(i.c)(h+"\n\tFailed parsing: < "+t.toString()+" >\n\tUsing the regexp-to-ast library version: "+o.VERSION+"\n\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues"+r)}}return[]}function p(t,e,n){var r=P(t);e[r]=r,!0===n&&function(t,e){var n=String.fromCharCode(t),r=n.toUpperCase();if(r!==n){var i=P(r.charCodeAt(0));e[i]=i}else{var o=n.toLowerCase();if(o!==n){i=P(o.charCodeAt(0));e[i]=i}}}(t,e)}function d(t,e){return Object(i.q)(t.value,(function(t){if("number"==typeof t)return Object(i.j)(e,t);var n=t;return void 0!==Object(i.q)(e,(function(t){return n.from<=t&&t<=n.to}))}))}function m(t){return!(!t.quantifier||0!==t.quantifier.atLeast)||!!t.value&&(Object(i.y)(t.value)?Object(i.o)(t.value,m):m(t.value))}var g=function(t){function e(e){var n=t.call(this)||this;return n.targetCharCodes=e,n.found=!1,n}return u(e,t),e.prototype.visitChildren=function(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e)}t.prototype.visitChildren.call(this,e)}},e.prototype.visitCharacter=function(t){Object(i.j)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?void 0===d(t,this.targetCharCodes)&&(this.found=!0):void 0!==d(t,this.targetCharCodes)&&(this.found=!0)},e}(o.BaseRegExpVisitor);function v(t,e){if(e instanceof RegExp){var n=l(e),r=new g(t);return r.visit(n),r.found}return void 0!==Object(i.q)(e,(function(e){return Object(i.j)(t,e.charCodeAt(0))}))}var y=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b="PATTERN",T="boolean"==typeof new RegExp("(?:)").sticky;function O(t,e){var n,r=(e=Object(i.k)(e,{useSticky:T,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(t,e){return e()}})).tracer;r("initCharCodeToOptimizedIndexMap",(function(){!function(){if(Object(i.A)(j)){j=new Array(65536);for(var t=0;t<65536;t++)j[t]=t>255?255+~~(t/255):t}}()})),r("Reject Lexer.NA",(function(){n=Object(i.P)(t,(function(t){return t[b]===$.NA}))}));var o,a,s,l,c,u,p,d,m,g,y,O=!1;r("Transform Patterns",(function(){O=!1,o=Object(i.I)(n,(function(t){var n=t[b];if(Object(i.D)(n)){var r=n.source;return 1!==r.length||"^"===r||"$"===r||"."===r||n.ignoreCase?2!==r.length||"\\"!==r[0]||Object(i.j)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?e.useSticky?k(n):C(n):r[1]:r}if(Object(i.B)(n))return O=!0,{exec:n};if(Object(i.w)(n,"exec"))return O=!0,n;if("string"==typeof n){if(1===n.length)return n;var o=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),a=new RegExp(o);return e.useSticky?k(a):C(a)}throw Error("non exhaustive match")}))})),r("misc mapping",(function(){a=Object(i.I)(n,(function(t){return t.tokenTypeIdx})),s=Object(i.I)(n,(function(t){var e=t.GROUP;if(e!==$.SKIPPED){if(Object(i.E)(e))return e;if(Object(i.F)(e))return!1;throw Error("non exhaustive match")}})),l=Object(i.I)(n,(function(t){var e=t.LONGER_ALT;if(e)return Object(i.x)(n,e)})),c=Object(i.I)(n,(function(t){return t.PUSH_MODE})),u=Object(i.I)(n,(function(t){return Object(i.w)(t,"POP_MODE")}))})),r("Line Terminator Handling",(function(){var t=R(e.lineTerminatorCharacters);p=Object(i.I)(n,(function(t){return!1})),"onlyOffset"!==e.positionTracking&&(p=Object(i.I)(n,(function(e){return Object(i.w)(e,"LINE_BREAKS")?e.LINE_BREAKS:!1===I(e,t)?v(t,e.PATTERN):void 0})))})),r("Misc Mapping #2",(function(){d=Object(i.I)(n,w),m=Object(i.I)(o,L),g=Object(i.O)(n,(function(t,e){var n=e.GROUP;return Object(i.E)(n)&&n!==$.SKIPPED&&(t[n]=[]),t}),{}),y=Object(i.I)(o,(function(t,e){return{pattern:o[e],longerAlt:l[e],canLineTerminator:p[e],isCustom:d[e],short:m[e],group:s[e],push:c[e],pop:u[e],tokenTypeIdx:a[e],tokenType:n[e]}}))}));var S=!0,x=[];return e.safeMode||r("First Char Optimization",(function(){x=Object(i.O)(n,(function(t,n,r){if("string"==typeof n.PATTERN){var o=P(n.PATTERN.charCodeAt(0));M(t,o,y[r])}else if(Object(i.y)(n.START_CHARS_HINT)){var a;Object(i.u)(n.START_CHARS_HINT,(function(e){var n=P("string"==typeof e?e.charCodeAt(0):e);a!==n&&(a=n,M(t,n,y[r]))}))}else if(Object(i.D)(n.PATTERN))if(n.PATTERN.unicode)S=!1,e.ensureOptimizations&&Object(i.c)(h+"\tUnable to analyze < "+n.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var s=f(n.PATTERN,e.ensureOptimizations);Object(i.A)(s)&&(S=!1),Object(i.u)(s,(function(e){M(t,e,y[r])}))}else e.ensureOptimizations&&Object(i.c)(h+"\tTokenType: <"+n.name+"> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),S=!1;return t}),[])})),r("ArrayPacking",(function(){x=Object(i.L)(x)})),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:x,hasCustom:O,canBeOptimized:S}}function S(t,e){var n=[],r=function(t){var e=Object(i.p)(t,(function(t){return!Object(i.w)(t,b)})),n=Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:V.MISSING_PATTERN,tokenTypes:[t]}})),r=Object(i.l)(t,e);return{errors:n,valid:r}}(t);n=n.concat(r.errors);var a=function(t){var e=Object(i.p)(t,(function(t){var e=t[b];return!(Object(i.D)(e)||Object(i.B)(e)||Object(i.w)(e,"exec")||Object(i.E)(e))})),n=Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:V.INVALID_PATTERN,tokenTypes:[t]}})),r=Object(i.l)(t,e);return{errors:n,valid:r}}(r.valid),s=a.valid;return n=(n=(n=(n=(n=n.concat(a.errors)).concat(function(t){var e=[],n=Object(i.p)(t,(function(t){return Object(i.D)(t[b])}));return e=(e=(e=(e=(e=e.concat(function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.found=!1,e}return y(e,t),e.prototype.visitEndAnchor=function(t){this.found=!0},e}(o.BaseRegExpVisitor),n=Object(i.p)(t,(function(t){var n=t[b];try{var r=l(n),i=new e;return i.visit(r),i.found}catch(t){return x.test(n.source)}}));return Object(i.I)(n,(function(t){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:V.EOI_ANCHOR_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.found=!1,e}return y(e,t),e.prototype.visitStartAnchor=function(t){this.found=!0},e}(o.BaseRegExpVisitor),n=Object(i.p)(t,(function(t){var n=t[b];try{var r=l(n),i=new e;return i.visit(r),i.found}catch(t){return E.test(n.source)}}));return Object(i.I)(n,(function(t){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:V.SOI_ANCHOR_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=Object(i.p)(t,(function(t){var e=t[b];return e instanceof RegExp&&(e.multiline||e.global)}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:V.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=[],n=Object(i.I)(t,(function(n){return Object(i.O)(t,(function(t,r){return n.PATTERN.source!==r.PATTERN.source||Object(i.j)(e,r)||r.PATTERN===$.NA||(e.push(r),t.push(r)),t}),[])}));n=Object(i.i)(n);var r=Object(i.p)(n,(function(t){return t.length>1}));return Object(i.I)(r,(function(t){var e=Object(i.I)(t,(function(t){return t.name}));return{message:"The same RegExp pattern ->"+Object(i.s)(t).PATTERN+"<-has been used in all of the following Token Types: "+e.join(", ")+" <-",type:V.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}}))}(n))).concat(function(t){var e=Object(i.p)(t,(function(t){return t[b].test("")}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:V.EMPTY_MATCH_PATTERN,tokenTypes:[t]}}))}(n))}(s))).concat(function(t){var e=Object(i.p)(t,(function(t){if(!Object(i.w)(t,"GROUP"))return!1;var e=t.GROUP;return e!==$.SKIPPED&&e!==$.NA&&!Object(i.E)(e)}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:V.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}}))}(s))).concat(function(t,e){var n=Object(i.p)(t,(function(t){return void 0!==t.PUSH_MODE&&!Object(i.j)(e,t.PUSH_MODE)}));return Object(i.I)(n,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+t.PUSH_MODE+"<-which does not exist",type:V.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}}))}(s,e))).concat(function(t){var e=[],n=Object(i.O)(t,(function(t,e,n){var r,o=e.PATTERN;return o===$.NA||(Object(i.E)(o)?t.push({str:o,idx:n,tokenType:e}):Object(i.D)(o)&&(r=o,void 0===Object(i.q)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(function(t){return-1!==r.source.indexOf(t)})))&&t.push({str:o.source,idx:n,tokenType:e})),t}),[]);return Object(i.u)(t,(function(t,r){Object(i.u)(n,(function(n){var o=n.str,a=n.idx,s=n.tokenType;if(r"+t.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";e.push({message:l,type:V.UNREACHABLE_PATTERN,tokenTypes:[t,s]})}}))})),e}(s))}var x=/[^\\][\$]/;var E=/[^\\[][\^]|^\^/;function C(t){var e=t.ignoreCase?"i":"";return new RegExp("^(?:"+t.source+")",e)}function k(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function N(t,e,n){var r=[],o=!1,a=Object(i.i)(Object(i.t)(Object(i.J)(t.modes,(function(t){return t})))),s=Object(i.P)(a,(function(t){return t[b]===$.NA})),l=R(n);return e&&Object(i.u)(s,(function(t){var e=I(t,l);if(!1!==e){var n={message:function(t,e){if(e.issue===V.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+t.name+"> Token Type\n\t Root cause: "+e.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===V.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <"+t.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}(t,e),type:e.issue,tokenType:t};r.push(n)}else Object(i.w)(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(o=!0):v(l,t.PATTERN)&&(o=!0)})),e&&!o&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:V.NO_LINE_BREAKS_FLAGS}),r}function w(t){var e=t.PATTERN;if(Object(i.D)(e))return!1;if(Object(i.B)(e))return!0;if(Object(i.w)(e,"exec"))return!0;if(Object(i.E)(e))return!1;throw Error("non exhaustive match")}function L(t){return!(!Object(i.E)(t)||1!==t.length)&&t.charCodeAt(0)}var A={test:function(t){for(var e=t.length,n=this.lastIndex;n0?t.charCodeAt(0):t}))}function M(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}var _=256;function P(t){return t<_?t:j[t]}var j=[];function D(t,e){var n=t.tokenTypeIdx;return n===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[n]}function U(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}var F=1,W={};function B(t){var e=function(t){var e=Object(i.g)(t),n=t,r=!0;for(;r;){n=Object(i.i)(Object(i.t)(Object(i.I)(n,(function(t){return t.CATEGORIES}))));var o=Object(i.l)(n,e);e=e.concat(o),Object(i.A)(o)?r=!1:n=o}return e}(t);!function(t){Object(i.u)(t,(function(t){var e;H(t)||(W[F]=t,t.tokenTypeIdx=F++),G(t)&&!Object(i.y)(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),G(t)||(t.CATEGORIES=[]),e=t,Object(i.w)(e,"categoryMatches")||(t.categoryMatches=[]),function(t){return Object(i.w)(t,"categoryMatchesMap")}(t)||(t.categoryMatchesMap={})}))}(e),function(t){Object(i.u)(t,(function(t){!function t(e,n){Object(i.u)(e,(function(t){n.categoryMatchesMap[t.tokenTypeIdx]=!0})),Object(i.u)(n.CATEGORIES,(function(r){var o=e.concat(n);Object(i.j)(o,r)||t(o,r)}))}([],t)}))}(e),function(t){Object(i.u)(t,(function(t){t.categoryMatches=[],Object(i.u)(t.categoryMatchesMap,(function(e,n){t.categoryMatches.push(W[n].tokenTypeIdx)}))}))}(e),Object(i.u)(e,(function(t){t.isParent=t.categoryMatches.length>0}))}function H(t){return Object(i.w)(t,"tokenTypeIdx")}function G(t){return Object(i.w)(t,"CATEGORIES")}function z(t){return Object(i.w)(t,"tokenTypeIdx")}var V,K={buildUnableToPopLexerModeMessage:function(t){return"Unable to pop Lexer Mode after encountering Token ->"+t.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(t,e,n,r,i){return"unexpected character: ->"+t.charAt(e)+"<- at offset: "+e+", skipped "+n+" characters."}};!function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"}(V||(V={}));var Y={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:K,traceInitPerf:!1,skipValidations:!1};Object.freeze(Y);var $=function(){function t(t,e){var n=this;if(void 0===e&&(e=Y),this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"==typeof e)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Object(i.K)(Y,e);var r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(function(){var r,o=!0;n.TRACE_INIT("Lexer Config handling",(function(){if(n.config.lineTerminatorsPattern===Y.lineTerminatorsPattern)n.config.lineTerminatorsPattern=A;else if(n.config.lineTerminatorCharacters===Y.lineTerminatorCharacters)throw Error("Error: Missing property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(e.safeMode&&e.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');n.trackStartLines=/full|onlyStart/i.test(n.config.positionTracking),n.trackEndLines=/full/i.test(n.config.positionTracking),Object(i.y)(t)?((r={modes:{}}).modes.defaultMode=Object(i.g)(t),r.defaultMode="defaultMode"):(o=!1,r=Object(i.h)(t))})),!1===n.config.skipValidations&&(n.TRACE_INIT("performRuntimeChecks",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(function(t,e,n){var r=[];return Object(i.w)(t,"defaultMode")||r.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:V.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object(i.w)(t,"modes")||r.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:V.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object(i.w)(t,"modes")&&Object(i.w)(t,"defaultMode")&&!Object(i.w)(t.modes,t.defaultMode)&&r.push({message:"A MultiMode Lexer cannot be initialized with a defaultMode: <"+t.defaultMode+">which does not exist\n",type:V.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object(i.w)(t,"modes")&&Object(i.u)(t.modes,(function(t,e){Object(i.u)(t,(function(t,n){Object(i.F)(t)&&r.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+e+"> at index: <"+n+">\n",type:V.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),r}(r,n.trackStartLines,n.config.lineTerminatorCharacters))})),n.TRACE_INIT("performWarningRuntimeChecks",(function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat(N(r,n.trackStartLines,n.config.lineTerminatorCharacters))}))),r.modes=r.modes?r.modes:{},Object(i.u)(r.modes,(function(t,e){r.modes[e]=Object(i.P)(t,(function(t){return Object(i.F)(t)}))}));var s=Object(i.G)(r.modes);if(Object(i.u)(r.modes,(function(t,r){n.TRACE_INIT("Mode: <"+r+"> processing",(function(){var o;(n.modes.push(r),!1===n.config.skipValidations&&n.TRACE_INIT("validatePatterns",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(S(t,s))})),Object(i.A)(n.lexerDefinitionErrors))&&(B(t),n.TRACE_INIT("analyzeTokenTypes",(function(){o=O(t,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:e.positionTracking,ensureOptimizations:e.ensureOptimizations,safeMode:e.safeMode,tracer:n.TRACE_INIT.bind(n)})})),n.patternIdxToConfig[r]=o.patternIdxToConfig,n.charCodeToPatternIdxToConfig[r]=o.charCodeToPatternIdxToConfig,n.emptyGroups=Object(i.K)(n.emptyGroups,o.emptyGroups),n.hasCustom=o.hasCustom||n.hasCustom,n.canModeBeOptimized[r]=o.canBeOptimized)}))})),n.defaultMode=r.defaultMode,!Object(i.A)(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var l=Object(i.I)(n.lexerDefinitionErrors,(function(t){return t.message})).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+l)}Object(i.u)(n.lexerDefinitionWarning,(function(t){Object(i.d)(t.message)})),n.TRACE_INIT("Choosing sub-methods implementations",(function(){if(T?(n.chopInput=i.a,n.match=n.matchWithTest):(n.updateLastIndex=i.b,n.match=n.matchWithExec),o&&(n.handleModes=i.b),!1===n.trackStartLines&&(n.computeNewColumn=i.a),!1===n.trackEndLines&&(n.updateTokenEndLineColumnLocation=i.b),/full/i.test(n.config.positionTracking))n.createTokenInstance=n.createFullToken;else if(/onlyStart/i.test(n.config.positionTracking))n.createTokenInstance=n.createStartOnlyToken;else{if(!/onlyOffset/i.test(n.config.positionTracking))throw Error('Invalid config option: "'+n.config.positionTracking+'"');n.createTokenInstance=n.createOffsetOnlyToken}n.hasCustom?(n.addToken=n.addTokenUsingPush,n.handlePayload=n.handlePayloadWithCustom):(n.addToken=n.addTokenUsingMemberAccess,n.handlePayload=n.handlePayloadNoCustom)})),n.TRACE_INIT("Failed Optimization Warnings",(function(){var t=Object(i.O)(n.canModeBeOptimized,(function(t,e,n){return!1===e&&t.push(n),t}),[]);if(e.ensureOptimizations&&!Object(i.A)(t))throw Error("Lexer Modes: < "+t.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),n.TRACE_INIT("clearRegExpParserCache",(function(){a={}})),n.TRACE_INIT("toFastProperties",(function(){Object(i.S)(n)}))}))}return t.prototype.tokenize=function(t,e){if(void 0===e&&(e=this.defaultMode),!Object(i.A)(this.lexerDefinitionErrors)){var n=Object(i.I)(this.lexerDefinitionErrors,(function(t){return t.message})).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+n)}return this.tokenizeInternal(t,e)},t.prototype.tokenizeInternal=function(t,e){var n,r,o,a,s,l,c,u,h,f,p,d,m,g,v,y,b,T=this,O=t,S=O.length,x=0,E=0,C=this.hasCustom?0:Math.floor(t.length/10),k=new Array(C),N=[],w=this.trackStartLines?1:void 0,L=this.trackStartLines?1:void 0,A=(v=this.emptyGroups,y={},b=Object(i.G)(v),Object(i.u)(b,(function(t){var e=v[t];if(!Object(i.y)(e))throw Error("non exhaustive match");y[t]=[]})),y),I=this.trackStartLines,R=this.config.lineTerminatorsPattern,M=0,_=[],j=[],D=[],U=[];Object.freeze(U);var F=void 0;function W(){return _}function B(t){var e=P(t),n=j[e];return void 0===n?U:n}var H,G=function(t){if(1===D.length&&void 0===t.tokenType.PUSH_MODE){var e=T.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t);N.push({offset:t.startOffset,line:void 0!==t.startLine?t.startLine:void 0,column:void 0!==t.startColumn?t.startColumn:void 0,length:t.image.length,message:e})}else{D.pop();var n=Object(i.H)(D);_=T.patternIdxToConfig[n],j=T.charCodeToPatternIdxToConfig[n],M=_.length;var r=T.canModeBeOptimized[n]&&!1===T.config.safeMode;F=j&&r?B:W}};function z(t){D.push(t),j=this.charCodeToPatternIdxToConfig[t],_=this.patternIdxToConfig[t],M=_.length,M=_.length;var e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;F=j&&e?B:W}for(z.call(this,e);xs.length&&(s=o,l=c,H=X)}break}}if(null!==s){if(u=s.length,void 0!==(h=H.group)&&(f=H.tokenTypeIdx,p=this.createTokenInstance(s,x,f,H.tokenType,w,L,u),this.handlePayload(p,l),!1===h?E=this.addToken(k,E,p):A[h].push(p)),t=this.chopInput(t,u),x+=u,L=this.computeNewColumn(L,u),!0===I&&!0===H.canLineTerminator){var Z=0,J=void 0,Q=void 0;R.lastIndex=0;do{!0===(J=R.test(s))&&(Q=R.lastIndex-1,Z++)}while(!0===J);0!==Z&&(w+=Z,L=u-Q,this.updateTokenEndLineColumnLocation(p,h,Q,Z,w,L,u))}this.handleModes(H,G,z,p)}else{for(var tt=x,et=w,nt=L,rt=!1;!rt&&x");var r=Object(i.R)(e),o=r.time,a=r.value,s=o>10?console.warn:console.log;return this.traceInitIndent time: "+o+"ms"),this.traceInitIndent--,a}return e()},t.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",t.NA=/NOT_APPLICABLE/,t}();function X(t){return Z(t)?t.LABEL:t.name}function q(t){return t.name}function Z(t){return Object(i.E)(t.LABEL)&&""!==t.LABEL}function J(t){return function(t){var e=t.pattern,n={};n.name=t.name,Object(i.F)(e)||(n.PATTERN=e);if(Object(i.w)(t,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";Object(i.w)(t,"categories")&&(n.CATEGORIES=t.categories);B([n]),Object(i.w)(t,"label")&&(n.LABEL=t.label);Object(i.w)(t,"group")&&(n.GROUP=t.group);Object(i.w)(t,"pop_mode")&&(n.POP_MODE=t.pop_mode);Object(i.w)(t,"push_mode")&&(n.PUSH_MODE=t.push_mode);Object(i.w)(t,"longer_alt")&&(n.LONGER_ALT=t.longer_alt);Object(i.w)(t,"line_breaks")&&(n.LINE_BREAKS=t.line_breaks);Object(i.w)(t,"start_chars_hint")&&(n.START_CHARS_HINT=t.start_chars_hint);return n}(t)}var Q=J({name:"EOF",pattern:$.NA});function tt(t,e,n,r,i,o,a,s){return{image:e,startOffset:n,endOffset:r,startLine:i,endLine:o,startColumn:a,endColumn:s,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function et(t,e){return D(t,e)}B([Q]);var nt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rt=function(){function t(t){this._definition=t}return Object.defineProperty(t.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),t.prototype.accept=function(t){t.visit(this),Object(i.u)(this.definition,(function(e){e.accept(t)}))},t}(),it=function(t){function e(e){var n=t.call(this,[])||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),Object.defineProperty(e.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(rt),ot=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.orgText="",Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),at=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.ignoreAmbiguities=!1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),st=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),lt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ct=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ut=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ht=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ft=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(rt),pt=function(){function t(t){this.idx=1,Object(i.f)(this,Object(i.N)(t,(function(t){return void 0!==t})))}return t.prototype.accept=function(t){t.visit(this)},t}();function dt(t){return Object(i.I)(t,mt)}function mt(t){function e(t){return Object(i.I)(t,mt)}if(t instanceof it)return{type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};if(t instanceof at)return{type:"Alternative",definition:e(t.definition)};if(t instanceof st)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof lt)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof ct)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:mt(new pt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ht)return{type:"RepetitionWithSeparator",idx:t.idx,separator:mt(new pt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ut)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof ft)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof pt){var n={type:"Terminal",name:t.terminalType.name,label:X(t.terminalType),idx:t.idx},r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=Object(i.D)(r)?r.source:r),n}if(t instanceof ot)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var gt=function(){function t(){}return t.prototype.walk=function(t,e){var n=this;void 0===e&&(e=[]),Object(i.u)(t.definition,(function(r,o){var a=Object(i.m)(t.definition,o+1);if(r instanceof it)n.walkProdRef(r,a,e);else if(r instanceof pt)n.walkTerminal(r,a,e);else if(r instanceof at)n.walkFlat(r,a,e);else if(r instanceof st)n.walkOption(r,a,e);else if(r instanceof lt)n.walkAtLeastOne(r,a,e);else if(r instanceof ct)n.walkAtLeastOneSep(r,a,e);else if(r instanceof ht)n.walkManySep(r,a,e);else if(r instanceof ut)n.walkMany(r,a,e);else{if(!(r instanceof ft))throw Error("non exhaustive match");n.walkOr(r,a,e)}}))},t.prototype.walkTerminal=function(t,e,n){},t.prototype.walkProdRef=function(t,e,n){},t.prototype.walkFlat=function(t,e,n){var r=e.concat(n);this.walk(t,r)},t.prototype.walkOption=function(t,e,n){var r=e.concat(n);this.walk(t,r)},t.prototype.walkAtLeastOne=function(t,e,n){var r=[new st({definition:t.definition})].concat(e,n);this.walk(t,r)},t.prototype.walkAtLeastOneSep=function(t,e,n){var r=vt(t,e,n);this.walk(t,r)},t.prototype.walkMany=function(t,e,n){var r=[new st({definition:t.definition})].concat(e,n);this.walk(t,r)},t.prototype.walkManySep=function(t,e,n){var r=vt(t,e,n);this.walk(t,r)},t.prototype.walkOr=function(t,e,n){var r=this,o=e.concat(n);Object(i.u)(t.definition,(function(t){var e=new at({definition:[t]});r.walk(e,o)}))},t}();function vt(t,e,n){return[new st({definition:[new pt({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}var yt=function(){function t(){}return t.prototype.visit=function(t){var e=t;switch(e.constructor){case it:return this.visitNonTerminal(e);case at:return this.visitAlternative(e);case st:return this.visitOption(e);case lt:return this.visitRepetitionMandatory(e);case ct:return this.visitRepetitionMandatoryWithSeparator(e);case ht:return this.visitRepetitionWithSeparator(e);case ut:return this.visitRepetition(e);case ft:return this.visitAlternation(e);case pt:return this.visitTerminal(e);case ot:return this.visitRule(e);default:throw Error("non exhaustive match")}},t.prototype.visitNonTerminal=function(t){},t.prototype.visitAlternative=function(t){},t.prototype.visitOption=function(t){},t.prototype.visitRepetition=function(t){},t.prototype.visitRepetitionMandatory=function(t){},t.prototype.visitRepetitionMandatoryWithSeparator=function(t){},t.prototype.visitRepetitionWithSeparator=function(t){},t.prototype.visitAlternation=function(t){},t.prototype.visitTerminal=function(t){},t.prototype.visitRule=function(t){},t}(),bt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Tt(t,e){return void 0===e&&(e=[]),!!(t instanceof st||t instanceof ut||t instanceof ht)||(t instanceof ft?Object(i.Q)(t.definition,(function(t){return Tt(t,e)})):!(t instanceof it&&Object(i.j)(e,t))&&(t instanceof rt&&(t instanceof it&&e.push(t),Object(i.o)(t.definition,(function(t){return Tt(t,e)})))))}function Ot(t){if(t instanceof it)return"SUBRULE";if(t instanceof st)return"OPTION";if(t instanceof ft)return"OR";if(t instanceof lt)return"AT_LEAST_ONE";if(t instanceof ct)return"AT_LEAST_ONE_SEP";if(t instanceof ht)return"MANY_SEP";if(t instanceof ut)return"MANY";if(t instanceof pt)return"CONSUME";throw Error("non exhaustive match")}var St=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.separator="-",e.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},e}return bt(e,t),e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var e=t.terminalType.name+this.separator+"Terminal";Object(i.w)(this.dslMethods,e)||(this.dslMethods[e]=[]),this.dslMethods[e].push(t)},e.prototype.visitNonTerminal=function(t){var e=t.nonTerminalName+this.separator+"Terminal";Object(i.w)(this.dslMethods,e)||(this.dslMethods[e]=[]),this.dslMethods[e].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(yt),xt=new St;function Et(t){if(t instanceof it)return Et(t.referencedRule);if(t instanceof pt)return[t.terminalType];if(function(t){return t instanceof at||t instanceof st||t instanceof ut||t instanceof lt||t instanceof ct||t instanceof ht||t instanceof pt||t instanceof ot}(t))return function(t){var e,n=[],r=t.definition,o=0,a=r.length>o,s=!0;for(;a&&s;)e=r[o],s=Tt(e),n=n.concat(Et(e)),o+=1,a=r.length>o;return Object(i.T)(n)}(t);if(function(t){return t instanceof ft}(t))return function(t){var e=Object(i.I)(t.definition,(function(t){return Et(t)}));return Object(i.T)(Object(i.t)(e))}(t);throw Error("non exhaustive match")}var Ct="_~IN~_",kt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nt=function(t){function e(e){var n=t.call(this)||this;return n.topProd=e,n.follows={},n}return kt(e,t),e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,e,n){},e.prototype.walkProdRef=function(t,e,n){var r,i,o=(r=t.referencedRule,i=t.idx,r.name+i+Ct+this.topProd.name),a=e.concat(n),s=Et(new at({definition:a}));this.follows[o]=s},e}(gt);var wt={buildMismatchTokenMessage:function(t){var e=t.expected,n=t.actual;t.previous,t.ruleName;return"Expecting "+(Z(e)?"--\x3e "+X(e)+" <--":"token of type --\x3e "+e.name+" <--")+" but found --\x3e '"+n.image+"' <--"},buildNotAllInputParsedMessage:function(t){var e=t.firstRedundant;t.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(t){var e=t.expectedPathsPerAlt,n=t.actual,r=(t.previous,t.customUserDescription),o=(t.ruleName,"\nbut found: '"+Object(i.s)(n).image+"'");if(r)return"Expecting: "+r+o;var a=Object(i.O)(e,(function(t,e){return t.concat(e)}),[]),s=Object(i.I)(a,(function(t){return"["+Object(i.I)(t,(function(t){return X(t)})).join(", ")+"]"}));return"Expecting: "+("one of these possible Token sequences:\n"+Object(i.I)(s,(function(t,e){return" "+(e+1)+". "+t})).join("\n"))+o},buildEarlyExitMessage:function(t){var e=t.expectedIterationPaths,n=t.actual,r=t.customUserDescription,o=(t.ruleName,"\nbut found: '"+Object(i.s)(n).image+"'");return r?"Expecting: "+r+o:"Expecting: "+("expecting at least one iteration which starts with one of these possible Token sequences::\n <"+Object(i.I)(e,(function(t){return"["+Object(i.I)(t,(function(t){return X(t)})).join(",")+"]"})).join(" ,")+">")+o}};Object.freeze(wt);var Lt={buildRuleNotFoundError:function(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+"<-\ninside top level rule: ->"+t.name+"<-"}},At={buildDuplicateFoundError:function(t,e){var n,r=t.name,o=Object(i.s)(e),a=o.idx,s=Ot(o),l=(n=o)instanceof pt?n.terminalType.name:n instanceof it?n.nonTerminalName:"",c="->"+s+(a>0?a:"")+"<- "+(l?"with argument: ->"+l+"<-":"")+"\n appears more than once ("+e.length+" times) in the top level rule: ->"+r+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return c=(c=c.replace(/[ \t]+/g," ")).replace(/\s\s+/g,"\n")},buildNamespaceConflictError:function(t){return"Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+t.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter."},buildAlternationPrefixAmbiguityError:function(t){var e=Object(i.I)(t.prefixPath,(function(t){return X(t)})).join(", "),n=0===t.alternation.idx?"":t.alternation.idx;return"Ambiguous alternatives: <"+t.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin inside <"+t.topLevelRule.name+"> Rule,\n<"+e+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details."},buildAlternationAmbiguityError:function(t){var e=Object(i.I)(t.prefixPath,(function(t){return X(t)})).join(", "),n=0===t.alternation.idx?"":t.alternation.idx,r="Ambiguous Alternatives Detected: <"+t.ambiguityIndices.join(" ,")+"> in inside <"+t.topLevelRule.name+"> Rule,\n<"+e+"> may appears as a prefix path in all these alternatives.\n";return r+="See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."},buildEmptyRepetitionError:function(t){var e=Ot(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),"The repetition <"+e+"> within Rule <"+t.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop."},buildTokenNameError:function(t){return"deprecated"},buildEmptyAlternationError:function(t){return"Ambiguous empty alternative: <"+(t.emptyChoiceIdx+1)+"> in inside <"+t.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative."},buildTooManyAlternativesError:function(t){return"An Alternation cannot have more than 256 alternatives:\n inside <"+t.topLevelRule.name+"> Rule.\n has "+(t.alternation.definition.length+1)+" alternatives."},buildLeftRecursionError:function(t){var e=t.topLevelRule.name;return"Left Recursion found in grammar.\nrule: <"+e+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+(e+" --\x3e "+i.I(t.leftRecursionPath,(function(t){return t.name})).concat([e]).join(" --\x3e "))+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."},buildInvalidRuleNameError:function(t){return"deprecated"},buildDuplicateRuleNameError:function(t){return"Duplicate definition, rule: ->"+(t.topLevelRule instanceof ot?t.topLevelRule.name:t.topLevelRule)+"<- is already defined in the grammar: ->"+t.grammarName+"<-"}},It=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();var Rt=function(t){function e(e,n){var r=t.call(this)||this;return r.nameToTopRule=e,r.errMsgProvider=n,r.errors=[],r}return It(e,t),e.prototype.resolveRefs=function(){var t=this;Object(i.u)(Object(i.U)(this.nameToTopRule),(function(e){t.currTopLevel=e,e.accept(t)}))},e.prototype.visitNonTerminal=function(t){var e=this.nameToTopRule[t.nonTerminalName];if(e)t.referencedRule=e;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:qe.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(yt),Mt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_t=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.path=n,r.nextTerminalName="",r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return Mt(e,t),e.prototype.walkTerminal=function(t,e,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var r=e.concat(n),i=new at({definition:r});this.possibleTokTypes=Et(i),this.found=!0}},e}(function(t){function e(e,n){var r=t.call(this)||this;return r.topProd=e,r.path=n,r.possibleTokTypes=[],r.nextProductionName="",r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return Mt(e,t),e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Object(i.g)(this.path.ruleStack).reverse(),this.occurrenceStack=Object(i.g)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(e,n){void 0===n&&(n=[]),this.found||t.prototype.walk.call(this,e,n)},e.prototype.walkProdRef=function(t,e,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var r=e.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,r)}},e.prototype.updateExpectedNext=function(){Object(i.A)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(gt)),Pt=function(t){function e(e,n){var r=t.call(this)||this;return r.topRule=e,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return Mt(e,t),e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(gt),jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkMany=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkMany.call(this,e,n,r)},e}(Pt),Dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkManySep=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkManySep.call(this,e,n,r)},e}(Pt),Ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkAtLeastOne=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkAtLeastOne.call(this,e,n,r)},e}(Pt),Ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkAtLeastOneSep=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkAtLeastOneSep.call(this,e,n,r)},e}(Pt);function Wt(t,e,n){void 0===n&&(n=[]),n=Object(i.g)(n);var r=[],o=0;function a(a){var s=Wt(a.concat(Object(i.m)(t,o+1)),e,n);return r.concat(s)}for(;n.length=0;k--){var N={idx:p,def:g.definition[k].definition.concat(Object(i.m)(f)),ruleStack:d,occurrenceStack:m};u.push(N),u.push("EXIT_ALTERNATIVE")}else if(g instanceof at)u.push({idx:p,def:g.definition.concat(Object(i.m)(f)),ruleStack:d,occurrenceStack:m});else{if(!(g instanceof ot))throw Error("non exhaustive match");u.push(Ht(g,p,d,m))}}}else a&&Object(i.H)(u).idx<=l&&u.pop()}return c}function Ht(t,e,n,r){var o=Object(i.g)(n);o.push(t.name);var a=Object(i.g)(r);return a.push(1),{idx:e,def:t.definition,ruleStack:o,occurrenceStack:a}}var Gt,zt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"}(Gt||(Gt={}));var Vt=function(t){function e(e,n,r){var i=t.call(this)||this;return i.topProd=e,i.targetOccurrence=n,i.targetProdType=r,i}return zt(e,t),e.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},e.prototype.checkIsTarget=function(t,e,n,r){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=n.concat(r),!0)},e.prototype.walkOption=function(e,n,r){this.checkIsTarget(e,Gt.OPTION,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkAtLeastOne=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION_MANDATORY,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkAtLeastOneSep=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkMany=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkManySep=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION_WITH_SEPARATOR,n,r)||t.prototype.walkOption.call(this,e,n,r)},e}(gt),Kt=function(t){function e(e,n,r){var i=t.call(this)||this;return i.targetOccurrence=e,i.targetProdType=n,i.targetRef=r,i.result=[],i}return zt(e,t),e.prototype.checkIsTarget=function(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)},e.prototype.visitOption=function(t){this.checkIsTarget(t,Gt.OPTION)},e.prototype.visitRepetition=function(t){this.checkIsTarget(t,Gt.REPETITION)},e.prototype.visitRepetitionMandatory=function(t){this.checkIsTarget(t,Gt.REPETITION_MANDATORY)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.checkIsTarget(t,Gt.REPETITION_MANDATORY_WITH_SEPARATOR)},e.prototype.visitRepetitionWithSeparator=function(t){this.checkIsTarget(t,Gt.REPETITION_WITH_SEPARATOR)},e.prototype.visitAlternation=function(t){this.checkIsTarget(t,Gt.ALTERNATION)},e}(yt);function Yt(t){for(var e=new Array(t),n=0;n1}));return i.I(i.U(a),(function(n){var r=i.s(n),o=e.buildDuplicateFoundError(t,n),a=Ot(r),s={message:o,type:qe.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:a,occurrence:r.idx},l=ie(r);return l&&(s.parameter=l),s}))}(t,r)})),s=i.I(t,(function(t){return function t(e,n,r,o){void 0===o&&(o=[]);var a=[],s=function t(e){var n=[];if(i.A(e))return n;var r=i.s(e);if(r instanceof it)n.push(r.referencedRule);else if(r instanceof at||r instanceof st||r instanceof lt||r instanceof ct||r instanceof ht||r instanceof ut)n=n.concat(t(r.definition));else if(r instanceof ft)n=i.t(i.I(r.definition,(function(e){return t(e.definition)})));else if(!(r instanceof pt))throw Error("non exhaustive match");var o=Tt(r),a=e.length>1;if(o&&a){var s=i.m(e);return n.concat(t(s))}return n}(n.definition);if(i.A(s))return[];var l=e.name;i.j(s,e)&&a.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:o}),type:qe.LEFT_RECURSION,ruleName:l});var c=i.l(s,o.concat([e])),u=i.I(c,(function(n){var a=i.g(o);return a.push(n),t(e,n,r,a)}));return a.concat(i.t(u))}(t,t,r)})),l=[],c=[],u=[];Object(i.o)(s,i.A)&&(l=Object(i.I)(t,(function(t){return function(t,e){var n=new ae;t.accept(n);var r=n.alternations;return i.O(r,(function(n,r){var o=i.n(r.definition),a=i.I(o,(function(n,o){var a=Bt([n],[],null,1);return i.A(a)?{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:r,emptyChoiceIdx:o}),type:qe.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:r.idx,alternative:o+1}:null}));return n.concat(i.i(a))}),[])}(t,r)})),c=Object(i.I)(t,(function(t){return function(t,e,n){var r=new ae;t.accept(r);var o=r.alternations;return o=Object(i.P)(o,(function(t){return!0===t.ignoreAmbiguities})),i.O(o,(function(r,o){var a=o.idx,s=o.maxLookahead||e,l=Zt(a,t,s,o),c=function(t,e,n,r){var o=[],a=Object(i.O)(t,(function(n,r,a){return!0===e.definition[a].ignoreAmbiguities||Object(i.u)(r,(function(r){var s=[a];Object(i.u)(t,(function(t,n){a!==n&&Qt(t,r)&&!0!==e.definition[n].ignoreAmbiguities&&s.push(n)})),s.length>1&&!Qt(o,r)&&(o.push(r),n.push({alts:s,path:r}))})),n}),[]);return i.I(a,(function(t){var o=Object(i.I)(t.alts,(function(t){return t+1}));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:o,prefixPath:t.path}),type:qe.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:[t.alts]}}))}(l,o,t,n),u=function(t,e,n,r){var o=[],a=Object(i.O)(t,(function(t,e,n){var r=Object(i.I)(e,(function(t){return{idx:n,path:t}}));return t.concat(r)}),[]);return Object(i.u)(a,(function(t){if(!0!==e.definition[t.idx].ignoreAmbiguities){var s=t.idx,l=t.path,c=Object(i.r)(a,(function(t){return!0!==e.definition[t.idx].ignoreAmbiguities&&t.idx255&&n.push({message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:r}),type:qe.TOO_MANY_ALTS,ruleName:t.name,occurrence:r.idx}),n}),[])}(t,r)})),p=Object(i.I)(t,(function(e){return function(t,e,n,r){var o=[];if(Object(i.O)(e,(function(e,n){return n.name===t.name?e+1:e}),0)>1){var a=r.buildDuplicateRuleNameError({topLevelRule:t,grammarName:n});o.push({message:a,type:qe.DUPLICATE_RULE_NAME,ruleName:t.name})}return o}(e,t,o,r)}));return i.t(a.concat(u,s,l,c,h,f,p))}function re(t){return Ot(t)+"_#_"+t.idx+"_#_"+ie(t)}function ie(t){return t instanceof pt?t.terminalType.name:t instanceof it?t.nonTerminalName:""}var oe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allProductions=[],e}return ee(e,t),e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}(yt);var ae=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.alternations=[],e}return ee(e,t),e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}(yt);var se=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allProductions=[],e}return ee(e,t),e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}(yt);function le(t){t=Object(i.k)(t,{errMsgProvider:Lt});var e,n,r,o={};return Object(i.u)(t.rules,(function(t){o[t.name]=t})),e=o,n=t.errMsgProvider,(r=new Rt(e,n)).resolveRefs(),r.errors}function ce(t){return ne((t=Object(i.k)(t,{errMsgProvider:At})).rules,t.maxLookahead,t.tokenTypes,t.errMsgProvider,t.grammarName)}function ue(t){Object(i.u)(t.rules,(function(t){var e=new St;t.accept(e),Object(i.u)(e.dslMethods,(function(t){Object(i.u)(t,(function(t,e){t.idx=e+1}))}))}))}var he=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"];function fe(t){return Object(i.j)(he,t.name)}function pe(t,e,n){this.name="MismatchedTokenException",this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}function de(t,e,n){this.name="NoViableAltException",this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}function me(t,e){this.name="NotAllInputParsedException",this.message=t,this.token=e,this.resyncedTokens=[]}function ge(t,e,n){this.name="EarlyExitException",this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}Object.freeze(he),pe.prototype=Error.prototype,de.prototype=Error.prototype,me.prototype=Error.prototype,ge.prototype=Error.prototype;var ve={};function ye(t){this.name="InRuleRecoveryException",this.message=t}ye.prototype=Error.prototype;var be=function(){function t(){}return t.prototype.initRecoverable=function(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object(i.w)(t,"recoveryEnabled")?t.recoveryEnabled:Ze.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Te)},t.prototype.getTokenToInsert=function(t){var e=tt(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return e.isInsertedInRecovery=!0,e},t.prototype.canTokenTypeBeInsertedInRecovery=function(t){return!0},t.prototype.tryInRepetitionRecovery=function(t,e,n,r){for(var o=this,a=this.findReSyncTokenType(),s=this.exportLexerState(),l=[],c=!1,u=this.LA(1),h=this.LA(1),f=function(){var t=o.LA(0),e=new pe(o.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:u,previous:t,ruleName:o.getCurrRuleFullName()}),u,o.LA(0));e.resyncedTokens=Object(i.n)(l),o.SAVE_ERROR(e)};!c;){if(this.tokenMatcher(h,r))return void f();if(n.call(this))return f(),void t.apply(this,e);this.tokenMatcher(h,a)?c=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,l))}this.importLexerState(s)},t.prototype.shouldInRepetitionRecoveryBeTried=function(t,e,n){return!1!==n&&(void 0!==t&&void 0!==e&&(!this.tokenMatcher(this.LA(1),t)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e)))))},t.prototype.getFollowsForInRuleRecovery=function(t,e){var n=this.getCurrentGrammarPath(t,e);return this.getNextPossibleTokenTypes(n)},t.prototype.tryInRuleRecovery=function(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new ye("sad sad panda")},t.prototype.canPerformInRuleRecovery=function(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)},t.prototype.canRecoverWithSingleTokenInsertion=function(t,e){var n=this;if(!this.canTokenTypeBeInsertedInRecovery(t))return!1;if(Object(i.A)(e))return!1;var r=this.LA(1);return void 0!==Object(i.q)(e,(function(t){return n.tokenMatcher(r,t)}))},t.prototype.canRecoverWithSingleTokenDeletion=function(t){return this.tokenMatcher(this.LA(2),t)},t.prototype.isInCurrentRuleReSyncSet=function(t){var e=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(e);return Object(i.j)(n,t)},t.prototype.findReSyncTokenType=function(){for(var t=this.flattenFollowSet(),e=this.LA(1),n=2;;){var r=e.tokenType;if(Object(i.j)(t,r))return r;e=this.LA(n),n++}},t.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return ve;var t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(n)}},t.prototype.buildFullFollowKeyStack=function(){var t=this,e=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return Object(i.I)(e,(function(r,i){return 0===i?ve:{ruleName:t.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:t.shortRuleNameToFullName(e[i-1])}}))},t.prototype.flattenFollowSet=function(){var t=this,e=Object(i.I)(this.buildFullFollowKeyStack(),(function(e){return t.getFollowSetFromFollowKey(e)}));return Object(i.t)(e)},t.prototype.getFollowSetFromFollowKey=function(t){if(t===ve)return[Q];var e=t.ruleName+t.idxInCallingRule+Ct+t.inRule;return this.resyncFollows[e]},t.prototype.addToResyncTokens=function(t,e){return this.tokenMatcher(t,Q)||e.push(t),e},t.prototype.reSyncTo=function(t){for(var e=[],n=this.LA(1);!1===this.tokenMatcher(n,t);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,e);return Object(i.n)(e)},t.prototype.attemptInRepetitionRecovery=function(t,e,n,r,i,o,a){},t.prototype.getCurrentGrammarPath=function(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Object(i.g)(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}},t.prototype.getHumanReadableRuleStack=function(){var t=this;return Object(i.I)(this.RULE_STACK,(function(e){return t.shortRuleNameToFullName(e)}))},t}();function Te(t,e,n,r,i,o,a){var s=this.getKeyForAutomaticLookahead(r,i),l=this.firstAfterRepMap[s];if(void 0===l){var c=this.getCurrRuleFullName();l=new o(this.getGAstProductions()[c],i).startWalking(),this.firstAfterRepMap[s]=l}var u=l.token,h=l.occurrence,f=l.isEndOfRule;1===this.RULE_STACK.length&&f&&void 0===u&&(u=Q,h=1),this.shouldInRepetitionRecoveryBeTried(u,h,a)&&this.tryInRepetitionRecovery(t,e,n,u)}function Oe(t,e,n){return n|e|t}var Se=function(){function t(){}return t.prototype.initLooksAhead=function(t){this.dynamicTokensEnabled=Object(i.w)(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:Ze.dynamicTokensEnabled,this.maxLookahead=Object(i.w)(t,"maxLookahead")?t.maxLookahead:Ze.maxLookahead,this.lookAheadFuncsCache=Object(i.z)()?new Map:[],Object(i.z)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},t.prototype.preComputeLookaheadFunctions=function(t){var e=this;Object(i.u)(t,(function(t){e.TRACE_INIT(t.name+" Rule Lookahead",(function(){var n=function(t){xt.reset(),t.accept(xt);var e=xt.dslMethods;return xt.reset(),e}(t),r=n.alternation,o=n.repetition,a=n.option,s=n.repetitionMandatory,l=n.repetitionMandatoryWithSeparator,c=n.repetitionWithSeparator;Object(i.u)(r,(function(n){var r=0===n.idx?"":n.idx;e.TRACE_INIT(""+Ot(n)+r,(function(){var r,i,o,a,s,l,c,u=(r=n.idx,i=t,o=n.maxLookahead||e.maxLookahead,a=n.hasPredicates,s=e.dynamicTokensEnabled,l=e.lookAheadBuilderForAlternatives,c=Zt(r,i,o),l(c,a,te(c)?U:D,s)),h=Oe(e.fullRuleNameToShort[t.name],256,n.idx);e.setLaFuncCache(h,u)}))})),Object(i.u)(o,(function(n){e.computeLookaheadFunc(t,n.idx,768,Gt.REPETITION,n.maxLookahead,Ot(n))})),Object(i.u)(a,(function(n){e.computeLookaheadFunc(t,n.idx,512,Gt.OPTION,n.maxLookahead,Ot(n))})),Object(i.u)(s,(function(n){e.computeLookaheadFunc(t,n.idx,1024,Gt.REPETITION_MANDATORY,n.maxLookahead,Ot(n))})),Object(i.u)(l,(function(n){e.computeLookaheadFunc(t,n.idx,1536,Gt.REPETITION_MANDATORY_WITH_SEPARATOR,n.maxLookahead,Ot(n))})),Object(i.u)(c,(function(n){e.computeLookaheadFunc(t,n.idx,1280,Gt.REPETITION_WITH_SEPARATOR,n.maxLookahead,Ot(n))}))}))}))},t.prototype.computeLookaheadFunc=function(t,e,n,r,i,o){var a=this;this.TRACE_INIT(""+o+(0===e?"":e),(function(){var o=function(t,e,n,r,i,o){var a=Jt(t,e,i,n),s=te(a)?U:D;return o(a[0],s,r)}(e,t,i||a.maxLookahead,a.dynamicTokensEnabled,r,a.lookAheadBuilderForOptional),s=Oe(a.fullRuleNameToShort[t.name],n,e);a.setLaFuncCache(s,o)}))},t.prototype.lookAheadBuilderForOptional=function(t,e,n){return function(t,e,n){var r=Object(i.o)(t,(function(t){return 1===t.length})),o=t.length;if(r&&!n){var a=Object(i.t)(t);if(1===a.length&&Object(i.A)(a[0].categoryMatches)){var s=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}var l=Object(i.O)(a,(function(t,e,n){return t[e.tokenTypeIdx]=!0,Object(i.u)(e.categoryMatches,(function(e){t[e]=!0})),t}),[]);return function(){var t=this.LA(1);return!0===l[t.tokenTypeIdx]}}return function(){t:for(var n=0;n on "+ke(t.constructor)+" CST Visitor.",type:Ce.MISSING_METHOD,methodName:e}}));return Object(i.i)(n)}(t,e),r=function(t,e){var n=[];for(var r in t)!Object(i.B)(t[r])||Object(i.j)(Ae,r)||Object(i.j)(e,r)||n.push({msg:"Redundant visitor method: <"+r+"> on "+ke(t.constructor)+" CST Visitor\nThere is no Grammar Rule corresponding to this method's name.\n",type:Ce.REDUNDANT_METHOD,methodName:r});return n}(t,e);return n.concat(r)}(this,e);if(!Object(i.A)(t)){var n=Object(i.I)(t,(function(t){return t.msg}));throw Error("Errors Detected in CST Visitor <"+ke(this.constructor)+">:\n\t"+n.join("\n\n").replace(/\n/g,"\n\t"))}}}).constructor=n,n._RULE_NAMES=e,n}!function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"}(Ce||(Ce={}));var Ae=["constructor","visit","validateVisitor"];var Ie=function(){function t(){}return t.prototype.initTreeBuilder=function(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=Object(i.w)(t,"nodeLocationTracking")?t.nodeLocationTracking:Ze.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ee,this.setNodeLocationFromNode=Ee,this.cstPostRule=i.b,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=xe,this.setNodeLocationFromNode=xe,this.cstPostRule=i.b,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error('Invalid config option: "'+t.nodeLocationTracking+'"');this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=i.b,this.setInitialNodeLocation=i.b}else this.cstInvocationStateUpdate=i.b,this.cstFinallyStateUpdate=i.b,this.cstPostTerminal=i.b,this.cstPostNonTerminal=i.b,this.cstPostRule=i.b},t.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(t){t.location={startOffset:NaN,endOffset:NaN}},t.prototype.setInitialNodeLocationOnlyOffsetRegular=function(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},t.prototype.setInitialNodeLocationFullRecovery=function(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.setInitialNodeLocationFullRegular=function(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.cstInvocationStateUpdate=function(t,e){var n={name:t,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},t.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},t.prototype.cstPostRuleFull=function(t){var e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==!0?(n.endOffset=e.endOffset,n.endLine=e.endLine,n.endColumn=e.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},t.prototype.cstPostRuleOnlyOffset=function(t){var e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==!0?n.endOffset=e.endOffset:n.startOffset=NaN},t.prototype.cstPostTerminal=function(t,e){var n,r,i,o=this.CST_STACK[this.CST_STACK.length-1];r=e,i=t,void 0===(n=o).children[i]?n.children[i]=[r]:n.children[i].push(r),this.setNodeLocationFromToken(o.location,e)},t.prototype.cstPostNonTerminal=function(t,e){var n=this.CST_STACK[this.CST_STACK.length-1];!function(t,e,n){void 0===t.children[e]?t.children[e]=[n]:t.children[e].push(n)}(n,e,t),this.setNodeLocationFromNode(n.location,t.location)},t.prototype.getBaseCstVisitorConstructor=function(){if(Object(i.F)(this.baseCstVisitorConstructor)){var t=Le(this.className,Object(i.G)(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor},t.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(Object(i.F)(this.baseCstVisitorWithDefaultsConstructor)){var t=function(t,e,n){var r=function(){};Ne(r,t+"BaseSemanticsWithDefaults");var o=Object.create(n.prototype);return Object(i.u)(e,(function(t){o[t]=we})),(r.prototype=o).constructor=r,r}(this.className,Object(i.G)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor},t.prototype.getLastExplicitRuleShortName=function(){var t=this.RULE_STACK;return t[t.length-1]},t.prototype.getPreviousExplicitRuleShortName=function(){var t=this.RULE_STACK;return t[t.length-2]},t.prototype.getLastExplicitRuleOccurrenceIndex=function(){var t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]},t}(),Re=function(){function t(){}return t.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(t.prototype,"input",{get:function(){return this.tokVector},set:function(t){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length},enumerable:!1,configurable:!0}),t.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Xe},t.prototype.LA=function(t){var e=this.currIdx+t;return e<0||this.tokVectorLength<=e?Xe:this.tokVector[e]},t.prototype.consumeToken=function(){this.currIdx++},t.prototype.exportLexerState=function(){return this.currIdx},t.prototype.importLexerState=function(t){this.currIdx=t},t.prototype.resetLexerState=function(){this.currIdx=-1},t.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},t.prototype.getLexerPosition=function(){return this.exportLexerState()},t}(),Me=function(){function t(){}return t.prototype.ACTION=function(t){return t.call(this)},t.prototype.consume=function(t,e,n){return this.consumeInternal(e,t,n)},t.prototype.subrule=function(t,e,n){return this.subruleInternal(e,t,n)},t.prototype.option=function(t,e){return this.optionInternal(e,t)},t.prototype.or=function(t,e){return this.orInternal(e,t)},t.prototype.many=function(t,e){return this.manyInternal(t,e)},t.prototype.atLeastOne=function(t,e){return this.atLeastOneInternal(t,e)},t.prototype.CONSUME=function(t,e){return this.consumeInternal(t,0,e)},t.prototype.CONSUME1=function(t,e){return this.consumeInternal(t,1,e)},t.prototype.CONSUME2=function(t,e){return this.consumeInternal(t,2,e)},t.prototype.CONSUME3=function(t,e){return this.consumeInternal(t,3,e)},t.prototype.CONSUME4=function(t,e){return this.consumeInternal(t,4,e)},t.prototype.CONSUME5=function(t,e){return this.consumeInternal(t,5,e)},t.prototype.CONSUME6=function(t,e){return this.consumeInternal(t,6,e)},t.prototype.CONSUME7=function(t,e){return this.consumeInternal(t,7,e)},t.prototype.CONSUME8=function(t,e){return this.consumeInternal(t,8,e)},t.prototype.CONSUME9=function(t,e){return this.consumeInternal(t,9,e)},t.prototype.SUBRULE=function(t,e){return this.subruleInternal(t,0,e)},t.prototype.SUBRULE1=function(t,e){return this.subruleInternal(t,1,e)},t.prototype.SUBRULE2=function(t,e){return this.subruleInternal(t,2,e)},t.prototype.SUBRULE3=function(t,e){return this.subruleInternal(t,3,e)},t.prototype.SUBRULE4=function(t,e){return this.subruleInternal(t,4,e)},t.prototype.SUBRULE5=function(t,e){return this.subruleInternal(t,5,e)},t.prototype.SUBRULE6=function(t,e){return this.subruleInternal(t,6,e)},t.prototype.SUBRULE7=function(t,e){return this.subruleInternal(t,7,e)},t.prototype.SUBRULE8=function(t,e){return this.subruleInternal(t,8,e)},t.prototype.SUBRULE9=function(t,e){return this.subruleInternal(t,9,e)},t.prototype.OPTION=function(t){return this.optionInternal(t,0)},t.prototype.OPTION1=function(t){return this.optionInternal(t,1)},t.prototype.OPTION2=function(t){return this.optionInternal(t,2)},t.prototype.OPTION3=function(t){return this.optionInternal(t,3)},t.prototype.OPTION4=function(t){return this.optionInternal(t,4)},t.prototype.OPTION5=function(t){return this.optionInternal(t,5)},t.prototype.OPTION6=function(t){return this.optionInternal(t,6)},t.prototype.OPTION7=function(t){return this.optionInternal(t,7)},t.prototype.OPTION8=function(t){return this.optionInternal(t,8)},t.prototype.OPTION9=function(t){return this.optionInternal(t,9)},t.prototype.OR=function(t){return this.orInternal(t,0)},t.prototype.OR1=function(t){return this.orInternal(t,1)},t.prototype.OR2=function(t){return this.orInternal(t,2)},t.prototype.OR3=function(t){return this.orInternal(t,3)},t.prototype.OR4=function(t){return this.orInternal(t,4)},t.prototype.OR5=function(t){return this.orInternal(t,5)},t.prototype.OR6=function(t){return this.orInternal(t,6)},t.prototype.OR7=function(t){return this.orInternal(t,7)},t.prototype.OR8=function(t){return this.orInternal(t,8)},t.prototype.OR9=function(t){return this.orInternal(t,9)},t.prototype.MANY=function(t){this.manyInternal(0,t)},t.prototype.MANY1=function(t){this.manyInternal(1,t)},t.prototype.MANY2=function(t){this.manyInternal(2,t)},t.prototype.MANY3=function(t){this.manyInternal(3,t)},t.prototype.MANY4=function(t){this.manyInternal(4,t)},t.prototype.MANY5=function(t){this.manyInternal(5,t)},t.prototype.MANY6=function(t){this.manyInternal(6,t)},t.prototype.MANY7=function(t){this.manyInternal(7,t)},t.prototype.MANY8=function(t){this.manyInternal(8,t)},t.prototype.MANY9=function(t){this.manyInternal(9,t)},t.prototype.MANY_SEP=function(t){this.manySepFirstInternal(0,t)},t.prototype.MANY_SEP1=function(t){this.manySepFirstInternal(1,t)},t.prototype.MANY_SEP2=function(t){this.manySepFirstInternal(2,t)},t.prototype.MANY_SEP3=function(t){this.manySepFirstInternal(3,t)},t.prototype.MANY_SEP4=function(t){this.manySepFirstInternal(4,t)},t.prototype.MANY_SEP5=function(t){this.manySepFirstInternal(5,t)},t.prototype.MANY_SEP6=function(t){this.manySepFirstInternal(6,t)},t.prototype.MANY_SEP7=function(t){this.manySepFirstInternal(7,t)},t.prototype.MANY_SEP8=function(t){this.manySepFirstInternal(8,t)},t.prototype.MANY_SEP9=function(t){this.manySepFirstInternal(9,t)},t.prototype.AT_LEAST_ONE=function(t){this.atLeastOneInternal(0,t)},t.prototype.AT_LEAST_ONE1=function(t){return this.atLeastOneInternal(1,t)},t.prototype.AT_LEAST_ONE2=function(t){this.atLeastOneInternal(2,t)},t.prototype.AT_LEAST_ONE3=function(t){this.atLeastOneInternal(3,t)},t.prototype.AT_LEAST_ONE4=function(t){this.atLeastOneInternal(4,t)},t.prototype.AT_LEAST_ONE5=function(t){this.atLeastOneInternal(5,t)},t.prototype.AT_LEAST_ONE6=function(t){this.atLeastOneInternal(6,t)},t.prototype.AT_LEAST_ONE7=function(t){this.atLeastOneInternal(7,t)},t.prototype.AT_LEAST_ONE8=function(t){this.atLeastOneInternal(8,t)},t.prototype.AT_LEAST_ONE9=function(t){this.atLeastOneInternal(9,t)},t.prototype.AT_LEAST_ONE_SEP=function(t){this.atLeastOneSepFirstInternal(0,t)},t.prototype.AT_LEAST_ONE_SEP1=function(t){this.atLeastOneSepFirstInternal(1,t)},t.prototype.AT_LEAST_ONE_SEP2=function(t){this.atLeastOneSepFirstInternal(2,t)},t.prototype.AT_LEAST_ONE_SEP3=function(t){this.atLeastOneSepFirstInternal(3,t)},t.prototype.AT_LEAST_ONE_SEP4=function(t){this.atLeastOneSepFirstInternal(4,t)},t.prototype.AT_LEAST_ONE_SEP5=function(t){this.atLeastOneSepFirstInternal(5,t)},t.prototype.AT_LEAST_ONE_SEP6=function(t){this.atLeastOneSepFirstInternal(6,t)},t.prototype.AT_LEAST_ONE_SEP7=function(t){this.atLeastOneSepFirstInternal(7,t)},t.prototype.AT_LEAST_ONE_SEP8=function(t){this.atLeastOneSepFirstInternal(8,t)},t.prototype.AT_LEAST_ONE_SEP9=function(t){this.atLeastOneSepFirstInternal(9,t)},t.prototype.RULE=function(t,e,n){if(void 0===n&&(n=Je),Object(i.j)(this.definedRulesNames,t)){var r={message:At.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:qe.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(r)}this.definedRulesNames.push(t);var o=this.defineRule(t,e,n);return this[t]=o,o},t.prototype.OVERRIDE_RULE=function(t,e,n){void 0===n&&(n=Je);var r,o,a,s,l,c=[];c=c.concat((r=t,o=this.definedRulesNames,a=this.className,l=[],i.j(o,r)||(s="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+a+"<-as it is not defined in any of the super grammars ",l.push({message:s,type:qe.INVALID_RULE_OVERRIDE,ruleName:r})),l)),this.definitionErrors.push.apply(this.definitionErrors,c);var u=this.defineRule(t,e,n);return this[t]=u,u},t.prototype.BACKTRACK=function(t,e){return function(){this.isBackTrackingStack.push(1);var n=this.saveRecogState();try{return t.apply(this,e),!0}catch(t){if(fe(t))return!1;throw t}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}},t.prototype.getGAstProductions=function(){return this.gastProductionsCache},t.prototype.getSerializedGastProductions=function(){return dt(Object(i.U)(this.gastProductionsCache))},t}(),_e=function(){function t(){}return t.prototype.initRecognizerEngine=function(t,e){if(this.className=ke(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=U,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Object(i.w)(e,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a property.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(Object(i.y)(t)){if(Object(i.A)(t))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof t[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(Object(i.y)(t))this.tokensMap=Object(i.O)(t,(function(t,e){return t[e.name]=e,t}),{});else if(Object(i.w)(t,"modes")&&Object(i.o)(Object(i.t)(Object(i.U)(t.modes)),z)){var n=Object(i.t)(Object(i.U)(t.modes)),r=Object(i.T)(n);this.tokensMap=Object(i.O)(r,(function(t,e){return t[e.name]=e,t}),{})}else{if(!Object(i.C)(t))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Object(i.h)(t)}this.tokensMap.EOF=Q;var o=Object(i.o)(Object(i.U)(t),(function(t){return Object(i.A)(t.categoryMatches)}));this.tokenMatcher=o?U:D,B(Object(i.U)(this.tokensMap))},t.prototype.defineRule=function(t,e,n){if(this.selfAnalysisDone)throw Error("Grammar rule <"+t+"> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");var r,o=Object(i.w)(n,"resyncEnabled")?n.resyncEnabled:Je.resyncEnabled,a=Object(i.w)(n,"recoveryValueFunc")?n.recoveryValueFunc:Je.recoveryValueFunc,s=this.ruleShortNameIdx<<12;function l(t){try{if(!0===this.outputCst){e.apply(this,t);var n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}return e.apply(this,t)}catch(t){return this.invokeRuleCatch(t,o,a)}finally{this.ruleFinallyStateUpdate()}}this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=t,this.fullRuleNameToShort[t]=s;return(r=function(e,n){return void 0===e&&(e=0),this.ruleInvocationStateUpdate(s,t,e),l.call(this,n)}).ruleName=t,r.originalGrammarAction=e,r},t.prototype.invokeRuleCatch=function(t,e,n){var r=1===this.RULE_STACK.length,i=e&&!this.isBackTracking()&&this.recoveryEnabled;if(fe(t)){var o=t;if(i){var a,s=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(s))return o.resyncedTokens=this.reSyncTo(s),this.outputCst?((a=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,a):n();throw this.outputCst&&((a=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,o.partialCstResult=a),o}if(r)return this.moveToTerminatedState(),n();throw o}throw t},t.prototype.optionInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,n)},t.prototype.optionInternalLogic=function(t,e,n){var r,i,o=this,a=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,void 0!==(i=t.GATE)){var s=a;a=function(){return i.call(o)&&s.call(o)}}}else r=t;if(!0===a.call(this))return r.call(this)},t.prototype.atLeastOneInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,e,n)},t.prototype.atLeastOneInternalLogic=function(t,e,n){var r,i,o=this,a=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,void 0!==(i=e.GATE)){var s=a;a=function(){return i.call(o)&&s.call(o)}}}else r=e;if(!0!==a.call(this))throw this.raiseEarlyExitException(t,Gt.REPETITION_MANDATORY,e.ERR_MSG);for(var l=this.doSingleRepetition(r);!0===a.call(this)&&!0===l;)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,e],a,1024,t,Ut)},t.prototype.atLeastOneSepFirstInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,e,n)},t.prototype.atLeastOneSepFirstInternalLogic=function(t,e,n){var r=this,i=e.DEF,o=e.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(t,Gt.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);i.call(this);for(var a=function(){return r.tokenMatcher(r.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,a,i,Ft],a,1536,t,Ft)},t.prototype.manyInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,n)},t.prototype.manyInternalLogic=function(t,e,n){var r,i,o=this,a=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,void 0!==(i=e.GATE)){var s=a;a=function(){return i.call(o)&&s.call(o)}}}else r=e;for(var l=!0;!0===a.call(this)&&!0===l;)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[t,e],a,768,t,jt,l)},t.prototype.manySepFirstInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,e,n)},t.prototype.manySepFirstInternalLogic=function(t,e,n){var r=this,i=e.DEF,o=e.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){i.call(this);for(var a=function(){return r.tokenMatcher(r.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,a,i,Dt],a,1280,t,Dt)}},t.prototype.repetitionSepSecondInternal=function(t,e,n,r,i){for(;n();)this.CONSUME(e),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,n,r,i],n,1536,t,i)},t.prototype.doSingleRepetition=function(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e},t.prototype.orInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(256,e),r=Object(i.y)(t)?t:t.DEF,o=this.getLaFuncFromCache(n).call(this,r);if(void 0!==o)return r[o].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)},t.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){var t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new me(e,t))}},t.prototype.subruleInternal=function(t,e,n){var r;try{var i=void 0!==n?n.ARGS:void 0;return r=t.call(this,e,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:t.ruleName),r}catch(e){this.subruleInternalError(e,n,t.ruleName)}},t.prototype.subruleInternalError=function(t,e,n){throw fe(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:n),delete t.partialCstResult),t},t.prototype.consumeInternal=function(t,e,n){var r;try{var i=this.LA(1);!0===this.tokenMatcher(i,t)?(this.consumeToken(),r=i):this.consumeInternalError(t,i,n)}catch(n){r=this.consumeInternalRecovery(t,e,n)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:t.name,r),r},t.prototype.consumeInternalError=function(t,e,n){var r,i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new pe(r,e,i))},t.prototype.consumeInternalRecovery=function(t,e,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;var r=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,r)}catch(t){throw"InRuleRecoveryException"===t.name?n:t}},t.prototype.saveRecogState=function(){var t=this.errors,e=Object(i.g)(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}},t.prototype.reloadRecogState=function(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK},t.prototype.ruleInvocationStateUpdate=function(t,e,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e,t)},t.prototype.isBackTracking=function(){return 0!==this.isBackTrackingStack.length},t.prototype.getCurrRuleFullName=function(){var t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]},t.prototype.shortRuleNameToFullName=function(t){return this.shortRuleNameToFull[t]},t.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),Q)},t.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},t}(),Pe=function(){function t(){}return t.prototype.initErrorHandler=function(t){this._errors=[],this.errorMessageProvider=Object(i.w)(t,"errorMessageProvider")?t.errorMessageProvider:Ze.errorMessageProvider},t.prototype.SAVE_ERROR=function(t){if(fe(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Object(i.g)(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(t.prototype,"errors",{get:function(){return Object(i.g)(this._errors)},set:function(t){this._errors=t},enumerable:!1,configurable:!0}),t.prototype.raiseEarlyExitException=function(t,e,n){for(var r=this.getCurrRuleFullName(),i=Jt(t,this.getGAstProductions()[r],e,this.maxLookahead)[0],o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new ge(s,this.LA(1),this.LA(0)))},t.prototype.raiseNoAltException=function(t,e){for(var n=this.getCurrRuleFullName(),r=Zt(t,this.getGAstProductions()[n],this.maxLookahead),i=[],o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));var a=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:a,customUserDescription:e,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new de(s,this.LA(1),a))},t}(),je=function(){function t(){}return t.prototype.initContentAssist=function(){},t.prototype.computeContentAssist=function(t,e){var n=this.gastProductionsCache[t];if(Object(i.F)(n))throw Error("Rule ->"+t+"<- does not exist in this grammar.");return Bt([n],e,this.tokenMatcher,this.maxLookahead)},t.prototype.getNextPossibleTokenTypes=function(t){var e=Object(i.s)(t.ruleStack),n=this.getGAstProductions()[e];return new _t(n,t).startWalking()},t}(),De={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(De);var Ue=Math.pow(2,8)-1,Fe=J({name:"RECORDING_PHASE_TOKEN",pattern:$.NA});B([Fe]);var We=tt(Fe,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(We);var Be={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},He=function(){function t(){}return t.prototype.initGastRecorder=function(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1},t.prototype.enableRecording=function(){var t=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(function(){for(var e=function(e){var n=e>0?e:"";t["CONSUME"+n]=function(t,n){return this.consumeInternalRecord(t,e,n)},t["SUBRULE"+n]=function(t,n){return this.subruleInternalRecord(t,e,n)},t["OPTION"+n]=function(t){return this.optionInternalRecord(t,e)},t["OR"+n]=function(t){return this.orInternalRecord(t,e)},t["MANY"+n]=function(t){this.manyInternalRecord(e,t)},t["MANY_SEP"+n]=function(t){this.manySepFirstInternalRecord(e,t)},t["AT_LEAST_ONE"+n]=function(t){this.atLeastOneInternalRecord(e,t)},t["AT_LEAST_ONE_SEP"+n]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}},n=0;n<10;n++)e(n);t.consume=function(t,e,n){return this.consumeInternalRecord(e,t,n)},t.subrule=function(t,e,n){return this.subruleInternalRecord(e,t,n)},t.option=function(t,e){return this.optionInternalRecord(e,t)},t.or=function(t,e){return this.orInternalRecord(e,t)},t.many=function(t,e){this.manyInternalRecord(t,e)},t.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},t.ACTION=t.ACTION_RECORD,t.BACKTRACK=t.BACKTRACK_RECORD,t.LA=t.LA_RECORD}))},t.prototype.disableRecording=function(){var t=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(function(){for(var e=0;e<10;e++){var n=e>0?e:"";delete t["CONSUME"+n],delete t["SUBRULE"+n],delete t["OPTION"+n],delete t["OR"+n],delete t["MANY"+n],delete t["MANY_SEP"+n],delete t["AT_LEAST_ONE"+n],delete t["AT_LEAST_ONE_SEP"+n]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA}))},t.prototype.ACTION_RECORD=function(t){},t.prototype.BACKTRACK_RECORD=function(t,e){return function(){return!0}},t.prototype.LA_RECORD=function(t){return Xe},t.prototype.topLevelRuleRecord=function(t,e){try{var n=new ot({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),e.call(this),this.recordingProdStack.pop(),n}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(e){throw t}throw t}},t.prototype.optionInternalRecord=function(t,e){return Ge.call(this,st,t,e)},t.prototype.atLeastOneInternalRecord=function(t,e){Ge.call(this,lt,e,t)},t.prototype.atLeastOneSepFirstInternalRecord=function(t,e){Ge.call(this,ct,e,t,!0)},t.prototype.manyInternalRecord=function(t,e){Ge.call(this,ut,e,t)},t.prototype.manySepFirstInternalRecord=function(t,e){Ge.call(this,ht,e,t,!0)},t.prototype.orInternalRecord=function(t,e){return ze.call(this,t,e)},t.prototype.subruleInternalRecord=function(t,e,n){if(Ke(e),!t||!1===Object(i.w)(t,"ruleName")){var r=new Error(" argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(t)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var o=Object(i.M)(this.recordingProdStack),a=t.ruleName,s=new it({idx:e,nonTerminalName:a,referencedRule:void 0});return o.definition.push(s),this.outputCst?Be:De},t.prototype.consumeInternalRecord=function(t,e,n){if(Ke(e),!H(t)){var r=new Error(" argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(t)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var o=Object(i.M)(this.recordingProdStack),a=new pt({idx:e,terminalType:t});return o.definition.push(a),We},t}();function Ge(t,e,n,r){void 0===r&&(r=!1),Ke(n);var o=Object(i.M)(this.recordingProdStack),a=Object(i.B)(e)?e:e.DEF,s=new t({definition:[],idx:n});return r&&(s.separator=e.SEP),Object(i.w)(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),o.definition.push(s),this.recordingProdStack.pop(),De}function ze(t,e){var n=this;Ke(e);var r=Object(i.M)(this.recordingProdStack),o=!1===Object(i.y)(t),a=!1===o?t:t.DEF,s=new ft({definition:[],idx:e,ignoreAmbiguities:o&&!0===t.IGNORE_AMBIGUITIES});Object(i.w)(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD);var l=Object(i.Q)(a,(function(t){return Object(i.B)(t.GATE)}));return s.hasPredicates=l,r.definition.push(s),Object(i.u)(a,(function(t){var e=new at({definition:[]});s.definition.push(e),Object(i.w)(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:Object(i.w)(t,"GATE")&&(e.ignoreAmbiguities=!0),n.recordingProdStack.push(e),t.ALT.call(n),n.recordingProdStack.pop()})),De}function Ve(t){return 0===t?"":""+t}function Ke(t){if(t<0||t>Ue){var e=new Error("Invalid DSL Method idx value: <"+t+">\n\tIdx value must be a none negative value smaller than "+(Ue+1));throw e.KNOWN_RECORDER_ERROR=!0,e}}var Ye=function(){function t(){}return t.prototype.initPerformanceTracer=function(t){if(Object(i.w)(t,"traceInitPerf")){var e=t.traceInitPerf,n="number"==typeof e;this.traceInitMaxIdent=n?e:1/0,this.traceInitPerf=n?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=Ze.traceInitPerf;this.traceInitIndent=-1},t.prototype.TRACE_INIT=function(t,e){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent");var r=Object(i.R)(e),o=r.time,a=r.value,s=o>10?console.warn:console.log;return this.traceInitIndent time: "+o+"ms"),this.traceInitIndent--,a}return e()},t}(),$e=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xe=tt(Q,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Xe);var qe,Ze=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:wt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Je=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function Qe(t){return void 0===t&&(t=void 0),function(){return t}}!function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"}(qe||(qe={}));var tn=function(){function t(t,e){this.definitionErrors=[],this.selfAnalysisDone=!1;if(this.initErrorHandler(e),this.initLexerAdapter(),this.initLooksAhead(e),this.initRecognizerEngine(t,e),this.initRecoverable(e),this.initTreeBuilder(e),this.initContentAssist(),this.initGastRecorder(e),this.initPerformanceTracer(e),Object(i.w)(e,"ignoredIssues"))throw new Error("The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=Object(i.w)(e,"skipValidations")?e.skipValidations:Ze.skipValidations}return t.performSelfAnalysis=function(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")},t.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",(function(){var n;e.selfAnalysisDone=!0;var r=e.className;e.TRACE_INIT("toFastProps",(function(){Object(i.S)(e)})),e.TRACE_INIT("Grammar Recording",(function(){try{e.enableRecording(),Object(i.u)(e.definedRulesNames,(function(t){var n=e[t].originalGrammarAction,r=void 0;e.TRACE_INIT(t+" Rule",(function(){r=e.topLevelRuleRecord(t,n)})),e.gastProductionsCache[t]=r}))}finally{e.disableRecording()}}));var o=[];if(e.TRACE_INIT("Grammar Resolving",(function(){o=le({rules:Object(i.U)(e.gastProductionsCache)}),e.definitionErrors.push.apply(e.definitionErrors,o)})),e.TRACE_INIT("Grammar Validations",(function(){if(Object(i.A)(o)&&!1===e.skipValidations){var t=ce({rules:Object(i.U)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:Object(i.U)(e.tokensMap),errMsgProvider:At,grammarName:r});e.definitionErrors.push.apply(e.definitionErrors,t)}})),Object(i.A)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",(function(){var t,n,r=(t=Object(i.U)(e.gastProductionsCache),n={},Object(i.u)(t,(function(t){var e=new Nt(t).startWalking();Object(i.f)(n,e)})),n);e.resyncFollows=r})),e.TRACE_INIT("ComputeLookaheadFunctions",(function(){e.preComputeLookaheadFunctions(Object(i.U)(e.gastProductionsCache))}))),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Object(i.A)(e.definitionErrors))throw n=Object(i.I)(e.definitionErrors,(function(t){return t.message})),new Error("Parser Definition Errors detected:\n "+n.join("\n-------------------------------\n"))}))},t.DEFER_DEFINITION_ERRORS_HANDLING=!1,t}();Object(i.e)(tn,[be,Se,Ie,Re,_e,Me,Pe,je,He,Ye]);var en=function(t){function e(e,n){void 0===n&&(n=Ze);var r=Object(i.h)(n);return r.outputCst=!0,t.call(this,e,r)||this}return $e(e,t),e}(tn),nn=function(t){function e(e,n){void 0===n&&(n=Ze);var r=Object(i.h)(n);return r.outputCst=!1,t.call(this,e,r)||this}return $e(e,t),e}(tn);function rn(t,e){var n=void 0===e?{}:e,i=n.resourceBase,o=void 0===i?"https://unpkg.com/chevrotain@"+r+"/diagrams/":i,a=n.css;return'\n\x3c!-- This is a generated file --\x3e\n\n\n\n\n'+("\n\n")+("\n \ No newline at end of file + match 0+ any thing

Errors:


Cheat Sheet:

Full documentation available here

Matching

match "hello world" matches "hello world" exactly

match "hello" then optionally " world" matches "hello" or "hello world"

match "hello" or "world" matches "hello" or "world

match a word matches any word

Repetition

match 0+ "hello" matches 0 or more "hello"s

match 3 "hello" matches exactly "hellohellohello"

match 1 to 5 "hello" matches between 1 to 5 "hello"s

repeat 0 or more repeats the intended text 0 or more times (default)

optionally repeat between 3 to 5 optionally repeats the indented text 3 to 5 times

Grouping

create a group called mygroup creates a group called "mygroup"

create an optional group creates an unnamed optional group

Using

using global and case insensitive uses the 'g' and 'i' flags

Misc

// comment is a single line comment

/* comment */ is a multi line comment

\ No newline at end of file diff --git a/docs/tutorial.html b/docs/tutorial.html index f241865..107d5c9 100644 --- a/docs/tutorial.html +++ b/docs/tutorial.html @@ -1,37 +1,27 @@ -Human2Regex Tutorial

Tutorial


0. Preface

Human2Regex (H2R) is a way to spell out a regular expression in an easy to read, easy to modify language. H2R supports multiple languages as well as many (though not all) different regular expression options such as named groups and quantifiers. You may notice multiple keywords specifying the same thing, and that is intended! Just like how in English there are many ways to express yourself, H2R is made to be flexible and easy to understand. With a range, do you prefer "...", "through", or "to"? It's up to you to choose, H2R supports all of those!


1. Your first Match

Every language starts with a "Hello World" program, so let's match the output of those programs. Matching is done using the keyword match followed by what you want to match. match "Hello World" The above statement will generate a regular expression that matches "Hello World", like "/Hello World/". Any invalid characters will automatically be escaped, so you don't need to worry about it. H2R also supports block comments with /**/, or line comments with // or # so you can explain why or what you intend to match.

/* This is a block comment */
+Human2Regex Tutorial

Tutorial


0. Preface

Human2Regex (H2R) is a way to spell out a regular expression in an easy to read, easy to modify language. H2R supports multiple languages as well as many (though not all) different regular expression options such as named groups and quantifiers. You may notice multiple keywords specifying the same thing, and that is intended! Just like how in English there are many ways to express yourself, H2R is made to be flexible and easy to understand. With a range, do you prefer "...", "through", or "to"? It's up to you to choose, H2R supports all of those!


1. Your first Match

Every language starts with a "Hello World" program, so let's match the output of those programs. Matching is done using the keyword match followed by what you want to match. match "Hello World" The above statement will generate a regular expression that matches "Hello World", like "/Hello World/". Any invalid characters will automatically be escaped, so you don't need to worry about it. H2R also supports block comments with /**/, or line comments with // or # so you can explain why or what you intend to match.

/* This is a block comment */
 match "Hello World" // matches the output of "Hello World" programs
-

Now what if we want to match every case variation of "Hello World" like "hello world" or "hELLO wORLD"? H2R supports the or operator which allows you to specify many possible combinations. match "Hello World" or "hello world" or "hELLO wORLD" Or, you can use a using statement to specify that you want it to be case insensitive.


2. Using Specifiers

Using statements appear at the beginning. You may have one or more using statements which each can contain one or more specifiers. For example: using global and case insensitive matching or

-using global
+

Now what if we want to match every case variation of "Hello World" like "hello world" or "hELLO wORLD"? H2R supports the or operator which allows you to specify many possible combinations. match "Hello World" or "hello world" or "hELLO wORLD" Or, you can use a using statement to specify that you want it to be case insensitive.


2. Using Specifiers

Using statements appear at the beginning. You may have one or more using statements which each can contain one or more specifiers. For example: using global and case insensitive matching or

using global
 using case insensitive
 

The matching keyword is optional. The flags which are available are:

SpecifierDescriptionRegex flag
multilineMatches can cross line breaks/<your regex>/m
globalMultiple matches are allowed/<your regex>/g
case sensitiveMatch must be exact casenone
case insensitiveMatch may be any case/<your regex>/i
exactAn exact statement matches a whole line exactly, nothing before, nothing after/^<your regex>$/

To match any variation of hello world, we would then do the following:

using case insensitive matching
 match "hello world"
-

3. Matching multiple items

H2R comes with 2 options to match multiple items in a row. The first is to simply write multiple separate match statements like:

-match "hello"
+

3. Matching multiple items

H2R comes with 2 options to match multiple items in a row. The first is to simply write multiple separate match statements like:

match "hello"
 match " "
 match "world"
-

However, you can also use a comma, and, or then for a more concise match. match "hello", " ", "world" or match "hello" and " " and "world" or match "hello" then " " then "world" or any combination like match "hello", " " and then "world"

4. Optionality

Sometimes you wish to match something that may or may not exist. In H2R, this is done via the optional, optionally, possibly or maybe keyword. optionally match "hello world" will match 0 or 1 "hello world"'s. This can be used alongside matching multiple statements in a single match statement. match "hello", maybe " ", "world" will match "hello", an optional space if it exists, and "world". However, the start optional is for the entire match statement. Thus, possibly match "hello", " ", then "world" will actually make the whole "hello world" an optional match rather than just the first "hello". If you want to make the first match optional but keep the rest required, place the optional immediately after the match.


5. Negation

You can negate a match with the operator not match not "hello world" or match anything but "hello world" will match everything except for "hello world".


6. Other matching specifiers

Many times you don't know exactly what you wish to match. H2R comes with many specifiers that you can use for your matching. For example, you may wish to match any word. You can do that with: match a word The a or an is optional. The possible specifiers that H2R supports are the following:

SpecifierDescriptionRegex alternativeNote
anythingMatches any character. 
word(s)Matches many a-z, A-Z, _, or digit characters\w+For a-z only, use letter(s)
letter(s)Matches any letter character[a-zA-Z] 
number(s)Matches a string of digit characters\d+ 
digit(s)Matches any digit character\d 
integer(s)Matches an integer[+-]?\d+ 
decimal(s)Matches digits, an optional decimal point and more digits[+-]?((\d+[,.]?\d*)|([,.]\d+))Supports both "," and "." decimal points
character(s)Matches a-z, A-Z, _, or digits\wFor a-z only, use letter(s)
whitespace(s)Matches any whitespace character\s 
(word )boundaryBoundary between a word\b 
line feed/newlineMatches a newline\n 
carriage returnMatches a carriage return\r 

You can also create ranges of characters to match. Say for example, you wanted to match any characters between a and z, you could write any of the following: match from "a" to "z" // "from" is optional or match between "a" and "z" // "between" is optional or match "a" ... "z" // can use "..." or ".." or match "a" - "z" or match "a" through "z" // can also use thru

7. Repetition

H2R supports 2 types of repetition: single match repetition, or grouped repetition. When using match you can specify the number of captures you want just before the text to capture. match 2 digits or match exactly 2 digits will match any 2 digits in a row. You can also specify a range you wish to capture match 2 ... 5 digits or match 2 to 5 digits or match between 2 to 5 digits will match 2, 3, 4, or 5 digits. You can specify if the final number is exclusive with the exclusive or inclusive keywords. match 2 to 5 exclusive digits will only match up to 4 digits. You can also choose to leave the end unspecified. match 2+ digits or match 2 or more digits will match 2 or more digits. Repeition can be chained with the and then keywords or the optional keyword. For example: match 1+ digits then optionally "." then optionally 0...8 digits Suppose you want to repeat a group of these match statements. You can group a repetition using the repeat keyword. Everything underneath that is tabbed (scoped) will be repeated. By default, this will match 0 or more of the following statements.

-repeat
+

However, you can also use a comma, and, or then for a more concise match. match "hello", " ", "world" or match "hello" and " " and "world" or match "hello" then " " then "world" or any combination like match "hello", " " and then "world"

4. Optionality

Sometimes you wish to match something that may or may not exist. In H2R, this is done via the optional, optionally, possibly or maybe keyword. optionally match "hello world" will match 0 or 1 "hello world"'s. This can be used alongside matching multiple statements in a single match statement. match "hello", maybe " ", "world" will match "hello", an optional space if it exists, and "world". However, the start optional is for the entire match statement. Thus, possibly match "hello", " ", then "world" will actually make the whole "hello world" an optional match rather than just the first "hello". If you want to make the first match optional but keep the rest required, place the optional immediately after the match.


5. Negation

You can negate a match with the operator not match not "hello world" or match anything but "hello world" will match everything except for "hello world".


6. Other matching specifiers

Many times you don't know exactly what you wish to match. H2R comes with many specifiers that you can use for your matching. For example, you may wish to match any word. You can do that with: match a word The a or an is optional. The possible specifiers that H2R supports are the following:

SpecifierDescriptionRegex alternativeNote
anythingMatches any character. 
word(s)Matches many a-z, A-Z, _, or digit characters\w+For a-z only, use letter(s)
letter(s)Matches any letter character[a-zA-Z] 
number(s)Matches a string of digit characters\d+ 
digit(s)Matches any digit character\d 
integer(s)Matches an integer[+-]?\d+ 
decimal(s)Matches digits, an optional decimal point and more digits[+-]?((\d+[,.]?\d*)|([,.]\d+))Supports both "," and "." decimal points
character(s)Matches a-z, A-Z, _, or digits\wFor a-z only, use letter(s)
whitespace(s)Matches any whitespace character\s 
(word )boundaryBoundary between a word\b 
line feed/newlineMatches a newline\n 
carriage returnMatches a carriage return\r 

You can also create ranges of characters to match. Say for example, you wanted to match any characters between a and z, you could write any of the following: match from "a" to "z" // "from" is optional or match between "a" and "z" // "between" is optional or match "a" ... "z" // can use "..." or ".." or match "a" - "z" or match "a" through "z" // can also use thru

7. Repetition

H2R supports 2 types of repetition: single match repetition, or grouped repetition. When using match you can specify the number of captures you want just before the text to capture. match 2 digits or match exactly 2 digits will match any 2 digits in a row. You can also specify a range you wish to capture match 2 ... 5 digits or match 2 to 5 digits or match between 2 to 5 digits will match 2, 3, 4, or 5 digits. You can specify if the final number is exclusive with the exclusive or inclusive keywords. match 2 to 5 exclusive digits will only match up to 4 digits. You can also choose to leave the end unspecified. match 2+ digits or match 2 or more digits will match 2 or more digits. Repeition can be chained with the and then keywords or the optional keyword. For example: match 1+ digits then optionally "." then optionally 0...8 digits Suppose you want to repeat a group of these match statements. You can group a repetition using the repeat keyword. Everything underneath that is tabbed (scoped) will be repeated. By default, this will match 0 or more of the following statements.

repeat
 	match "Hello "
 match "World"
-

Will match 0 or more "Hello "s, but only 1 "World". The same qualifiers that exist for match statements also exist for repeat statements.

-optionally repeat 3...7 times
+

Will match 0 or more "Hello "s, but only 1 "World". The same qualifiers that exist for match statements also exist for repeat statements.

optionally repeat 3...7 times
 	match "Hello World"
-

Will potentially match "Hello World" between 3 and 7 times. H2R also supports the following for numbers: One, Two, Three, Four, Five, Six, Seven, Eight, Nine, and Ten


8. Grouping

Just like regular expressions, capture groups are supported in H2R. Each group is defined using the create a group keyphrase.

-create a group
+

Will potentially match "Hello World" between 3 and 7 times. H2R also supports the following for numbers: One, Two, Three, Four, Five, Six, Seven, Eight, Nine, and Ten


8. Grouping

Just like regular expressions, capture groups are supported in H2R. Each group is defined using the create a group keyphrase.

create a group
 	match "Hello World"
-

This will create a non-named captured group, equivalent to the regular expression "/(Hello World)/". A non-named captured group will show up in your chosen language's matches, however will not be given a name. To access this match, you will need to know the index of the group. Most regular expression engines support named capture groups, and H2R highly recommends using this feature. If you wish to do so, simply give it a name:

-create a group called TestGroup
+

This will create a non-named captured group, equivalent to the regular expression "/(Hello World)/". A non-named captured group will show up in your chosen language's matches, however will not be given a name. To access this match, you will need to know the index of the group. Most regular expression engines support named capture groups, and H2R highly recommends using this feature. If you wish to do so, simply give it a name:

create a group called TestGroup
 	match "Hello World"
-

In most languages, a named group can be accessed through the match result's group list. Take for example, in JavaScript,

-"hello".match(/(?<TestGroup>hello)/).groups
-

Will return an object with {TestGroup: "hello"}. For another example, check out MDN web docs. Groups can also be optional.

-create an optional group
+

In most languages, a named group can be accessed through the match result's group list. Take for example, in JavaScript,

"hello".match(/(?<TestGroup>hello)/).groups
+

Will return an object with {TestGroup: "hello"}. For another example, check out MDN web docs. Groups can also be optional.

create an optional group
 	match "Hello World"
-

And groups may be nested

-create a group called TestGroup
+

And groups may be nested

create a group called TestGroup
 	match "Hello"
 	create a group called InnerGroup
 		match "World"
-

The regular expression returned by this will be "/(?<TestGroup>Hello(?<InnerGroup>World))/". Again, in JavaScript, the following

-"HelloWorld".match(/(?<TestGroup>Hello(?<InnerGroup>World))/).groups
-

Will return an object with {TestGroup: "HelloWorld", InnerGroup: "World"}.


Putting it all together

Grouping, repetition, and matching are the 3 primary elements that make up H2R. They can be combined in any way to generate a regular expression. See the main page for an example that combines all above to parse a URL.

Advanced features

Backreferences

TODO

If statements

TODO

Unicode character properties

You can match specific unicode sequences using "\uXXXX" or "\UXXXXXXXX" where X is a hexadecimal character. match "\u0669" // matches arabic digit 9 "٩" Unicode character classes/scripts can be matched using the unicode keyword. match unicode "Latin" // matches any latin character match unicode "N" // matches any number character The following Unicode class specifiers are available:

ClassDescription
COther
CcControl
CfFormat
CnUnassigned
CoPrivate use
CsSurrogate
LLetter
LlLower case letter
LmModifier letter
LoOther letter
LtTitle case letter
LuUpper case letter
MMark
McSpacing mark
MeEnclosing mark
MnNon-spacing mark
NNumber
NdDecimal number
NlLetter number
NoOther number
PPunctuation
PcConnector punctuation
PdDash punctuation
PeClose punctuation
PfFinal punctuation
PiInitial punctuation
PoOther punctuation
PsOpen punctuation
SSymbol
ScCurrency symbol
SkModifier symbol
SmMathematical symbol
SoOther symbol
ZSeparator
ZlLine separator
ZpParagraph separator
ZsSpace separator

The following Unicode script specifiers are available:

Note: Java and .NET require "Is" in front of the script name. For example, "IsLatin" rather than just "Latin"

ArabicArmenianAvestanBalineseBamum
BatakBengaliBopomofoBrahmiBraille
BugineseBuhidCanadian_AboriginalCarianChakma
ChamCherokeeCommonCopticCuneiform
CypriotCyrillicDeseretDevanagariEgyptian_Hieroglyphs
EthiopicGeorgianGlagoliticGothicGreek
GujaratiGurmukhiHanHangulHanunoo
HebrewHiraganaImperial_AramaicInheritedInscriptional_Pahlavi
Inscriptional_ParthianJavaneseKaithiKannadaKatakana
Kayah_LiKharoshthiKhmerLaoLatin
LepchaLimbuLinear_BLisuLycian
LydianMalayalamMandaicMeetei_MayekMeroitic_Cursive
Meroitic_HieroglyphsMiaoMongolianMyanmarNew_Tai_Lue
NkoOghamOld_ItalicOld_PersianOld_South_Arabian
Old_TurkicOl_ChikiOriyaOsmanyaPhags_Pa
PhoenicianRejangRunicSamaritanSaurashtra
SharadaShavianSinhalaSora_SompengSundanese
Syloti_NagriSyriacTagalogTagbanwaTai_Le
Tai_ThamTai_VietTakriTamilTelugu
ThaanaThaiTibetanTifinaghUgaritic
VaiYi   
\ No newline at end of file +

The regular expression returned by this will be "/(?<TestGroup>Hello(?<InnerGroup>World))/". Again, in JavaScript, the following

"HelloWorld".match(/(?<TestGroup>Hello(?<InnerGroup>World))/).groups
+

Will return an object with {TestGroup: "HelloWorld", InnerGroup: "World"}.


Putting it all together

Grouping, repetition, and matching are the 3 primary elements that make up H2R. They can be combined in any way to generate a regular expression. See the main page for an example that combines all above to parse a URL.

Advanced features

Backreferences

TODO

If statements

TODO

Unicode character properties

You can match specific unicode sequences using "\uXXXX" or "\UXXXXXXXX" where X is a hexadecimal character. match "\u0669" // matches arabic digit 9 "٩" Unicode character classes/scripts can be matched using the unicode keyword. match unicode "Latin" // matches any latin character match unicode "N" // matches any number character The following Unicode class specifiers are available:

ClassDescription
COther
CcControl
CfFormat
CnUnassigned
CoPrivate use
CsSurrogate
LLetter
LlLower case letter
LmModifier letter
LoOther letter
LtTitle case letter
LuUpper case letter
MMark
McSpacing mark
MeEnclosing mark
MnNon-spacing mark
NNumber
NdDecimal number
NlLetter number
NoOther number
PPunctuation
PcConnector punctuation
PdDash punctuation
PeClose punctuation
PfFinal punctuation
PiInitial punctuation
PoOther punctuation
PsOpen punctuation
SSymbol
ScCurrency symbol
SkModifier symbol
SmMathematical symbol
SoOther symbol
ZSeparator
ZlLine separator
ZpParagraph separator
ZsSpace separator

The following Unicode script specifiers are available:

Note: Java and .NET require "Is" in front of the script name. For example, "IsLatin" rather than just "Latin"

ArabicArmenianAvestanBalineseBamum
BatakBengaliBopomofoBrahmiBraille
BugineseBuhidCanadian_AboriginalCarianChakma
ChamCherokeeCommonCopticCuneiform
CypriotCyrillicDeseretDevanagariEgyptian_Hieroglyphs
EthiopicGeorgianGlagoliticGothicGreek
GujaratiGurmukhiHanHangulHanunoo
HebrewHiraganaImperial_AramaicInheritedInscriptional_Pahlavi
Inscriptional_ParthianJavaneseKaithiKannadaKatakana
Kayah_LiKharoshthiKhmerLaoLatin
LepchaLimbuLinear_BLisuLycian
LydianMalayalamMandaicMeetei_MayekMeroitic_Cursive
Meroitic_HieroglyphsMiaoMongolianMyanmarNew_Tai_Lue
NkoOghamOld_ItalicOld_PersianOld_South_Arabian
Old_TurkicOl_ChikiOriyaOsmanyaPhags_Pa
PhoenicianRejangRunicSamaritanSaurashtra
SharadaShavianSinhalaSora_SompengSundanese
Syloti_NagriSyriacTagalogTagbanwaTai_Le
Tai_ThamTai_VietTakriTamilTelugu
ThaanaThaiTibetanTifinaghUgaritic
VaiYi   
\ No newline at end of file diff --git a/lib/generator.d.ts b/lib/generator.d.ts index cde37da..4d3f960 100644 --- a/lib/generator.d.ts +++ b/lib/generator.d.ts @@ -1,4 +1,4 @@ -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ import { IToken } from "chevrotain"; /** * List of regular expression dialects we support diff --git a/lib/generator.js b/lib/generator.js index 65631f3..9e62f87 100644 --- a/lib/generator.js +++ b/lib/generator.js @@ -1,5 +1,5 @@ "use strict"; -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ Object.defineProperty(exports, "__esModule", { value: true }); exports.RegularExpressionCST = exports.IfIdentStatementCST = exports.IfPatternStatementCST = exports.BackrefStatementCST = exports.GroupStatementCST = exports.RepeatStatementCST = exports.MatchStatementCST = exports.CountSubStatementCST = exports.UsingStatementCST = exports.MatchSubStatementCST = exports.StatementCST = exports.MatchStatementValue = exports.MatchSubStatementValue = exports.MatchSubStatementType = exports.UsingFlags = exports.H2RCST = exports.GeneratorContext = exports.RegexDialect = void 0; /** diff --git a/lib/generator_helper.d.ts b/lib/generator_helper.d.ts index 87a0fc1..932e856 100644 --- a/lib/generator_helper.d.ts +++ b/lib/generator_helper.d.ts @@ -1,4 +1,4 @@ -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ /** * Minimizes the match string by finding duplicates or substrings in the array * diff --git a/lib/generator_helper.js b/lib/generator_helper.js index ed27221..f2d2599 100644 --- a/lib/generator_helper.js +++ b/lib/generator_helper.js @@ -1,5 +1,5 @@ "use strict"; -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ Object.defineProperty(exports, "__esModule", { value: true }); exports.dontClobberRepetition = exports.groupIfRequired = exports.minimizeMatchString = void 0; /** diff --git a/lib/index.d.ts b/lib/index.d.ts index a123d23..b518e1d 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,4 +1,4 @@ -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ /** * Includes all packages * @packageDocumentation diff --git a/lib/index.js b/lib/index.js index 2bed52b..9f4d527 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,5 +1,5 @@ "use strict"; -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ Object.defineProperty(exports, "__esModule", { value: true }); exports.RegexDialect = exports.ParseResult = exports.Human2RegexParser = exports.Human2RegexParserOptions = exports.TokenizeResult = exports.IndentType = exports.Human2RegexLexer = exports.Human2RegexLexerOptions = exports.CommonError = void 0; /** diff --git a/lib/lexer.d.ts b/lib/lexer.d.ts index cd38871..4fd7f10 100644 --- a/lib/lexer.d.ts +++ b/lib/lexer.d.ts @@ -1,4 +1,4 @@ -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ /** * The Lexer for Human2Regex * @packageDocumentation diff --git a/lib/lexer.js b/lib/lexer.js index 8e6b607..c56209a 100644 --- a/lib/lexer.js +++ b/lib/lexer.js @@ -1,5 +1,5 @@ "use strict"; -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Human2RegexLexer = exports.TokenizeResult = exports.Human2RegexLexerOptions = exports.IndentType = void 0; /** diff --git a/lib/parser.d.ts b/lib/parser.d.ts index b5342b8..958ca66 100644 --- a/lib/parser.d.ts +++ b/lib/parser.d.ts @@ -1,4 +1,4 @@ -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ /** * The parser for Human2Regex * @packageDocumentation diff --git a/lib/parser.js b/lib/parser.js index 07ee4cc..a53f708 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -1,5 +1,5 @@ "use strict"; -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); diff --git a/lib/tokens.d.ts b/lib/tokens.d.ts index 16fbf8f..e9eb000 100644 --- a/lib/tokens.d.ts +++ b/lib/tokens.d.ts @@ -1,4 +1,4 @@ -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ /** @internal */ export declare const Zero: import("chevrotain").TokenType; /** @internal */ export declare const One: import("chevrotain").TokenType; /** @internal */ export declare const Two: import("chevrotain").TokenType; diff --git a/lib/tokens.js b/lib/tokens.js index 6d6bc85..09230a4 100644 --- a/lib/tokens.js +++ b/lib/tokens.js @@ -1,5 +1,5 @@ "use strict"; -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CaseInsensitive = exports.CarriageReturn = exports.Newline = exports.Repeat = exports.Called = exports.Create = exports.To = exports.From = exports.Exclusive = exports.Inclusive = exports.Exactly = exports.Times = exports.A = exports.Group = exports.Linefeed = exports.Tab = exports.Between = exports.Not = exports.Matching = exports.Exact = exports.Multiline = exports.Global = exports.Using = exports.Unicode = exports.Number = exports.Boundary = exports.Whitespace = exports.Integer = exports.Decimal = exports.Letter = exports.Character = exports.Digit = exports.Word = exports.And = exports.Or = exports.Anything = exports.Then = exports.Match = exports.Optional = exports.Ten = exports.Nine = exports.Eight = exports.Seven = exports.Six = exports.Five = exports.Four = exports.Three = exports.Two = exports.One = exports.Zero = void 0; exports.AllTokens = exports.Outdent = exports.Indent = exports.StringLiteral = exports.NumberLiteral = exports.Identifier = exports.MultilineComment = exports.SingleLineComment = exports.WS = exports.EndOfLine = exports.Else = exports.If = exports.The = exports.Call = exports.OrMore = exports.CaseSensitive = void 0; diff --git a/lib/utilities.d.ts b/lib/utilities.d.ts index b629e26..9d19b02 100644 --- a/lib/utilities.d.ts +++ b/lib/utilities.d.ts @@ -1,4 +1,4 @@ -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ /** * Some utility functions for Human2Regex * @packageDocumentation diff --git a/lib/utilities.js b/lib/utilities.js index 2504f30..6d8ea4b 100644 --- a/lib/utilities.js +++ b/lib/utilities.js @@ -1,5 +1,5 @@ "use strict"; -/*! Copyright (c) 2020 Patrick Demian; Licensed under MIT */ +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CommonError = exports.append = exports.regexEscape = exports.removeQuotes = exports.findLastIndex = exports.last = exports.first = exports.isSingleRegexCharacter = exports.combineFlags = exports.hasFlag = exports.makeFlag = exports.usefulConditional = exports.unusedParameter = void 0; /** diff --git a/package-lock.json b/package-lock.json index c454024..8868698 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,34 +5,33 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, "requires": { "@babel/highlight": "^7.10.4" } }, "@babel/core": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", - "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", + "version": "7.12.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.10.tgz", + "integrity": "sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", + "@babel/generator": "^7.12.10", "@babel/helper-module-transforms": "^7.12.1", - "@babel/helpers": "^7.12.1", - "@babel/parser": "^7.12.3", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.10", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.10", + "@babel/types": "^7.12.10", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", "json5": "^2.1.2", "lodash": "^4.17.19", - "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" }, @@ -52,12 +51,12 @@ } }, "@babel/generator": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", - "integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz", + "integrity": "sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==", "dev": true, "requires": { - "@babel/types": "^7.12.5", + "@babel/types": "^7.12.11", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -71,32 +70,32 @@ } }, "@babel/helper-function-name": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", - "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz", + "integrity": "sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/helper-get-function-arity": "^7.12.10", + "@babel/template": "^7.12.7", + "@babel/types": "^7.12.11" } }, "@babel/helper-get-function-arity": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", - "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "version": "7.12.10", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz", + "integrity": "sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.10" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz", - "integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz", + "integrity": "sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==", "dev": true, "requires": { - "@babel/types": "^7.12.1" + "@babel/types": "^7.12.7" } }, "@babel/helper-module-imports": { @@ -126,12 +125,12 @@ } }, "@babel/helper-optimise-call-expression": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", - "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", + "version": "7.12.10", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz", + "integrity": "sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.10" } }, "@babel/helper-plugin-utils": { @@ -141,15 +140,15 @@ "dev": true }, "@babel/helper-replace-supers": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz", - "integrity": "sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.11.tgz", + "integrity": "sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.12.1", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/traverse": "^7.12.5", - "@babel/types": "^7.12.5" + "@babel/helper-member-expression-to-functions": "^7.12.7", + "@babel/helper-optimise-call-expression": "^7.12.10", + "@babel/traverse": "^7.12.10", + "@babel/types": "^7.12.11" } }, "@babel/helper-simple-access": { @@ -162,18 +161,18 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", - "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz", + "integrity": "sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g==", "dev": true, "requires": { - "@babel/types": "^7.11.0" + "@babel/types": "^7.12.11" } }, "@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", "dev": true }, "@babel/helpers": { @@ -196,12 +195,64 @@ "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "@babel/parser": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", - "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz", + "integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -313,28 +364,28 @@ } }, "@babel/template": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", - "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz", + "integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7" } }, "@babel/traverse": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", - "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", + "version": "7.12.12", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.12.tgz", + "integrity": "sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.5", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.12.5", - "@babel/types": "^7.12.5", + "@babel/code-frame": "^7.12.11", + "@babel/generator": "^7.12.11", + "@babel/helper-function-name": "^7.12.11", + "@babel/helper-split-export-declaration": "^7.12.11", + "@babel/parser": "^7.12.11", + "@babel/types": "^7.12.12", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" @@ -349,12 +400,12 @@ } }, "@babel/types": { - "version": "7.12.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", - "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "version": "7.12.12", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz", + "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.4", + "@babel/helper-validator-identifier": "^7.12.11", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } @@ -446,84 +497,6 @@ "jest-message-util": "^26.6.2", "jest-util": "^26.6.2", "slash": "^3.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "@jest/core": { @@ -560,84 +533,6 @@ "rimraf": "^3.0.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "@jest/environment": { @@ -650,70 +545,6 @@ "@jest/types": "^26.6.2", "@types/node": "*", "jest-mock": "^26.6.2" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "@jest/fake-timers": { @@ -728,84 +559,6 @@ "jest-message-util": "^26.6.2", "jest-mock": "^26.6.2", "jest-util": "^26.6.2" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "@jest/globals": { @@ -817,70 +570,6 @@ "@jest/environment": "^26.6.2", "@jest/types": "^26.6.2", "expect": "^26.6.2" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "@jest/reporters": { @@ -914,84 +603,6 @@ "string-length": "^4.0.1", "terminal-link": "^2.0.0", "v8-to-istanbul": "^7.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "@jest/source-map": { @@ -1015,70 +626,6 @@ "@jest/types": "^26.6.2", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "@jest/test-sequencer": { @@ -1115,84 +662,6 @@ "slash": "^3.0.0", "source-map": "^0.6.1", "write-file-atomic": "^3.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "@jest/types": { @@ -1206,57 +675,6 @@ "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "@nodelib/fs.scandir": { @@ -1286,12 +704,24 @@ } }, "@npmcli/move-file": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.0.1.tgz", - "integrity": "sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.0.tgz", + "integrity": "sha512-Iv2iq0JuyYjKeFkSR4LPaCdDZwlGK9X2cP/01nJcp3yMJ1FjNd9vpiEYvLUgzBxKPg2SFmaOhizoQsPc0LWeOQ==", "dev": true, "requires": { - "mkdirp": "^1.0.4" + "mkdirp": "^1.0.4", + "rimraf": "^2.7.1" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } } }, "@sindresorhus/df": { @@ -1334,9 +764,9 @@ } }, "@sinonjs/commons": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz", - "integrity": "sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.2.tgz", + "integrity": "sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw==", "dev": true, "requires": { "type-detect": "4.0.8" @@ -1392,9 +822,9 @@ } }, "@types/babel__template": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.0.3.tgz", - "integrity": "sha512-uCoznIPDmnickEi6D0v11SBpW0OuVqHJCa7syXqQHy5uktSCreIlt0iglsCnmvz8yCb38hGcWeseA8cWJSwv5Q==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz", + "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -1402,21 +832,22 @@ } }, "@types/babel__traverse": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.15.tgz", - "integrity": "sha512-Pzh9O3sTK8V6I1olsXpCfj2k/ygO2q1X0vhhnDrEQyYLHZesWz+zMZMVcwXLCYf0U36EtmyYaFGPfXlTtDHe3A==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.11.0.tgz", + "integrity": "sha512-kSjgDMZONiIfSH1Nxcr5JIRMwUetDki63FSQfpTCz8ogF3Ulqm8+mr5f78dUYs6vMiB6gBusQqfQmBvHZj/lwg==", "dev": true, "requires": { "@babel/types": "^7.3.0" } }, "@types/clean-css": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@types/clean-css/-/clean-css-4.2.2.tgz", - "integrity": "sha512-xiTJn3bmDh1lA8c6iVJs4ZhHw+pcmxXlJQXOB6G1oULaak8rmarIeFKI4aTJ7849dEhaO612wgIualZfbxTJwA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@types/clean-css/-/clean-css-4.2.3.tgz", + "integrity": "sha512-ET0ldU/vpXecy5vO8JRIhtJWSrk1vzXdJcp3Bjf8bARZynl6vfkhEKY/A7njfNIRlmyTGuVFuqnD6I3tOGdXpQ==", "dev": true, "requires": { - "@types/node": "*" + "@types/node": "*", + "source-map": "^0.6.0" } }, "@types/glob": { @@ -1474,9 +905,9 @@ } }, "@types/jest": { - "version": "26.0.19", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.19.tgz", - "integrity": "sha512-jqHoirTG61fee6v6rwbnEuKhpSKih0tuhqeFbCmMmErhtu3BYlOZaXWjffgOstMM4S/3iQD31lI5bGLTrs97yQ==", + "version": "26.0.20", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.20.tgz", + "integrity": "sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA==", "dev": true, "requires": { "jest-diff": "^26.0.0", @@ -1495,16 +926,10 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", "dev": true }, - "@types/mustache": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@types/mustache/-/mustache-4.1.0.tgz", - "integrity": "sha512-dj4gq0BwsONZw/jqEf1qDBkAhAdBfIb7K+RDEQQvGfd6uTkfzKNxjz6NCeg50bveU0ydi8DruGp/9+FgIxli5w==", - "dev": true - }, "@types/node": { - "version": "14.14.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.5.tgz", - "integrity": "sha512-H5Wn24s/ZOukBmDn03nnGTp18A60ny9AmCwnEcgJiTgSGsCO7k+NWP7zjCCbhlcnVCoI+co52dUAt9GMhOSULw==", + "version": "14.14.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.21.tgz", + "integrity": "sha512-cHYfKsnwllYhjOzuC5q1VpguABBeecUp24yFluHpn/BQaVxB1CuQ1FSRZCzrPxrkIfWISXV2LbeoBthLWg0+0A==", "dev": true }, "@types/normalize-package-data": { @@ -1514,9 +939,9 @@ "dev": true }, "@types/prettier": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.1.5.tgz", - "integrity": "sha512-UEyp8LwZ4Dg30kVU2Q3amHHyTn1jEdhCIE59ANed76GaT1Vp76DD3ZWSAxgCrw6wJ0TqeoBpqmfUHiUDPs//HQ==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.1.6.tgz", + "integrity": "sha512-6gOkRe7OIioWAXfnO/2lFiv+SJichKVSys1mSsgyrYHSEjk8Ctv4tSR/Odvnu+HWlH2C8j53dahU03XmQdd5fA==", "dev": true }, "@types/q": { @@ -1573,9 +998,9 @@ } }, "@types/webpack-sources": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-2.0.0.tgz", - "integrity": "sha512-a5kPx98CNFRKQ+wqawroFunvFqv7GHm/3KOI52NY9xWADgc8smu4R6prt4EU/M4QfVjvgBkMqU4fBhw3QfMVkg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-2.1.0.tgz", + "integrity": "sha512-LXn/oYIpBeucgP1EIJbKQ2/4ZmpvRl+dlrFdX7+94SKRUV3Evy3FsfMZY318vGhkWUS5MPhtOM3w1/hCOAOXcg==", "dev": true, "requires": { "@types/node": "*", @@ -1592,85 +1017,86 @@ } }, "@types/yargs": { - "version": "15.0.9", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz", - "integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==", + "version": "15.0.12", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.12.tgz", + "integrity": "sha512-f+fD/fQAo3BCbCDlrUpznF1A5Zp9rB0noS5vnoormHSIPFKL0Z2DcUJ3Gxp5ytH4uLRNxy7AwYUC9exZzqGMAw==", "dev": true, "requires": { "@types/yargs-parser": "*" } }, "@types/yargs-parser": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-15.0.0.tgz", - "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==", + "version": "20.2.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz", + "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.11.1.tgz", - "integrity": "sha512-fABclAX2QIEDmTMk6Yd7Muv1CzFLwWM4505nETzRHpP3br6jfahD9UUJkhnJ/g2m7lwfz8IlswcwGGPGiq9exw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.13.0.tgz", + "integrity": "sha512-ygqDUm+BUPvrr0jrXqoteMqmIaZ/bixYOc3A4BRwzEPTZPi6E+n44rzNZWaB0YvtukgP+aoj0i/fyx7FkM2p1w==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.11.1", - "@typescript-eslint/scope-manager": "4.11.1", + "@typescript-eslint/experimental-utils": "4.13.0", + "@typescript-eslint/scope-manager": "4.13.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", + "lodash": "^4.17.15", "regexpp": "^3.0.0", "semver": "^7.3.2", "tsutils": "^3.17.1" } }, "@typescript-eslint/experimental-utils": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.11.1.tgz", - "integrity": "sha512-mAlWowT4A6h0TC9F+J5pdbEhjNiEMO+kqPKQ4sc3fVieKL71dEqfkKgtcFVSX3cjSBwYwhImaQ/mXQF0oaI38g==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.13.0.tgz", + "integrity": "sha512-/ZsuWmqagOzNkx30VWYV3MNB/Re/CGv/7EzlqZo5RegBN8tMuPaBgNK6vPBCQA8tcYrbsrTdbx3ixMRRKEEGVw==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.11.1", - "@typescript-eslint/types": "4.11.1", - "@typescript-eslint/typescript-estree": "4.11.1", + "@typescript-eslint/scope-manager": "4.13.0", + "@typescript-eslint/types": "4.13.0", + "@typescript-eslint/typescript-estree": "4.13.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.11.1.tgz", - "integrity": "sha512-BJ3jwPQu1jeynJ5BrjLuGfK/UJu6uwHxJ/di7sanqmUmxzmyIcd3vz58PMR7wpi8k3iWq2Q11KMYgZbUpRoIPw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.13.0.tgz", + "integrity": "sha512-KO0J5SRF08pMXzq9+abyHnaGQgUJZ3Z3ax+pmqz9vl81JxmTTOUfQmq7/4awVfq09b6C4owNlOgOwp61pYRBSg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.11.1", - "@typescript-eslint/types": "4.11.1", - "@typescript-eslint/typescript-estree": "4.11.1", + "@typescript-eslint/scope-manager": "4.13.0", + "@typescript-eslint/types": "4.13.0", + "@typescript-eslint/typescript-estree": "4.13.0", "debug": "^4.1.1" } }, "@typescript-eslint/scope-manager": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.11.1.tgz", - "integrity": "sha512-Al2P394dx+kXCl61fhrrZ1FTI7qsRDIUiVSuN6rTwss6lUn8uVO2+nnF4AvO0ug8vMsy3ShkbxLu/uWZdTtJMQ==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.13.0.tgz", + "integrity": "sha512-UpK7YLG2JlTp/9G4CHe7GxOwd93RBf3aHO5L+pfjIrhtBvZjHKbMhBXTIQNkbz7HZ9XOe++yKrXutYm5KmjWgQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.11.1", - "@typescript-eslint/visitor-keys": "4.11.1" + "@typescript-eslint/types": "4.13.0", + "@typescript-eslint/visitor-keys": "4.13.0" } }, "@typescript-eslint/types": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.11.1.tgz", - "integrity": "sha512-5kvd38wZpqGY4yP/6W3qhYX6Hz0NwUbijVsX2rxczpY6OXaMxh0+5E5uLJKVFwaBM7PJe1wnMym85NfKYIh6CA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.13.0.tgz", + "integrity": "sha512-/+aPaq163oX+ObOG00M0t9tKkOgdv9lq0IQv/y4SqGkAXmhFmCfgsELV7kOCTb2vVU5VOmVwXBXJTDr353C1rQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.11.1.tgz", - "integrity": "sha512-tC7MKZIMRTYxQhrVAFoJq/DlRwv1bnqA4/S2r3+HuHibqvbrPcyf858lNzU7bFmy4mLeIHFYr34ar/1KumwyRw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.13.0.tgz", + "integrity": "sha512-9A0/DFZZLlGXn5XA349dWQFwPZxcyYyCFX5X88nWs2uachRDwGeyPz46oTsm9ZJE66EALvEns1lvBwa4d9QxMg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.11.1", - "@typescript-eslint/visitor-keys": "4.11.1", + "@typescript-eslint/types": "4.13.0", + "@typescript-eslint/visitor-keys": "4.13.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -1680,12 +1106,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.11.1.tgz", - "integrity": "sha512-IrlBhD9bm4bdYcS8xpWarazkKXlE7iYb1HzRuyBP114mIaj5DJPo11Us1HgH60dTt41TCZXMaTCAW+OILIYPOg==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.13.0.tgz", + "integrity": "sha512-6RoxWK05PAibukE7jElqAtNMq+RWZyqJ6Q/GdIxaiUj2Ept8jh8+FUVlbq9WxMYxkmEOPvCE5cRSyupMpwW31g==", "dev": true, "requires": { - "@typescript-eslint/types": "4.11.1", + "@typescript-eslint/types": "4.13.0", "eslint-visitor-keys": "^2.0.0" } }, @@ -1989,12 +1415,12 @@ "dev": true }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, "anymatch": { @@ -2189,70 +1615,6 @@ "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "slash": "^3.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "babel-plugin-istanbul": { @@ -2281,9 +1643,9 @@ } }, "babel-preset-current-node-syntax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.0.tgz", - "integrity": "sha512-mGkvkpocWJes1CmMKtgGUwCeeq0pOhALyymozzDWYomHTbDLwueDYG6p4TK1YOeYHCzBzYPsWkgTto10JubI1Q==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", "dev": true, "requires": { "@babel/plugin-syntax-async-generators": "^7.8.4", @@ -2372,9 +1734,9 @@ } }, "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true }, "bcrypt-pbkdf": { @@ -2399,9 +1761,9 @@ "dev": true }, "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, "optional": true }, @@ -2492,21 +1854,13 @@ } }, "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", "dev": true, "requires": { - "bn.js": "^4.1.0", + "bn.js": "^5.0.0", "randombytes": "^2.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", - "dev": true - } } }, "browserify-sign": { @@ -2549,15 +1903,16 @@ } }, "browserslist": { - "version": "4.14.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.5.tgz", - "integrity": "sha512-Z+vsCZIvCBvqLoYkBFTwEYH3v5MCQbsAjp50ERycpOjnPmolg1Gjy4+KaWWpm8QOJt9GHkhdqAl14NpCX73CWA==", + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.1.tgz", + "integrity": "sha512-UXhDrwqsNcpTYJBTZsbGATDxZbiVDsx6UjpmRUmtnP10pr8wAYr5LgFoEFw9ixriQH2mv/NX2SfGzE/o8GndLA==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001135", - "electron-to-chromium": "^1.3.571", - "escalade": "^3.1.0", - "node-releases": "^1.1.61" + "caniuse-lite": "^1.0.30001173", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.634", + "escalade": "^3.1.1", + "node-releases": "^1.1.69" } }, "bs-logger": { @@ -2649,6 +2004,16 @@ "unset-value": "^1.0.0" } }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "caller-callsite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", @@ -2692,9 +2057,9 @@ } }, "camelcase": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.1.0.tgz", - "integrity": "sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", "dev": true }, "caniuse-api": { @@ -2710,9 +2075,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001151", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001151.tgz", - "integrity": "sha512-Zh3sHqskX6mHNrqUerh+fkf0N72cMxrmflzje/JyVImfpknscMnkeJrlFGJcqTmaa0iszdYptGpWMJCRQDkBVw==", + "version": "1.0.30001177", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001177.tgz", + "integrity": "sha512-6Ld7t3ifCL02jTj3MxPMM5wAYjbo4h/TAQGFTgv1inihP1tWnWp8mxxT4ut4JBEHLbpFXEXJJQ119JCJTBkYDw==", "dev": true }, "capture-exit": { @@ -2731,25 +2096,13 @@ "dev": true }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, "char-regex": { @@ -2767,15 +2120,15 @@ } }, "chokidar": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", - "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.0.tgz", + "integrity": "sha512-JgQM9JS92ZbFR4P90EvmzNpSGhpPBGBSj10PILeDyYFwp4h2/D9OM03wsJ4zW1fEp4ka2DGrnUeD7FuvQ2aZ2Q==", "dev": true, "optional": true, "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.2", + "fsevents": "~2.3.1", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -2859,31 +2212,14 @@ "dev": true }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" } }, "co": { @@ -2901,6 +2237,58 @@ "@types/q": "^1.5.1", "chalk": "^2.4.1", "q": "^1.1.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "codecov": { @@ -2945,21 +2333,38 @@ "requires": { "color-convert": "^1.9.1", "color-string": "^1.5.4" + }, + "dependencies": { + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + } } }, "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "color-name": "1.1.3" + "color-name": "~1.1.4" } }, "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "color-string": { @@ -2972,6 +2377,12 @@ "simple-swizzle": "^0.2.2" } }, + "colorette": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", + "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==", + "dev": true + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -3133,6 +2544,16 @@ "resolve-from": "^3.0.0" } }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, "resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", @@ -3164,6 +2585,12 @@ "semver": "^5.6.0" } }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -3457,28 +2884,28 @@ "dev": true }, "csso": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/csso/-/csso-4.1.0.tgz", - "integrity": "sha512-h+6w/W1WqXaJA4tb1dk7r5tVbOm97MsKxzwnvOR04UQ6GILroryjMWu3pmCCtL2mLaEStQ0fZgeGiy99mo7iyg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", "dev": true, "requires": { - "css-tree": "^1.0.0" + "css-tree": "^1.1.2" }, "dependencies": { "css-tree": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0.tgz", - "integrity": "sha512-CdVYz/Yuqw0VdKhXPBIgi8DO3NicJVYZNWeX9XcIuSp9ZoFT5IcleVRW07O5rMjdcx1mb+MEJPknTTEW7DdsYw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz", + "integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==", "dev": true, "requires": { - "mdn-data": "2.0.12", + "mdn-data": "2.0.14", "source-map": "^0.6.1" } }, "mdn-data": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.12.tgz", - "integrity": "sha512-ULbAlgzVb8IqZ0Hsxm6hHSlQl3Jckst2YEQS7fODu9ilNWy2LvcoSY7TRFIktABP2mdppBioc66va90T+NUs8Q==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", "dev": true } } @@ -3533,9 +2960,9 @@ } }, "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -3709,9 +3136,9 @@ }, "dependencies": { "domelementtype": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.2.tgz", - "integrity": "sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", + "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", "dev": true } } @@ -3787,9 +3214,9 @@ } }, "electron-to-chromium": { - "version": "1.3.584", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.584.tgz", - "integrity": "sha512-NB3DzrTzJFhWkUp+nl2KtUtoFzrfGXTir2S+BU4tXGyXH9vlluPuFpE3pTKeH7+PY460tHLjKzh6K2+TWwW+Ww==", + "version": "1.3.640", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.640.tgz", + "integrity": "sha512-cU6wQdXYzuSPzLdszsa4whStYfmU7CVNnG6c5z6/z9YlCOQ2Xh/uKB1gTxlIRr0ubgSg1/dZuSbUAoeESeQ3sQ==", "dev": true }, "elliptic": { @@ -3822,9 +3249,9 @@ "dev": true }, "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "emojis-list": { @@ -3843,9 +3270,9 @@ } }, "enhanced-resolve": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz", - "integrity": "sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", + "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -3869,9 +3296,9 @@ "dev": true }, "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", "dev": true, "requires": { "prr": "~1.0.1" @@ -3887,9 +3314,9 @@ } }, "es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", - "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", @@ -3897,6 +3324,7 @@ "has": "^1.0.3", "has-symbols": "^1.0.1", "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", "is-regex": "^1.1.1", "object-inspect": "^1.8.0", "object-keys": "^1.1.1", @@ -4027,60 +3455,11 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } } } }, @@ -4353,70 +3732,6 @@ "jest-matcher-utils": "^26.6.2", "jest-message-util": "^26.6.2", "jest-regex-util": "^26.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "extend": { @@ -4825,9 +4140,9 @@ "dev": true }, "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz", + "integrity": "sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==", "dev": true, "optional": true }, @@ -4855,6 +4170,17 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-intrinsic": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz", + "integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, "get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -4973,9 +4299,9 @@ } }, "globby": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", - "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", + "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==", "dev": true, "requires": { "array-union": "^2.1.0", @@ -4999,6 +4325,19 @@ "dev": true, "optional": true }, + "handlebars": { + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + } + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -5025,9 +4364,9 @@ } }, "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "has-symbols": { @@ -5316,67 +4655,13 @@ } }, "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", - "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", "dev": true, "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - } + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" } }, "imurmurhash": { @@ -5515,9 +4800,9 @@ } }, "is-core-module": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.1.0.tgz", - "integrity": "sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", "dev": true, "requires": { "has": "^1.0.3" @@ -5594,9 +4879,9 @@ "dev": true }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "is-generator-fn": { @@ -5615,9 +4900,9 @@ } }, "is-negative-zero": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", - "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", "dev": true }, "is-number": { @@ -5705,10 +4990,14 @@ "dev": true }, "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "optional": true, + "requires": { + "is-docker": "^2.0.0" + } }, "isarray": { "version": "1.0.0", @@ -5769,23 +5058,6 @@ "istanbul-lib-coverage": "^3.0.0", "make-dir": "^3.0.0", "supports-color": "^7.1.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "istanbul-lib-source-maps": { @@ -5820,98 +5092,6 @@ "jest-cli": "^26.6.3" }, "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "import-local": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", - "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, "jest-cli": { "version": "26.6.3", "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.6.3.tgz", @@ -5932,95 +5112,6 @@ "prompts": "^2.0.1", "yargs": "^15.4.1" } - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "requires": { - "resolve-from": "^5.0.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } } } }, @@ -6035,53 +5126,6 @@ "throat": "^5.0.0" }, "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "execa": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", @@ -6108,12 +5152,6 @@ "pump": "^3.0.0" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", @@ -6128,15 +5166,6 @@ "requires": { "path-key": "^3.0.0" } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } } } }, @@ -6164,96 +5193,6 @@ "jest-validate": "^26.6.2", "micromatch": "^4.0.2", "pretty-format": "^26.6.2" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-diff": { @@ -6266,57 +5205,6 @@ "diff-sequences": "^26.6.2", "jest-get-type": "^26.3.0", "pretty-format": "^26.6.2" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-docblock": { @@ -6339,96 +5227,6 @@ "jest-get-type": "^26.3.0", "jest-util": "^26.6.2", "pretty-format": "^26.6.2" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-environment-jsdom": { @@ -6444,84 +5242,6 @@ "jest-mock": "^26.6.2", "jest-util": "^26.6.2", "jsdom": "^16.4.0" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-environment-node": { @@ -6536,84 +5256,6 @@ "@types/node": "*", "jest-mock": "^26.6.2", "jest-util": "^26.6.2" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-get-type": { @@ -6642,84 +5284,6 @@ "micromatch": "^4.0.2", "sane": "^4.0.3", "walker": "^1.0.7" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-jasmine2": { @@ -6746,96 +5310,6 @@ "jest-util": "^26.6.2", "pretty-format": "^26.6.2", "throat": "^5.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-leak-detector": { @@ -6846,82 +5320,6 @@ "requires": { "jest-get-type": "^26.3.0", "pretty-format": "^26.6.2" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-matcher-utils": { @@ -6934,100 +5332,6 @@ "jest-diff": "^26.6.2", "jest-get-type": "^26.3.0", "pretty-format": "^26.6.2" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "diff-sequences": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", - "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-diff": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", - "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^26.6.2", - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" - } - }, - "pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-message-util": { @@ -7045,82 +5349,6 @@ "pretty-format": "^26.6.2", "slash": "^3.0.0", "stack-utils": "^2.0.2" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-mock": { @@ -7131,70 +5359,6 @@ "requires": { "@jest/types": "^26.6.2", "@types/node": "*" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-pnp-resolver": { @@ -7223,84 +5387,6 @@ "read-pkg-up": "^7.0.1", "resolve": "^1.18.1", "slash": "^3.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-resolve-dependencies": { @@ -7312,70 +5398,6 @@ "@jest/types": "^26.6.2", "jest-regex-util": "^26.0.0", "jest-snapshot": "^26.6.2" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-runner": { @@ -7404,84 +5426,6 @@ "jest-worker": "^26.6.2", "source-map-support": "^0.5.6", "throat": "^5.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-runtime": { @@ -7517,164 +5461,6 @@ "slash": "^3.0.0", "strip-bom": "^4.0.0", "yargs": "^15.4.1" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } } }, "jest-serializer": { @@ -7709,100 +5495,6 @@ "natural-compare": "^1.4.0", "pretty-format": "^26.6.2", "semver": "^7.3.2" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "diff-sequences": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", - "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-diff": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", - "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^26.6.2", - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" - } - }, - "pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-util": { @@ -7817,70 +5509,6 @@ "graceful-fs": "^4.2.4", "is-ci": "^2.0.0", "micromatch": "^4.0.2" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-validate": { @@ -7895,82 +5523,6 @@ "jest-get-type": "^26.3.0", "leven": "^3.1.0", "pretty-format": "^26.6.2" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-watcher": { @@ -7986,84 +5538,6 @@ "chalk": "^4.0.0", "jest-util": "^26.6.2", "string-length": "^4.0.1" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-worker": { @@ -8075,23 +5549,6 @@ "@types/node": "*", "merge-stream": "^2.0.0", "supports-color": "^7.0.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "js-tokens": { @@ -8437,18 +5894,18 @@ } }, "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==", "dev": true }, "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "version": "2.1.28", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", + "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", "dev": true, "requires": { - "mime-db": "1.44.0" + "mime-db": "1.45.0" } }, "mimic-fn": { @@ -8458,9 +5915,9 @@ "dev": true }, "mini-css-extract-plugin": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.3.3.tgz", - "integrity": "sha512-7lvliDSMiuZc81kI+5/qxvn47SCM7BehXex3f2c6l/pR3Goj58IQxZh9nuPQ3AkGQgoETyXuIqLDaO5Oa0TyBw==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.3.4.tgz", + "integrity": "sha512-dNjqyeogUd8ucUgw5sxm1ahvSfSUgef7smbmATRSbDm4EmNx5kQA6VdUEhEeCKSjX6CTYjb5vxgMUvRjqP3uHg==", "dev": true, "requires": { "loader-utils": "^2.0.0", @@ -8670,12 +6127,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "mustache": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.1.0.tgz", - "integrity": "sha512-0FsgP/WVq4mKyjolIyX+Z9Bd+3WS8GOwoUTyKXT5cTYMGeauNTi2HPCwERqseC1IHAy0Z7MDZnJBfjabd4O8GQ==", - "dev": true - }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -8800,22 +6251,19 @@ "which": "^2.0.2" }, "dependencies": { - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, - "optional": true, - "requires": { - "is-docker": "^2.0.0" - } + "optional": true } } }, "node-releases": { - "version": "1.1.64", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.64.tgz", - "integrity": "sha512-Iec8O9166/x2HRMJyLLLWkd0sFFLrFNy+Xf+JQfSQsdBJzPcHpNl3JQ9gD4j+aJxmCa25jNsIbM4bmACtSbkSg==", + "version": "1.1.69", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.69.tgz", + "integrity": "sha512-DGIjo79VDEyAnRlfSqYTsy+yoHd2IOjJiKUozD2MV2D85Vso6Bug56mb9tT/fY5Urt0iqk01H7x+llAruDR2zA==", "dev": true }, "normalize-package-data": { @@ -8926,9 +6374,9 @@ } }, "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true }, "object-keys": { @@ -8947,47 +6395,26 @@ } }, "object.assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.1.tgz", - "integrity": "sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.0", "has-symbols": "^1.0.1", "object-keys": "^1.1.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } } }, "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz", + "integrity": "sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "es-abstract": "^1.18.0-next.1" } }, "object.pick": { @@ -9000,14 +6427,14 @@ } }, "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", - "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.2.tgz", + "integrity": "sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", + "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" } }, @@ -9066,9 +6493,9 @@ "dev": true }, "p-each-series": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.1.0.tgz", - "integrity": "sha512-ZuRs1miPT4HrjFa+9fRfOFXxGJfORgelKV9f9nNOWw2gl6gVsRaVDOQP0+MI0G0wGKns1Yacsu0GjOFbTK0JFQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", "dev": true }, "p-finally": { @@ -9170,13 +6597,15 @@ } }, "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", + "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", "dev": true, "requires": { + "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" } }, "parse-passwd": { @@ -9266,9 +6695,9 @@ "dev": true }, "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, "pinkie": { @@ -9319,6 +6748,69 @@ "chalk": "^2.4.2", "source-map": "^0.6.1", "supports-color": "^6.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "postcss-calc": { @@ -9859,32 +7351,6 @@ "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - } } }, "process": { @@ -10061,18 +7527,6 @@ "type-fest": "^0.6.0" }, "dependencies": { - "parse-json": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", - "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, "type-fest": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", @@ -10217,12 +7671,6 @@ "psl": "^1.1.28", "punycode": "^2.1.1" } - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true } } }, @@ -10277,28 +7725,28 @@ "dev": true }, "resolve": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", - "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "dev": true, "requires": { - "is-core-module": "^2.0.0", + "is-core-module": "^2.1.0", "path-parse": "^1.0.6" } }, "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, "requires": { - "resolve-from": "^3.0.0" + "resolve-from": "^5.0.0" }, "dependencies": { "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true } } @@ -10591,10 +8039,13 @@ } }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "serialize-javascript": { "version": "5.0.1", @@ -10716,38 +8167,6 @@ "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - } } }, "snapdragon": { @@ -10946,9 +8365,9 @@ } }, "spdx-license-ids": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz", - "integrity": "sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", "dev": true }, "split-string": { @@ -10999,9 +8418,9 @@ "dev": true }, "stack-utils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.2.tgz", - "integrity": "sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==", "dev": true, "requires": { "escape-string-regexp": "^2.0.0" @@ -11101,95 +8520,34 @@ } }, "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "string.prototype.trimend": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz", - "integrity": "sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", + "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, "string.prototype.trimstart": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz", - "integrity": "sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", + "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, "string_decoder": { @@ -11273,12 +8631,12 @@ } }, "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } }, "supports-hyperlinks": { @@ -11289,23 +8647,6 @@ "requires": { "has-flag": "^4.0.0", "supports-color": "^7.0.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "svgo": { @@ -11329,6 +8670,47 @@ "util.promisify": "~1.0.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -11337,6 +8719,15 @@ "requires": { "minimist": "^1.2.5" } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } } } }, @@ -11347,9 +8738,9 @@ "dev": true }, "table": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.6.tgz", - "integrity": "sha512-OInCtPmDNieVBkVFi6C8RwU2S2H0h8mF3e3TQK4nreaUNCpooQUkI+A/KuEkm5FawfhWIfNqG+qfelVVR+V00g==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", "dev": true, "requires": { "ajv": "^7.0.2", @@ -11370,34 +8761,11 @@ "uri-js": "^4.2.2" } }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } } } }, @@ -11408,9 +8776,9 @@ "dev": true }, "tar": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.5.tgz", - "integrity": "sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz", + "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==", "dev": true, "requires": { "chownr": "^2.0.0", @@ -11432,14 +8800,6 @@ "node-fetch": "^2.2.0", "stream-events": "^1.0.5", "uuid": "^3.3.2" - }, - "dependencies": { - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - } } }, "terminal-link": { @@ -11529,6 +8889,12 @@ "locate-path": "^3.0.0" } }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -11591,6 +8957,12 @@ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, "pkg-dir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", @@ -11852,23 +9224,11 @@ "pify": "^3.0.0" } }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", "dev": true - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true } } }, @@ -11900,44 +9260,16 @@ } }, "ts-loader": { - "version": "8.0.13", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-8.0.13.tgz", - "integrity": "sha512-1o1nO6aqouA23d2nlcMSEyPMAWRhnYUU0EQUJSc60E0TUyBNX792RHFYUN1ZM29vhMUNayrsbj2UVdZwKhXCDA==", + "version": "8.0.14", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-8.0.14.tgz", + "integrity": "sha512-Jt/hHlUnApOZjnSjTmZ+AbD5BGlQFx3f1D0nYuNKwz0JJnuDGHJas6az+FlWKwwRTu+26GXpv249A8UAnYUpqA==", "dev": true, "requires": { - "chalk": "^2.3.0", + "chalk": "^4.1.0", "enhanced-resolve": "^4.0.0", - "loader-utils": "^1.0.2", + "loader-utils": "^2.0.0", "micromatch": "^4.0.0", - "semver": "^6.0.0" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "semver": "^7.3.4" } }, "ts-node": { @@ -11961,9 +9293,9 @@ "dev": true }, "tsutils": { - "version": "3.17.1", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", - "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "version": "3.19.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.19.1.tgz", + "integrity": "sha512-GEdoBf5XI324lu7ycad7s6laADfnAqCw6wLGI+knxvw9vsIYBaJfYdmeCEG3FMMUiSm3OGgNb+m6utsWf5h9Vw==", "dev": true, "requires": { "tslib": "^1.8.1" @@ -12033,9 +9365,9 @@ "dev": true }, "uglify-js": { - "version": "3.11.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.4.tgz", - "integrity": "sha512-FyYnoxVL1D6+jDGQpbK5jW6y/2JlVfRfEeQ67BPCUg5wfCjaKOpr2XeceE4QL+MkhxliLtf5EbrMDZgzpt2CNw==", + "version": "3.12.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.4.tgz", + "integrity": "sha512-L5i5jg/SHkEqzN18gQMTWsZk3KelRsfD1wUVNqtq0kzqWQqcJjyL8yc1o8hJgRrWqrAl2mUFbhfznEIoi7zi2A==", "dev": true }, "union-value": { @@ -12140,9 +9472,9 @@ "dev": true }, "uri-js": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", - "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -12226,25 +9558,45 @@ "es-abstract": "^1.17.2", "has-symbols": "^1.0.1", "object.getownpropertydescriptors": "^2.1.0" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", + "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + } } }, "uuid": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", - "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==", - "dev": true, - "optional": true + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true }, "v8-compile-cache": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", - "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", + "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", "dev": true }, "v8-to-istanbul": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.0.0.tgz", - "integrity": "sha512-fLL2rFuQpMtm9r8hrAV2apXX/WqHJ6+IC4/eQVdMDGBUgH/YMV4Gv3duk3kjmyg6uiQWBAA9nJwue4iJUOkHeA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.0.tgz", + "integrity": "sha512-uXUVqNUCLa0AH1vuVxzi+MI4RfxEOKt9pBgKwHbgH7st8Kv2P1m+jvWNnektzBh5QShF3ODgKmUFCf38LnVz1g==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.1", @@ -12321,21 +9673,21 @@ } }, "watchpack": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.4.tgz", - "integrity": "sha512-aWAgTW4MoSJzZPAicljkO1hsi1oKj/RRq/OJQh2PKI2UKL04c2Bs+MBOB+BBABHTXJpf9mCwHN7ANCvYsvY2sg==", + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", + "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", "dev": true, "requires": { "chokidar": "^3.4.1", "graceful-fs": "^4.1.2", "neo-async": "^2.5.0", - "watchpack-chokidar2": "^2.0.0" + "watchpack-chokidar2": "^2.0.1" } }, "watchpack-chokidar2": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.0.tgz", - "integrity": "sha512-9TyfOyN/zLUbA288wZ8IsMZ+6cbzvsNyEzSBp6e/zkifi6xxbl8SmQ/CxQq32k8NNqrdVEVUVSEf56L4rQ/ZxA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz", + "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==", "dev": true, "optional": true, "requires": { @@ -12565,9 +9917,9 @@ "dev": true }, "webpack": { - "version": "4.44.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.44.2.tgz", - "integrity": "sha512-6KJVGlCxYdISyurpQ0IPTklv+DULv05rs2hseIXer6D7KrUicRDLFb4IUM1S6LUAKypPM/nSiVSuv8jHu1m3/Q==", + "version": "4.46.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.46.0.tgz", + "integrity": "sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==", "dev": true, "requires": { "@webassemblyjs/ast": "1.9.0", @@ -12578,7 +9930,7 @@ "ajv": "^6.10.2", "ajv-keywords": "^3.4.1", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^4.3.0", + "enhanced-resolve": "^4.5.0", "eslint-scope": "^4.0.3", "json-parse-better-errors": "^1.0.2", "loader-runner": "^2.4.0", @@ -12785,6 +10137,75 @@ "yargs": "^13.3.2" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -12798,6 +10219,43 @@ "which": "^1.2.9" } }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, "json5": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", @@ -12818,12 +10276,70 @@ "json5": "^1.0.1" } }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -12845,6 +10361,35 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -12853,6 +10398,45 @@ "requires": { "isexe": "^2.0.0" } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, @@ -12913,6 +10497,12 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "worker-farm": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", @@ -12923,31 +10513,14 @@ } }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, "wrappy": { @@ -12969,9 +10542,9 @@ } }, "ws": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", - "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==", + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.2.tgz", + "integrity": "sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA==", "dev": true }, "xdg-basedir": { @@ -13023,9 +10596,9 @@ "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yallist": { @@ -13035,72 +10608,28 @@ "dev": true }, "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^3.0.0", + "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } + "yargs-parser": "^18.1.2" } }, "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, "requires": { "camelcase": "^5.0.0", diff --git a/package.json b/package.json index 57aed3f..bcfe1b1 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "@types/glob": "^7.1.3", "@types/html-minifier": "^3.5.3", "@types/jest": "^26.0.19", - "@types/mustache": "^4.1.0", "@typescript-eslint/eslint-plugin": "^4.11.1", "@typescript-eslint/parser": "^4.11.1", "before-build-webpack": "^0.2.9", @@ -17,10 +16,10 @@ "css-loader": "^4.3.0", "eslint": "^7.17.0", "glob": "^7.1.6", + "handlebars": "^4.7.6", "html-minifier": "^4.0.0", "jest": "^26.6.3", "mini-css-extract-plugin": "^1.3.3", - "mustache": "^4.1.0", "optimize-css-assets-webpack-plugin": "^5.0.4", "remove-files-webpack-plugin": "^1.4.4", "ts-jest": "^26.4.4", diff --git a/src/docs/404.mustache b/src/docs/404.hbs similarity index 65% rename from src/docs/404.mustache rename to src/docs/404.hbs index 35b34e0..2ab9642 100644 --- a/src/docs/404.mustache +++ b/src/docs/404.hbs @@ -1,21 +1,21 @@ {{! Copyright (c) 2021 Patrick Demian; Licensed under MIT }} -{{> header}} +{{> header title="Error 404 - Not Found" description="Not Found"}}
-

{{error-code}}

- {{error-subheading}} +

404

+ Not Found



-

{{{error-string}}}

+

The resource could not be found.

diff --git a/src/docs/404.json b/src/docs/404.json deleted file mode 100644 index c93dea9..0000000 --- a/src/docs/404.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "page": { - "title": "Error 404 - Not Found", - "description": "Not Found" - }, - "error-code": "404", - "error-subheading": "Not Found", - "error-string": "The resource could not be found." -} \ No newline at end of file diff --git a/src/docs/example_code.hbs b/src/docs/example_code.hbs new file mode 100644 index 0000000..401a4fb --- /dev/null +++ b/src/docs/example_code.hbs @@ -0,0 +1,32 @@ +/* Make a regex that matches (basic) URLs */ + +using global and exact matching +create an optional group called protocol + match "http" + possibly match "s" + match "://" +create an optional group called subdomain + repeat + match a word, then "." +create a group called domain + match 1+ words or "_" or "-" + match "." + match a word +# port, but we don't care about it, so ignore it +optionally match ":" then 0+ digits +create an optional group called path + repeat + match "/" + match 0+ words or "_" or "-" +create an optional group + # we don't want to capture the '?', so don't name the group until afterwards + match "?" + create a group called query + repeat + match 1+ words or "_" or "-" + match "=" + match 1+ words or "_" or "-" +create an optional group + # fragment, again, we don't care, so ignore everything afterwards + match "#" + match 0+ any thing \ No newline at end of file diff --git a/src/docs/footer.mustache b/src/docs/footer.hbs similarity index 91% rename from src/docs/footer.mustache rename to src/docs/footer.hbs index 3c4a40c..338b8ce 100644 --- a/src/docs/footer.mustache +++ b/src/docs/footer.hbs @@ -14,7 +14,7 @@ - + diff --git a/src/docs/header.mustache b/src/docs/header.hbs similarity index 64% rename from src/docs/header.mustache rename to src/docs/header.hbs index 3705a0c..c3718e7 100644 --- a/src/docs/header.mustache +++ b/src/docs/header.hbs @@ -4,19 +4,19 @@ - + - {{page.title}} + {{title}} - + - + @@ -25,14 +25,14 @@ \ No newline at end of file diff --git a/src/docs/index.hbs b/src/docs/index.hbs new file mode 100644 index 0000000..21b3d92 --- /dev/null +++ b/src/docs/index.hbs @@ -0,0 +1,64 @@ +{{! Copyright (c) 2021 Patrick Demian; Licensed under MIT }} + +{{> header title="Human2Regex" description="Create regular expressions with natural, human language"}} + +
+
+
+
+ +
+ +
+
+

Your Regular Expression:

+
+
+ +
+
+ +
+
+ +

Human Speak:

+ +

Errors:

+ +
+
+
+
+

Cheat Sheet:

+

Full documentation available here

+

Matching

+

{{i-code}}match "hello world"{{end-i-code}} matches "hello world" exactly

+

{{i-code}}match "hello" then optionally " world"{{end-i-code}} matches "hello" or "hello world"

+

{{i-code}}match "hello" or "world"{{end-i-code}} matches "hello" or "world

+

{{i-code}}match a word{{end-i-code}} matches any word +

Repetition

+

{{i-code}}match 0+ "hello"{{end-i-code}} matches 0 or more "hello"s

+

{{i-code}}match 3 "hello"{{end-i-code}} matches exactly "hellohellohello"

+

{{i-code}}match 1 to 5 "hello"{{end-i-code}} matches between 1 to 5 "hello"s

+

{{i-code}}repeat 0 or more{{end-i-code}} repeats the intended text 0 or more times (default)

+

{{i-code}}optionally repeat between 3 to 5{{end-i-code}} optionally repeats the indented text 3 to 5 times

+

Grouping

+

{{i-code}}create a group called mygroup{{end-i-code}} creates a group called "mygroup"

+

{{i-code}}create an optional group{{end-i-code}} creates an unnamed optional group

+

Using

+

{{i-code}}using global and case insensitive{{end-i-code}} uses the 'g' and 'i' flags

+

Misc

+

{{i-code}}// comment{{end-i-code}} is a single line comment

+

{{i-code}}/* comment */{{end-i-code}} is a multi line comment

+
+
+
+
+{{> footer}} \ No newline at end of file diff --git a/src/docs/index.json b/src/docs/index.json deleted file mode 100644 index b78ba57..0000000 --- a/src/docs/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": { - "title": "Human2Regex", - "description": "Create regular expressions with natural, human language" - } -} \ No newline at end of file diff --git a/src/docs/index.mustache b/src/docs/index.mustache deleted file mode 100644 index f7039d4..0000000 --- a/src/docs/index.mustache +++ /dev/null @@ -1,97 +0,0 @@ -{{! Copyright (c) 2021 Patrick Demian; Licensed under MIT }} - -{{> header}} - -
-
-
-
- -
- -
-
-

Your Regular Expression:

-
-
- -
-
- -
-
- -

Human Speak:

- -

Errors:

- -
-
-
-
-

Cheat Sheet:

-

Full documentation available here

-

Matching

-

match "hello world" matches "hello world" exactly

-

match "hello" then optionally " world" matches "hello" or "hello world"

-

match "hello" or "world" matches "hello" or "world

-

match a word matches any word -

Repetition

-

match 0+ "hello" matches 0 or more "hello"s

-

match 3 "hello" matches exactly "hellohellohello"

-

match 1 to 5 "hello" matches between 1 to 5 "hello"s

-

repeat 0 or more repeats the intended text 0 or more times (default)

-

optionally repeat between 3 to 5 optionally repeats the indented text 3 to 5 times

-

Grouping

-

create a group called mygroup creates a group called "mygroup"

-

create an optional group creates an unnamed optional group

-

Using

-

using global and case insensitive uses the 'g' and 'i' flags

-

Misc

-

// comment is a single line comment

-

/* comment */ is a multi line comment

-
-
-
-
-{{> footer}} \ No newline at end of file diff --git a/src/docs/tutorial.mustache b/src/docs/tutorial.hbs similarity index 66% rename from src/docs/tutorial.mustache rename to src/docs/tutorial.hbs index de94b0a..96c7f42 100644 --- a/src/docs/tutorial.mustache +++ b/src/docs/tutorial.hbs @@ -1,6 +1,6 @@ {{! Copyright (c) 2021 Patrick Demian; Licensed under MIT }} -{{> header}} +{{> header title="Human2Regex Tutorial" description="Create regular expressions with natural, human language"}}
@@ -12,32 +12,31 @@

1. Your first Match

-

Every language starts with a "Hello World" program, so let's match the output of those programs. Matching is done using the keyword match followed by what you want to match. - +

Every language starts with a "Hello World" program, so let's match the output of those programs. Matching is done using the keyword {{i-code}}match{{end-i-code}} followed by what you want to match. +{{s-code}} match "Hello World" - - The above statement will generate a regular expression that matches "Hello World", like "/Hello World/". Any invalid characters will automatically be escaped, so you don't need to worry about it. H2R also supports block comments with /**/, or line comments with // or # so you can explain why or what you intend to match.

-
/* This is a block comment */
+{{end-s-code}}
+				The above statement will generate a regular expression that matches "Hello World", like "/Hello World/". Any invalid characters will automatically be escaped, so you don't need to worry about it. H2R also supports block comments with {{i-code}}/**/{{end-i-code}}, or line comments with {{i-code}}//{{end-i-code}} or {{i-code}}#{{end-i-code}} so you can explain why or what you intend to match.

+{{p-code}}/* This is a block comment */ match "Hello World" // matches the output of "Hello World" programs -
-

Now what if we want to match every case variation of "Hello World" like "hello world" or "hELLO wORLD"? H2R supports the or operator which allows you to specify many possible combinations. - +{{end-p-code}} +

Now what if we want to match every case variation of "Hello World" like "hello world" or "hELLO wORLD"? H2R supports the {{i-code}}or{{end-i-code}} operator which allows you to specify many possible combinations. +{{s-code}} match "Hello World" or "hello world" or "hELLO wORLD" - - Or, you can use a using statement to specify that you want it to be case insensitive.

+{{end-s-code}} + Or, you can use a {{i-code}}using{{end-i-code}} statement to specify that you want it to be case insensitive.


2. Using Specifiers

Using statements appear at the beginning. You may have one or more using statements which each can contain one or more specifiers. For example: - +{{s-code}} using global and case insensitive matching - +{{end-s-code}} or

-
-using global
+{{p-code}}using global
 using case insensitive
-
-

The matching keyword is optional. The flags which are available are:

+{{end-p-code}} +

The {{i-code}}matching{{end-i-code}} keyword is optional. The flags which are available are:

@@ -49,27 +48,27 @@ using case insensitive - + - + - + - + - + @@ -77,70 +76,69 @@ using case insensitive
multiline{{i-code}}multiline{{end-i-code}} Matches can cross line breaks /<your regex>/m
global{{i-code}}global{{end-i-code}} Multiple matches are allowed /<your regex>/g
case sensitive{{i-code}}case sensitive{{end-i-code}} Match must be exact case none
case insensitive{{i-code}}case insensitive{{end-i-code}} Match may be any case /<your regex>/i
exact{{i-code}}exact{{end-i-code}} An exact statement matches a whole line exactly, nothing before, nothing after /^<your regex>$/

To match any variation of hello world, we would then do the following:

-
using case insensitive matching
+
{{i-code}}using case insensitive matching
 match "hello world"
-
+{{end-p-code}}

3. Matching multiple items

-

H2R comes with 2 options to match multiple items in a row. The first is to simply write multiple separate match statements like:

-
-match "hello"
+				

H2R comes with 2 options to match multiple items in a row. The first is to simply write multiple separate {{i-code}}match{{end-i-code}} statements like:

+{{p-code}}match "hello" match " " match "world" -
-

However, you can also use a comma, and, or then for a more concise match. - +{{end-p-code}} +

However, you can also use a comma, {{i-code}}and{{end-i-code}}, or {{i-code}}then{{end-i-code}} for a more concise match. +{{s-code}} match "hello", " ", "world" - +{{end-s-code}} or - +{{s-code}} match "hello" and " " and "world" - +{{end-s-code}} or - +{{s-code}} match "hello" then " " then "world" - +{{end-s-code}} or any combination like - +{{s-code}} match "hello", " " and then "world" - +{{end-s-code}}

4. Optionality

-

Sometimes you wish to match something that may or may not exist. In H2R, this is done via the optional, optionally, possibly or maybe keyword. - +

Sometimes you wish to match something that may or may not exist. In H2R, this is done via the {{i-code}}optional{{end-i-code}}, {{i-code}}optionally{{end-i-code}}, {{i-code}}possibly{{end-i-code}} or {{i-code}}maybe{{end-i-code}} keyword. +{{s-code}} optionally match "hello world" - - will match 0 or 1 "hello world"'s. This can be used alongside matching multiple statements in a single match statement. - +{{end-s-code}} + will match 0 or 1 "hello world"'s. This can be used alongside matching multiple statements in a single {{i-code}}match{{end-i-code}} statement. +{{s-code}} match "hello", maybe " ", "world" - - will match "hello", an optional space if it exists, and "world". However, the start optional is for the entire match statement. Thus, - +{{end-s-code}} + will match "hello", an optional space if it exists, and "world". However, the start {{i-code}}optional{{end-i-code}} is for the entire match statement. Thus, +{{s-code}} possibly match "hello", " ", then "world" - - will actually make the whole "hello world" an optional match rather than just the first "hello". If you want to make the first match optional but keep the rest required, place the optional immediately after the match.

+{{end-s-code}} + will actually make the whole "hello world" an optional match rather than just the first "hello". If you want to make the first match optional but keep the rest required, place the {{i-code}}optional{{end-i-code}} immediately after the {{i-code}}match{{end-i-code}}.


5. Negation

-

You can negate a match with the operator not - +

You can negate a match with the operator {{i-code}}not{{end-i-code}} +{{s-code}} match not "hello world" - +{{end-s-code}} or - +{{s-code}} match anything but "hello world" - +{{end-s-code}} will match everything except for "hello world".


6. Other matching specifiers

Many times you don't know exactly what you wish to match. H2R comes with many specifiers that you can use for your matching. For example, you may wish to match any word. You can do that with: - +{{s-code}} match a word - - The a or an is optional. The possible specifiers that H2R supports are the following:

+{{end-s-code}} + The {{i-code}}a{{end-i-code}} or {{i-code}}an{{end-i-code}} is optional. The possible specifiers that H2R supports are the following:

@@ -152,71 +150,71 @@ match a word - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -225,111 +223,103 @@ match a word
anything{{i-code}}anything{{end-i-code}} Matches any character .  
word(s){{i-code}}word(s){{end-i-code}} Matches many a-z, A-Z, _, or digit characters \w+For a-z only, use letter(s)For a-z only, use {{i-code}}letter(s){{end-i-code}}
letter(s){{i-code}}letter(s){{end-i-code}} Matches any letter character [a-zA-Z]  
number(s){{i-code}}number(s){{end-i-code}} Matches a string of digit characters \d+  
digit(s){{i-code}}digit(s){{end-i-code}} Matches any digit character \d  
integer(s){{i-code}}integer(s){{end-i-code}} Matches an integer [+-]?\d+  
decimal(s){{i-code}}decimal(s){{end-i-code}} Matches digits, an optional decimal point and more digits [+-]?((\d+[,.]?\d*)|([,.]\d+)) Supports both "," and "." decimal points
character(s){{i-code}}character(s){{end-i-code}} Matches a-z, A-Z, _, or digits \wFor a-z only, use letter(s)For a-z only, use {{i-code}}letter(s){{end-i-code}}
whitespace(s){{i-code}}whitespace(s){{end-i-code}} Matches any whitespace character \s  
(word )boundary{{i-code}}(word )boundary{{end-i-code}} Boundary between a word \b  
line feed/newline{{i-code}}line feed{{end-i-code}}/{{i-code}}newline{{end-i-code}} Matches a newline \n  
carriage return{{i-code}}carriage return{{end-i-code}} Matches a carriage return \r  

You can also create ranges of characters to match. Say for example, you wanted to match any characters between a and z, you could write any of the following: - +{{s-code}} match from "a" to "z" // "from" is optional - +{{end-s-code}} or - +{{s-code}} match between "a" and "z" // "between" is optional - +{{end-s-code}} or - +{{s-code}} match "a" ... "z" // can use "..." or ".." - +{{end-s-code}} or - +{{s-code}} match "a" - "z" - +{{end-s-code}} or - +{{s-code}} match "a" through "z" // can also use thru - +{{end-s-code}}

7. Repetition

-

H2R supports 2 types of repetition: single match repetition, or grouped repetition. When using match you can specify the number of captures you want just before the text to capture. - +

H2R supports 2 types of repetition: single match repetition, or grouped repetition. When using {{i-code}}match{{end-i-code}} you can specify the number of captures you want just before the text to capture. +{{s-code}} match 2 digits - +{{end-s-code}} or - +{{s-code}} match exactly 2 digits - +{{end-s-code}} will match any 2 digits in a row. You can also specify a range you wish to capture - +{{s-code}} match 2 ... 5 digits - +{{end-s-code}} or - +{{s-code}} match 2 to 5 digits - +{{end-s-code}} or - +{{s-code}} match between 2 to 5 digits - - will match 2, 3, 4, or 5 digits. You can specify if the final number is exclusive with the exclusive or inclusive keywords. - +{{end-s-code}} + will match 2, 3, 4, or 5 digits. You can specify if the final number is exclusive with the {{i-code}}exclusive{{end-i-code}} or {{i-code}}inclusive{{end-i-code}} keywords. +{{s-code}} match 2 to 5 exclusive digits - +{{end-s-code}} will only match up to 4 digits. You can also choose to leave the end unspecified. - +{{s-code}} match 2+ digits - +{{end-s-code}} or - +{{s-code}} match 2 or more digits - - will match 2 or more digits. Repeition can be chained with the and then keywords or the optional keyword. For example: - +{{end-s-code}} + will match 2 or more digits. Repeition can be chained with the {{i-code}}and then{{end-i-code}} keywords or the {{i-code}}optional{{end-i-code}} keyword. For example: +{{s-code}} match 1+ digits then optionally "." then optionally 0...8 digits - +{{end-s-code}} - Suppose you want to repeat a group of these match statements. You can group a repetition using the repeat keyword. Everything underneath that is tabbed (scoped) will be repeated. By default, this will match 0 or more of the following statements.

-
-repeat
+				Suppose you want to repeat a group of these match statements. You can group a repetition using the {{i-code}}repeat{{end-i-code}} keyword. Everything underneath that is tabbed (scoped) will be repeated. By default, this will match 0 or more of the following statements.

+{{p-code}}repeat match "Hello " match "World" -
-

Will match 0 or more "Hello "s, but only 1 "World". The same qualifiers that exist for match statements also exist for repeat statements.

-
-optionally repeat 3...7 times
+{{end-p-code}}
+				

Will match 0 or more "Hello "s, but only 1 "World". The same qualifiers that exist for {{i-code}}match{{end-i-code}} statements also exist for {{i-code}}repeat{{end-i-code}} statements.

+{{p-code}}optionally repeat 3...7 times match "Hello World" -
-

Will potentially match "Hello World" between 3 and 7 times. H2R also supports the following for numbers: One, Two, Three, Four, Five, Six, Seven, Eight, Nine, and Ten

+{{end-p-code}} +

Will potentially match "Hello World" between 3 and 7 times. H2R also supports the following for numbers: {{i-code}}One, Two, Three, Four, Five, Six, Seven, Eight, Nine, and Ten{{end-i-code}}


8. Grouping

-

Just like regular expressions, capture groups are supported in H2R. Each group is defined using the create a group keyphrase.

-
-create a group
+				

Just like regular expressions, capture groups are supported in H2R. Each group is defined using the {{i-code}}create a group{{end-i-code}} keyphrase.

+{{p-code}}create a group match "Hello World" -
+{{end-p-code}}

This will create a non-named captured group, equivalent to the regular expression "/(Hello World)/". A non-named captured group will show up in your chosen language's matches, however will not be given a name. To access this match, you will need to know the index of the group. Most regular expression engines support named capture groups, and H2R highly recommends using this feature. If you wish to do so, simply give it a name:

-

-create a group called TestGroup
+{{p-code}}create a group called TestGroup
 	match "Hello World"
-
+{{end-p-code}}

In most languages, a named group can be accessed through the match result's group list. Take for example, in JavaScript, -

-"hello".match(/(?<TestGroup>hello)/).groups
-
+{{p-code}}"hello".match(/(?<TestGroup>hello)/).groups +{{end-p-code}}

Will return an object with {TestGroup: "hello"}. For another example, check out MDN web docs. Groups can also be optional.

-
-create an optional group
+{{p-code}}create an optional group
 	match "Hello World"
-
+{{end-p-code}}

And groups may be nested

-
-create a group called TestGroup
+{{p-code}}create a group called TestGroup
 	match "Hello"
 	create a group called InnerGroup
 		match "World"
-
+{{end-p-code}}

The regular expression returned by this will be "/(?<TestGroup>Hello(?<InnerGroup>World))/". Again, in JavaScript, the following

-
-"HelloWorld".match(/(?<TestGroup>Hello(?<InnerGroup>World))/).groups
-
+{{p-code}}"HelloWorld".match(/(?<TestGroup>Hello(?<InnerGroup>World))/).groups +{{end-p-code}}

Will return an object with {TestGroup: "HelloWorld", InnerGroup: "World"}.


@@ -345,18 +335,18 @@ match "World"

TODO

Unicode character properties

-

You can match specific unicode sequences using "\uXXXX" - or "\UXXXXXXXX" where X is a hexadecimal character. - +

You can match specific unicode sequences using {{i-code}}"\uXXXX" + {{end-i-code}} or {{i-code}}"\UXXXXXXXX"{{end-i-code}} where X is a hexadecimal character. +{{s-code}} match "\u0669" // matches arabic digit 9 "٩" - - Unicode character classes/scripts can be matched using the unicode keyword. - +{{end-s-code}} + Unicode character classes/scripts can be matched using the {{i-code}}unicode{{end-i-code}} keyword. +{{s-code}} match unicode "Latin" // matches any latin character - - +{{end-s-code}} +{{s-code}} match unicode "N" // matches any number character - +{{end-s-code}} The following Unicode class specifiers are available:

diff --git a/src/docs/tutorial.json b/src/docs/tutorial.json deleted file mode 100644 index 2132d71..0000000 --- a/src/docs/tutorial.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": { - "title": "Human2Regex Tutorial", - "description": "Create regular expressions with natural, human language" - } -} \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index c7b41b8..b66213b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,10 +4,10 @@ /* eslint-disable no-undef */ const path = require("path"); const { glob } = require("glob"); -const { render } = require("mustache"); const { readFileSync, writeFileSync, existsSync, mkdirSync } = require("fs"); const { minify } = require("html-minifier"); const CopyPlugin = require("copy-webpack-plugin"); +const Handlebars = require("handlebars"); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); const WebpackBeforeBuildPlugin = require("before-build-webpack"); @@ -32,32 +32,62 @@ const config = { }; -function build_mustache() { - if (!existsSync(config.dst)){ +function build_handlebars() { + if (!existsSync(config.dst)){ mkdirSync(config.dst); - } + } - const read_json_file = (filename) => JSON.parse(readFileSync(filename), "utf8"); + const files = [ + "404.hbs", + "index.hbs", + "tutorial.hbs" + ]; + + const context = { + build: { + prod: config.prod+"", + year: new Date().getFullYear()+"" + } + }; - const compress_html = (input) => config.prod ? minify(input, config.compression_config.html) : input; + // helper functions + const compress_html = (input) => config.prod ? minify(input, config.compression_config.html) : input; - // get views - const files = glob.sync(path.join(config.src, "docs", "*.json")); + Handlebars.registerHelper("i-code", function(options) { + return new Handlebars.SafeString(``); + }); + + Handlebars.registerHelper("s-code", function(options) { + return new Handlebars.SafeString(``); + }); + + Handlebars.registerHelper("p-code", function(options) { + return new Handlebars.SafeString(`
`);
+    });
+
+    Handlebars.registerHelper("end-i-code", function(options) {
+        return new Handlebars.SafeString('');
+    });
+
+    Handlebars.registerHelper("end-s-code", function(options) {
+        return new Handlebars.SafeString('');
+    });
+
+    Handlebars.registerHelper("end-p-code", function(options) {
+        return new Handlebars.SafeString('
'); + }); // get partials - const partials = { - header: readFileSync(path.join(config.src, "docs", "header.mustache"), "utf8"), - footer: readFileSync(path.join(config.src, "docs", "footer.mustache"), "utf8") - }; + Handlebars.registerPartial("header", readFileSync(path.join(config.src, "docs", "header.hbs"), "utf8")); + Handlebars.registerPartial("footer", readFileSync(path.join(config.src, "docs", "footer.hbs"), "utf8")); + Handlebars.registerPartial("example_code", readFileSync(path.join(config.src, "docs", "example_code.hbs"), "utf8")); + + // build handlebar files + for (const filename of files) { + const to = path.join(config.dst, path.basename(filename, ".hbs") + ".html"); + const template = readFileSync(path.join(config.src, "docs", filename), "utf8"); - // build main mustache files - for (const item of files) { - const filename = path.basename(item, ".json"); - const view = read_json_file(item); - const to = path.join(config.dst, filename + ".html"); - const template = readFileSync(path.join(config.src, "docs", filename + ".mustache"), "utf8"); - - writeFileSync(to, compress_html(render(template, view, partials))); + writeFileSync(to, compress_html(Handlebars.compile(template)(context))); } } @@ -84,12 +114,12 @@ module.exports = { plugins: [ new CopyPlugin({ patterns: [ - { from: config.src + "docs/" + "!(*.css|*.mustache|*.json)", to: "", flatten: true} + { from: config.src + "docs/" + "!(*.css|*.hbs)", to: "", flatten: true} ] }), new MiniCssExtractPlugin({ filename: "bundle.min.css" }), new WebpackBeforeBuildPlugin(function(_, callback) { - build_mustache(); + build_handlebars(); callback(); }), new RemovePlugin({ From 011a49158aebd46c432e5edfe1b3fa8efa3e4e53 Mon Sep 17 00:00:00 2001 From: Patrick Demian Date: Sun, 17 Jan 2021 05:21:07 -0500 Subject: [PATCH 11/11] finished ssg and minor bug fixes --- Readme.md | 2 +- config.json | 15 ++ docs/bundle.min.css | 2 +- docs/bundle.min.js | 16 +- docs/tutorial.html | 40 ++++- lib/parser.js | 2 +- lib/tokens.d.ts | 2 +- lib/tokens.js | 6 +- package-lock.json | 110 ++++++++++++ package.json | 1 + src/docs/{ => assets}/CNAME | 0 src/docs/{ => assets}/bootstrap.css | 0 src/docs/{ => assets}/cleanblog.css | 0 src/docs/{ => assets}/codemirror.css | 0 src/docs/{ => assets}/favicon-small.png | Bin src/docs/{ => assets}/favicon.ico | Bin src/docs/{ => assets}/favicon.png | Bin src/docs/{ => assets}/style.css | 22 +++ src/docs/{ => partials}/example_code.hbs | 0 src/docs/{ => partials}/footer.hbs | 0 src/docs/{ => partials}/header.hbs | 0 src/docs/tutorial.hbs | 209 ++++++++++++----------- src/parser.ts | 2 +- src/script.ts | 14 +- src/tokens.ts | 4 +- tests/generator.spec.ts | 4 +- webpack.config.js | 89 ++++------ 27 files changed, 348 insertions(+), 192 deletions(-) create mode 100644 config.json rename src/docs/{ => assets}/CNAME (100%) rename src/docs/{ => assets}/bootstrap.css (100%) rename src/docs/{ => assets}/cleanblog.css (100%) rename src/docs/{ => assets}/codemirror.css (100%) rename src/docs/{ => assets}/favicon-small.png (100%) rename src/docs/{ => assets}/favicon.ico (100%) rename src/docs/{ => assets}/favicon.png (100%) rename src/docs/{ => assets}/style.css (89%) rename src/docs/{ => partials}/example_code.hbs (100%) rename src/docs/{ => partials}/footer.hbs (100%) rename src/docs/{ => partials}/header.hbs (100%) diff --git a/Readme.md b/Readme.md index a3b124c..475fe4d 100644 --- a/Readme.md +++ b/Readme.md @@ -84,4 +84,4 @@ The API reference is available [here](API.md) - Add more regex options such as subroutines~~, conditions, and lookahead/behind~~ - Fix error messages (They sometimes point to the wrong location, off by 1 errors, etc) - Add more useful lex/parse errors (What even is an EarlyExitException?) -- Use a different/better static site generation method \ No newline at end of file +- ~~Use a different/better static site generation method~~ \ No newline at end of file diff --git a/config.json b/config.json new file mode 100644 index 0000000..211ddb5 --- /dev/null +++ b/config.json @@ -0,0 +1,15 @@ +{ + "prod": true, + "dst": "./docs/", + "src": "./src/", + "compression_config": { + "html": { + "collapseWhitespace": true, + "minifyCSS": true, + "minifyJS": true, + "removeComments": true, + "removeEmptyAttributes": true, + "removeRedundantAttributes": true + } + } +} \ No newline at end of file diff --git a/docs/bundle.min.css b/docs/bundle.min.css index 3de55f8..dfb8c51 100644 --- a/docs/bundle.min.css +++ b/docs/bundle.min.css @@ -10,4 +10,4 @@ * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-clean-blog/blob/master/LICENSE) */body{font-size:20px;color:#212529}p{line-height:1.5}p a{text-decoration:underline}@media (max-width:575px){.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline label{-ms-flex-align:center;-ms-flex-pack:center;justify-content:center}.form-inline .form-group,.form-inline label{display:-ms-flexbox;display:flex;align-items:center;margin-bottom:0}.form-inline .form-group{-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center}}h1,h2,h3,h4,h5,h6{font-weight:800;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif}::-moz-selection{color:#fff;background:#0085a1;text-shadow:none}::selection{color:#fff;background:#0085a1;text-shadow:none}#mainNav{position:absolute;border-bottom:1px solid transparent;background-color:#232323;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif}#mainNav .navbar-brand{font-weight:800}@media only screen and (max-width:991px){#mainNav{position:fixed}}#mainNav .navbar-brand{padding-left:20px;color:#fff}#mainNav .navbar-brand:focus,#mainNav .navbar-brand:hover{color:hsla(0,0%,100%,.8)}@media only screen and (min-width:992px){#mainNav .navbar-brand{padding-top:10px}}.wrapper{display:flex;flex-direction:column;height:100vh}#maincontent{flex:1 0 auto}footer{flex-shrink:0;width:100%;right:0;left:0;padding:20px 0;background-color:#232323;color:#fff}.copyright{font-size:14px;margin-bottom:0;text-align:center}.btn{font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif}.btn-lg{font-size:16px;padding:25px 35px}.CodeMirror{height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5)}.cm-animate-fat-cursor,.cm-fat-cursor-mark{-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-idea span.cm-meta{color:olive}.cm-s-idea span.cm-number{color:#00f}.cm-s-idea span.cm-keyword{line-height:1em;font-weight:700;color:navy}.cm-s-idea span.cm-atom{font-weight:700;color:navy}.cm-s-idea span.cm-def,.cm-s-idea span.cm-operator,.cm-s-idea span.cm-property,.cm-s-idea span.cm-type,.cm-s-idea span.cm-variable,.cm-s-idea span.cm-variable-2,.cm-s-idea span.cm-variable-3{color:#000}.cm-s-idea span.cm-comment{color:grey}.cm-s-idea span.cm-string,.cm-s-idea span.cm-string-2{color:green}.cm-s-idea span.cm-qualifier{color:#555}.cm-s-idea span.cm-error{color:red}.cm-s-idea span.cm-attribute{color:#00f}.cm-s-idea span.cm-tag{color:navy}.cm-s-idea span.cm-link{color:#00f}.cm-s-idea .CodeMirror-activeline-background{background:#fffae3}.cm-s-idea span.cm-builtin{color:#30a}.cm-s-idea span.cm-bracket{color:#cc7}.cm-s-idea{font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif}.cm-s-idea .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important}.CodeMirror-hints.idea{font-family:Menlo,Monaco,Consolas,Courier New,monospace;color:#616569;background-color:#ebf3fd!important}.CodeMirror-hints.idea .CodeMirror-hint-active{background-color:#a2b8c9!important;color:#5c6065!important}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:#ffd;border:1px solid #000;border-radius:4px 4px 4px 4px;color:#000;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark{background-position:0 100%;background-repeat:repeat-x}.CodeMirror-lint-mark-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=")}.CodeMirror-lint-mark-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")}.CodeMirror-lint-marker{background-position:50%;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message{padding-left:18px;background-position:0 0;background-repeat:no-repeat}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=")}.CodeMirror-lint-marker-multiple{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:100% 100%;width:100%;height:100%} -/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */.align_header{text-align:center;margin-bottom:20px}.tenpx-margin-bottom{margin-bottom:10px}h4{margin-top:10px}.cheatsheet{height:100%;padding:10px;border-radius:10px;border:1px solid #ced4da}p{font-size:16px!important}.cheatsheet p{line-height:1!important}.zero-margin-bottom{margin-bottom:0}#maincontent{margin-top:75px}.skip-top{top:10px;margin:10px 40%!important}.skip{background:#335075!important;color:#fff!important;position:absolute!important;clip:rect(1px,1px,1px,1px);float:left;margin-left:20%}.skip:active,.skip:focus{font-weight:700;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;display:block;text-decoration:underline;padding:5px;top:auto;min-width:20%;text-align:center;z-index:10000}a:hover{color:#208bff}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.54)}.navbar{padding:0!important}#errors{resize:none}#errors,.CodeMirror{background-color:#fff}.CodeMirror{box-sizing:border-box;margin:0;font:inherit;overflow:auto;font-family:inherit;display:block;width:100%;padding:6px;font-size:14px;line-height:1.42857143;color:#555;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);font-family:monospace;position:relative;overflow:hidden;resize:vertical;height:400px}.CodeMirror,.CodeMirror-focused{transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.CodeMirror-focused{border-color:#80bdff;outline:0;box-shadow:0 0 .2rem rgba(102,175,233,.6)}code{font-style:italic!important}.tutorial-code{display:block;padding-left:20px;margin-top:10px;margin-bottom:10px;font-size:16px!important;white-space:pre;background-color:rgb(0 0 0/.05);overflow:auto}@media (min-width:576px){.contained-container{max-width:540px}}@media (min-width:768px){.contained-container{max-width:720px}}@media (min-width:992px){.contained-container{max-width:960px}}@media (min-width:1200px){.contained-container{max-width:1140px}}td{font-size:16px}pre code{font-size:87.5%}.heading-links{color:#fff;padding-right:10px}.heading-link{color:#fff}.heading-link:focus,.heading-link:hover{color:hsla(0,0%,100%,.8)} \ No newline at end of file +/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */.align_header{text-align:center;margin-bottom:20px}.tenpx-margin-bottom{margin-bottom:10px}h4{margin-top:10px}.cheatsheet{height:100%;padding:10px;border-radius:10px;border:1px solid #ced4da}p{font-size:16px!important}.cheatsheet p{line-height:1!important}.zero-margin-bottom{margin-bottom:0}#maincontent{margin-top:75px}.skip-top{top:10px;margin:10px 40%!important}.skip{background:#335075!important;color:#fff!important;position:absolute!important;clip:rect(1px,1px,1px,1px);float:left;margin-left:20%}.skip:active,.skip:focus{font-weight:700;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;display:block;text-decoration:underline;padding:5px;top:auto;min-width:20%;text-align:center;z-index:10000}a:hover{color:#208bff}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.54)}.navbar{padding:0!important}#errors{resize:none}#errors,.CodeMirror{background-color:#fff}.CodeMirror{box-sizing:border-box;margin:0;font:inherit;overflow:auto;font-family:inherit;display:block;width:100%;padding:6px;font-size:14px;line-height:1.42857143;color:#555;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);font-family:monospace;position:relative;overflow:hidden;resize:vertical;height:400px}.CodeMirror,.CodeMirror-focused{transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.CodeMirror-focused{border-color:#80bdff;outline:0;box-shadow:0 0 .2rem rgba(102,175,233,.6)}code{font-style:italic!important}.tutorial-code{display:block;padding-left:20px;margin-top:10px;margin-bottom:10px;font-size:16px!important;white-space:pre;background-color:rgb(0 0 0/.05);overflow:auto}@media (min-width:576px){.contained-container{max-width:540px}}@media (min-width:768px){.contained-container{max-width:720px}}@media (min-width:992px){.contained-container{max-width:960px}}@media (min-width:1200px){.contained-container{max-width:1140px}}td{font-size:16px}pre code{font-size:87.5%}.heading-links{color:#fff;padding-right:10px}.heading-link{color:#fff}.heading-link:focus,.heading-link:hover{color:hsla(0,0%,100%,.8)}.tut-contents{display:table;border:1px solid #a2a9b1;background-color:#f8f9fa;padding:5px;font-size:16px!important}.tut-title{text-align:center;font-weight:700}.tut-contents li{list-style-type:none}.tut-contents>ul{margin-top:0;padding-left:0;margin-left:.5em;margin-right:.5em} \ No newline at end of file diff --git a/docs/bundle.min.js b/docs/bundle.min.js index 204a3ed..3da80eb 100644 --- a/docs/bundle.min.js +++ b/docs/bundle.min.js @@ -1,8 +1,8 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(t,e,n){"use strict";function r(t){return t&&0===t.length}function i(t){return null==t?[]:Object.keys(t)}function o(t){for(var e=[],n=Object.keys(t),r=0;r=this.input.length)throw Error("Unexpected end of input");this.idx++},t.prototype.loc=function(t){return{begin:t,end:this.idx}};var e,n=/[0-9a-fA-F]/,r=/[0-9]/,i=/[1-9]/;function o(t){return t.charCodeAt(0)}function a(t,e){void 0!==t.length?t.forEach((function(t){e.push(t)})):e.push(t)}function s(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e]=!0}function l(t){if(void 0===t)throw Error("Internal Error - Should never get here!")}var c=[];for(e=o("0");e<=o("9");e++)c.push(e);var u=[o("_")].concat(c);for(e=o("a");e<=o("z");e++)u.push(e);for(e=o("A");e<=o("Z");e++)u.push(e);var h=[o(" "),o("\f"),o("\n"),o("\r"),o("\t"),o("\v"),o("\t"),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o("\u2028"),o("\u2029"),o(" "),o(" "),o(" "),o("\ufeff")];function f(){}return f.prototype.visitChildren=function(t){for(var e in t){var n=t[e];t.hasOwnProperty(e)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((function(t){this.visit(t)}),this))}},f.prototype.visit=function(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)},f.prototype.visitPattern=function(t){},f.prototype.visitFlags=function(t){},f.prototype.visitDisjunction=function(t){},f.prototype.visitAlternative=function(t){},f.prototype.visitStartAnchor=function(t){},f.prototype.visitEndAnchor=function(t){},f.prototype.visitWordBoundary=function(t){},f.prototype.visitNonWordBoundary=function(t){},f.prototype.visitLookahead=function(t){},f.prototype.visitNegativeLookahead=function(t){},f.prototype.visitCharacter=function(t){},f.prototype.visitSet=function(t){},f.prototype.visitGroup=function(t){},f.prototype.visitGroupBackReference=function(t){},f.prototype.visitQuantifier=function(t){},{RegExpParser:t,BaseRegExpVisitor:f,VERSION:"0.5.0"}})?r.apply(e,i):r)||(t.exports=o)},function(t,e,n){"use strict"; -/*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */Object.defineProperty(e,"__esModule",{value:!0}),e.CommonError=e.append=e.regexEscape=e.removeQuotes=e.findLastIndex=e.last=e.first=e.isSingleRegexCharacter=e.combineFlags=e.hasFlag=e.makeFlag=e.usefulConditional=e.unusedParameter=void 0,e.unusedParameter=function(t,e){},e.usefulConditional=function(t,e){return Boolean(t)},e.makeFlag=function(t){return 1<=0;n--)if(t[n]===e)return n;return-1},e.removeQuotes=function(t){return t.substring(1,t.length-1)},e.regexEscape=function(t){return t.replace(/([:\\\-\.\[\]\^\|\(\)\*\+\?\{\}\$\/])/g,"\\$1")},e.append=function(t,...e){for(const n of e)for(const e of n)t.push(e)};class r{constructor(t,e,n,r,i){this.type=t,this.start_line=e,this.start_column=n,this.length=r,this.message=i}static fromLexError(t){const e=t.message.replace(/(--?>|<--?)/g,"");return new r("Lexer Error",t.line,t.column,t.length,e)}static fromParseError(t){var e,n,i;const o=t.name+" - "+t.message.replace(/(--?>|<--?)/g,"");return new r("Parser Error",null!==(e=t.token.startLine)&&void 0!==e?e:NaN,null!==(n=t.token.startColumn)&&void 0!==n?n:NaN,null!==(i=t.token.endOffset)&&void 0!==i?i:NaN-t.token.startOffset,o)}static fromSemanticError(t){return new r("Semantic Error",t.startLine,t.startColumn,t.length,t.message)}toString(){return`${this.type} @ (${this.start_line}, ${this.start_column}): ${this.message}`}}e.CommonError=r},function(t,e,n){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),h=/Opera\//.test(t),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),d=/PhantomJS/.test(t),m=f&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),g=/Android/.test(t),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=m||/Mac/.test(e),b=/\bCrOS\b/.test(t),T=/win/i.test(e),O=h&&t.match(/Version\/(\d*\.\d*)/);O&&(O=Number(O[1])),O&&O>=15&&(h=!1,l=!0);var S=y&&(c||h&&(null==O||O<12.11)),x=n||a&&s>=9;function E(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var C,k=function(t,e){var n=t.className,r=E(e).exec(n);if(r){var i=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function N(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function w(t,e){return N(t).appendChild(e)}function L(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}}m?P=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(P=function(t){try{t.select()}catch(t){}});var F=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function W(t,e){for(var n=0;n=e)return r+Math.min(a,e-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=e)return r}}var K=[""];function Y(t){for(;K.length<=t;)K.push($(K)+" ");return K[t]}function $(t){return t[t.length-1]}function X(t,e){for(var n=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||J.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&Q(t))||e.test(t):Q(t)}function et(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var nt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function rt(t){return t.charCodeAt(0)>=768&&nt.test(t)}function it(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var i=(e+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+r}}var at=null;function st(t,e,n){var r;at=null;for(var i=0;ie)return i;o.to==e&&(o.from!=o.to&&"before"==n?r=i:at=i),o.from==e&&(o.from!=o.to&&"before"!=n?r=i:at=i)}return null!=r?r:at}var lt=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(t,e,n){this.level=t,this.from=e,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!t.test(a))return!1;for(var c,u=a.length,h=[],f=0;f-1&&(r[e]=i.slice(0,o).concat(i.slice(o+1)))}}}function dt(t,e){var n=ft(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){pt(this,t,e)}}function bt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Tt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ot(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function St(t){bt(t),Tt(t)}function xt(t){return t.target||t.srcElement}function Et(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var Ct,kt,Nt=function(){if(a&&s<9)return!1;var t=L("div");return"draggable"in t||"dragDrop"in t}();function wt(t){if(null==Ct){var e=L("span","​");w(t,L("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Ct=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var n=Ct?L("span","​"):L("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Lt(t){if(null!=kt)return kt;var e=w(t,document.createTextNode("AخA")),n=C(e,0,1).getBoundingClientRect(),r=C(e,1,2).getBoundingClientRect();return N(t),!(!n||n.left==n.right)&&(kt=r.right-n.right<3)}var At,It=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var o=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=i+1)}return n}:function(t){return t.split(/\r\n?|\n/)},Rt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Mt="oncopy"in(At=L("div"))||(At.setAttribute("oncopy","return;"),"function"==typeof At.oncopy),_t=null,Pt={},jt={};function Dt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Pt[t]=e}function Ut(t){if("string"==typeof t&&jt.hasOwnProperty(t))t=jt[t];else if(t&&"string"==typeof t.name&&jt.hasOwnProperty(t.name)){var e=jt[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ut("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ut("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Ft(t,e){e=Ut(e);var n=Pt[e.name];if(!n)return Ft(t,"text/plain");var r=n(t,e);if(Wt.hasOwnProperty(e.name)){var i=Wt[e.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)r[a]=e.modeProps[a];return r}var Wt={};function Bt(t,e){D(e,Wt.hasOwnProperty(t)?Wt[t]:Wt[t]={})}function Ht(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Gt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function zt(t,e,n){return!t.startState||t.startState(e,n)}var Vt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Kt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e=t.first&&en?te(n,Kt(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?te(t.line,e):n<0?te(t.line,0):t}(e,Kt(t,e.line).text.length)}function le(t,e){for(var n=[],r=0;r=this.string.length},Vt.prototype.sol=function(){return this.pos==this.lineStart},Vt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vt.prototype.next=function(){if(this.pose},Vt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Vt.prototype.skipToEnd=function(){this.pos=this.string.length},Vt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Vt.prototype.backUp=function(t){this.pos-=t},Vt.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var i=function(t){return n?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},Vt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Vt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Vt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ce=function(t,e){this.state=t,this.lookAhead=e},ue=function(t,e,n,r){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function he(t,e,n,r){var i=[t.state.modeGen],o={};Te(t,e.text,t.doc.mode,n,(function(t,e){return i.push(t,e)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=t.state.overlays[r],l=1,c=0;n.state=!0,Te(t,e.text,s.mode,n,(function(t,e){for(var n=l;ct&&i.splice(l,1,t,i[l+1],r),l+=2,c=Math.min(t,r)}if(e)if(s.opaque)i.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&Ht(t.doc.mode,r.state),o=he(t,e,r);i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function pe(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return new ue(r,!0,e);var o=function(t,e,n){for(var r,i,o=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=o.first)return o.first;var l=Kt(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ce?c.lookAhead:0)<=o.modeFrontier))return s;var u=U(l.text,null,t.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(t,e,n),a=o>r.first&&Kt(r,o-1).stateAfter,s=a?ue.fromSaved(r,a,o):new ue(r,zt(r.mode),o);return r.iter(o,e,(function(n){de(t,n.text,s);var r=s.line;n.stateAfter=r==e-1||r%5==0||r>=i.viewFrom&&re.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}ue.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ue.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(t,e,n){return e instanceof ce?new ue(t,Ht(t.mode,e.state),n,e.lookAhead):new ue(t,Ht(t.mode,e),n)},ue.prototype.save=function(t){var e=!1!==t?Ht(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(e,this.maxLookAhead):e};var ve=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function ye(t,e,n,r){var i,o,a=t.doc,s=a.mode,l=Kt(a,(e=se(a,e)).line),c=pe(t,e.line,n),u=new Vt(l.text,t.options.tabSize,c);for(r&&(o=[]);(r||u.post.options.maxHighlightLength?(s=!1,a&&de(t,e,r,h.pos),h.pos=e.length,l=null):l=be(ge(n,h,r.state,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c=e:o.to>e);(r||(r=[])).push(new xe(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(t,e,n){var r;if(t)for(var i=0;i=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from0&&s)for(var b=0;be)&&(!n||Re(n,o.marker)<0)&&(n=o.marker)}return n}function De(t,e,n,r,i){var o=Kt(t,e),a=Se&&o.markedSpans;if(a)for(var s=0;s=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ee(c.to,n)>=0:ee(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ee(c.from,r)<=0:ee(c.from,r)<0)))return!0}}}function Ue(t){for(var e;e=_e(t);)t=e.find(-1,!0).line;return t}function Fe(t,e){var n=Kt(t,e),r=Ue(n);return n==r?e:qt(r)}function We(t,e){if(e>t.lastLine())return e;var n,r=Kt(t,e);if(!Be(t,r))return e;for(;n=Pe(r);)r=n.find(1,!0).line;return qt(r)+1}function Be(t,e){var n=Se&&e.markedSpans;if(n)for(var r=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var Ke=function(t,e,n){this.text=t,Le(this,e),this.height=n?n(this):1};function Ye(t){t.parent=null,we(t)}Ke.prototype.lineNo=function(){return qt(this)},yt(Ke);var $e={},Xe={};function qe(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Xe:$e;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var n=A("span",null,null,l?"padding-right: .1px":null),r={pre:A("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var o=i?e.rest[i-1]:e.line,a=void 0;r.pos=0,r.addToken=Qe,Lt(t.display.measure)&&(a=ct(o,t.doc.direction))&&(r.addToken=tn(r.addToken,a)),r.map=[],nn(o,r,fe(t,o,e!=t.display.externalMeasured&&qt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=_(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=_(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(wt(t.display.measure))),0==i?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return dt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=_(r.pre.className,r.textClass||"")),r}function Je(t){var e=L("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Qe(t,e,n,r,i,o,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",i=0;ic&&h.from<=c);f++);if(h.to>=u)return t(n,r,i,o,a,s,l);t(n,r.slice(0,h.to-c),i,o,null,s,l),o=null,r=r.slice(h.to-c),c=h.to}}}function en(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function nn(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var a,s,l,c,u,h,f,p=i.length,d=0,m=1,g="",v=0;;){if(v==d){l=c=u=s="",f=null,h=null,v=1/0;for(var y=[],b=void 0,T=0;Td||S.collapsed&&O.to==d&&O.from==d)){if(null!=O.to&&O.to!=d&&v>O.to&&(v=O.to,c=""),S.className&&(l+=" "+S.className),S.css&&(s=(s?s+";":"")+S.css),S.startStyle&&O.from==d&&(u+=" "+S.startStyle),S.endStyle&&O.to==v&&(b||(b=[])).push(S.endStyle,O.to),S.title&&((f||(f={})).title=S.title),S.attributes)for(var x in S.attributes)(f||(f={}))[x]=S.attributes[x];S.collapsed&&(!h||Re(h.marker,S)<0)&&(h=O)}else O.from>d&&v>O.from&&(v=O.from)}if(b)for(var E=0;E=p)break;for(var k=Math.min(p,v);;){if(g){var N=d+g.length;if(!h){var w=N>k?g.slice(0,k-d):g;e.addToken(e,w,a?a+l:l,u,d+w.length==v?c:"",s,f)}if(N>=k){g=g.slice(k-d),d=k;break}d=N,u=""}g=i.slice(o,o=n[m++]),a=qe(n[m++],e.cm.options)}}else for(var L=1;Ln)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function An(t,e,n,r){return Mn(t,Rn(t,e),n,r)}function In(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&e2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,r){var i,o=jn(e.map,n,r),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&rt(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,i))}else{var p;c>0&&(h=r="right"),i=t.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var d=l.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+ir(t.display),top:d.top,bottom:d.bottom}:Pn}for(var m=i.top-e.rect.top,g=i.bottom-e.rect.top,v=(m+g)/2,y=e.view.measure.heights,b=0;be)&&(i=(o=l-s)-1,e>=l&&(a="right")),null!=i){if(r=t[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=t[i]).left==n.right;i--);return n}function Un(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(t,e,n){return a(n?t-1:t,1==s[e].level!=n)}var h=st(s,l,c),f=at,p=u(l,h,"before"==c);return null!=f&&(p.other=u(l,f,"before"!=c)),p}function $n(t,e){var n=0;e=se(t.doc,e),t.options.lineWrapping||(n=ir(t.display)*e.ch);var r=Kt(t.doc,e.line),i=Ge(r)+xn(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Xn(t,e,n,r,i){var o=te(t,e,n);return o.xRel=i,r&&(o.outside=r),o}function qn(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return Xn(r.first,0,null,-1,-1);var i=Zt(r,n),o=r.first+r.size-1;if(i>o)return Xn(r.first+r.size-1,Kt(r,o).text.length,null,1,1);e<0&&(e=0);for(var a=Kt(r,i);;){var s=tr(t,a,i,e,n),l=je(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Kt(r,i=c.line)}}function Zn(t,e,n,r){r-=Gn(e);var i=e.text.length,o=ot((function(e){return Mn(t,n,e-1).bottom<=r}),i,0);return{begin:o,end:i=ot((function(e){return Mn(t,n,e).top>r}),o,i)}}function Jn(t,e,n,r){return n||(n=Rn(t,e)),Zn(t,e,n,zn(t,e,Mn(t,n,r),"line").top)}function Qn(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function tr(t,e,n,r,i){i-=Ge(e);var o=Rn(t,e),a=Gn(e),s=0,l=e.text.length,c=!0,u=ct(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?nr:er)(t,e,n,o,u,r,i);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var f,p,d=null,m=null,g=ot((function(e){var n=Mn(t,o,e);return n.top+=a,n.bottom+=a,!!Qn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(d=e,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left=T.bottom?1:0}return Xn(n,g=it(e.text,g,1),p,v,r-f)}function er(t,e,n,r,i,o,a){var s=ot((function(s){var l=i[s],c=1!=l.level;return Qn(Yn(t,te(n,c?l.to:l.from,c?"before":"after"),"line",e,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Yn(t,te(n,c?l.from:l.to,c?"after":"before"),"line",e,r);Qn(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function nr(t,e,n,r,i,o,a){var s=Zn(t,e,r,a),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,f=0;f=c||p.to<=l)){var d=Mn(t,r,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=dm)&&(u=p,h=m)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function rr(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==_n){_n=L("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)_n.appendChild(document.createTextNode("x")),_n.appendChild(L("br"));_n.appendChild(document.createTextNode("x"))}w(t.measure,_n);var n=_n.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),N(t.measure),n||1}function ir(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=L("span","xxxxxxxxxx"),n=L("pre",[e],"CodeMirror-line-like");w(t.measure,n);var r=e.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function or(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ar(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function ar(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function sr(t){var e=rr(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/ir(t.display)-3);return function(i){if(Be(t.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(l=Kt(t.doc,c.line).text).length==c.ch){var u=U(l,l.length,t.options.tabSize)-l.length;c=te(c.line,Math.max(0,Math.round((o-Cn(t.display).left)/ir(t.display))-u))}return c}function ur(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;re)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Se&&Fe(t.doc,e)i.viewFrom?pr(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)pr(t);else if(e<=i.viewFrom){var o=dr(t,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):pr(t)}else if(n>=i.viewTo){var a=dr(t,e,e,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):pr(t)}else{var s=dr(t,e,e,-1),l=dr(t,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(on(t,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):pr(t)}var c=i.externalMeasured;c&&(n=i.lineN&&e=r.viewTo)){var o=r.view[ur(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==W(a,n)&&a.push(n)}}}function pr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function dr(t,e,n,r){var i,o=ur(t,e),a=t.display.view;if(!Se||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=t.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-e,o++}else i=s-e;e+=i,n+=i}for(;Fe(t.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function mr(t){for(var e=t.display.view,n=0,r=0;r=t.display.viewTo||s.to().linee||e==n&&a.to==e)&&(r(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(e,n,"ltr")}(m,n||0,null==r?f:r,(function(t,e,i,h){var g="ltr"==i,v=p(t,g?"left":"right"),y=p(e-1,g?"right":"left"),b=null==n&&0==t,T=null==r&&e==f,O=0==h,S=!m||h==m.length-1;if(y.top-v.top<=3){var x=(c?T:b)&&S,E=(c?b:T)&&O?s:(g?v:y).left,C=x?l:(g?y:v).right;u(E,v.top,C-E,v.bottom)}else{var k,N,w,L;g?(k=c&&b&&O?s:v.left,N=c?l:d(t,i,"before"),w=c?s:d(e,i,"after"),L=c&&T&&S?l:y.right):(k=c?d(t,i,"before"):s,N=!c&&b&&O?l:v.right,w=!c&&T&&S?s:y.left,L=c?d(e,i,"after"):l),u(k,v.top,N-k,v.bottom),v.bottom0?e.blinker=setInterval((function(){t.hasFocus()||Cr(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Sr(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||Er(t))}function xr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&Cr(t))}),100)}function Er(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(dt(t,"focus",t,e),t.state.focused=!0,M(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Or(t))}function Cr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(dt(t,"blur",t,e),t.state.focused=!1,k(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function kr(t){for(var e=t.display,n=e.lineDiv.offsetTop,r=0;r.005||f<-.005)&&(Xt(i.line,l),Nr(i.line),i.rest))for(var p=0;pt.display.sizerWidth){var d=Math.ceil(c/ir(t.display));d>t.display.maxLineLength&&(t.display.maxLineLength=d,t.display.maxLine=i.line,t.display.maxLineChanged=!0)}}}}function Nr(t){if(t.widgets)for(var e=0;e=a&&(o=Zt(e,Ge(Kt(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Lr(t,e){var n=t.display,r=rr(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=wn(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var s=t.doc.height+En(n),l=e.tops-r;if(e.topi+o){var u=Math.min(e.top,(c?s:e.bottom)-o);u!=i&&(a.scrollTop=u)}var h=t.options.fixedGutter?0:n.gutters.offsetWidth,f=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-h,p=Nn(t)-n.gutters.offsetWidth,d=e.right-e.left>p;return d&&(e.right=e.left+p),e.left<10?a.scrollLeft=0:e.leftp+f-3&&(a.scrollLeft=e.right+(d?0:10)-p),a}function Ar(t,e){null!=e&&(Mr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Ir(t){Mr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Rr(t,e,n){null==e&&null==n||Mr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Mr(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,_r(t,$n(t,e.from),$n(t,e.to),e.margin))}function _r(t,e,n,r){var i=Lr(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});Rr(t,i.scrollLeft,i.scrollTop)}function Pr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||li(t,{top:e}),jr(t,e,!0),n&&li(t),ri(t,100))}function jr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Dr(t,e,n,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,hi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Ur(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+En(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+kn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var Fr=function(t,e,n){this.cm=n;var r=this.vert=L("div",[L("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=L("div",[L("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),ht(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),ht(i,"scroll",(function(){i.clientWidth&&e(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var i=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},Fr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var t=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new F,this.disableVert=new F},Fr.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,(function r(){var i=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)}))},Fr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Wr=function(){};function Br(t,e){e||(e=Ur(t));var n=t.display.barWidth,r=t.display.barHeight;Hr(t,e);for(var i=0;i<4&&n!=t.display.barWidth||r!=t.display.barHeight;i++)n!=t.display.barWidth&&t.options.lineWrapping&&kr(t),Hr(t,Ur(t)),n=t.display.barWidth,r=t.display.barHeight}function Hr(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Wr.prototype.update=function(){return{bottom:0,right:0}},Wr.prototype.setScrollLeft=function(){},Wr.prototype.setScrollTop=function(){},Wr.prototype.clear=function(){};var Gr={native:Fr,null:Wr};function zr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&k(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Gr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?Dr(t,e):Pr(t,e)}),t),t.display.scrollbars.addClass&&M(t.display.wrapper,t.display.scrollbars.addClass)}var Vr=0;function Kr(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vr},e=t.curOp,an?an.ops.push(e):e.ownsGroup=an={ops:[e],delayedCallbacks:[]}}function Yr(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new oi(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Xr(t){t.updatedDisplay=t.mustUpdate&&ai(t.cm,t.update)}function qr(t){var e=t.cm,n=e.display;t.updatedDisplay&&kr(e),t.barMeasure=Ur(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=An(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+kn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Nn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Zr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!d){var o=L("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-xn(t.display))+"px;\n height: "+(e.bottom-e.top+kn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(i),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,n,r){var i;null==r&&(r=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?te(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?te(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,s=Yn(t,e),l=n&&n!=e?Yn(t,n):s,c=Lr(t,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Pr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Dr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(a=!0)),!a)break}return i}(e,se(r,t.scrollToPos.from),se(r,t.scrollToPos.to),t.scrollToPos.margin));var i=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(i)for(var a=0;a=t.display.viewTo)){var n=+new Date+t.options.workTime,r=pe(t,e.highlightFrontier),i=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(r.line>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength?Ht(e.mode,r.state):null,l=he(t,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!h&&fn)return ri(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),i.length&&Qr(t,(function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(t))return!1;fi(t)&&(pr(t),e.dims=or(t));var i=r.first+r.size,o=Math.max(e.visible.from-t.options.viewportMargin,r.first),a=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Se&&(o=Fe(t.doc,o),a=We(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=on(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=on(t,e,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,ur(t,n)))),r.viewTo=n}(t,o,a),n.viewOffset=Ge(Kt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=mr(t);if(!s&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=R();if(!e||!I(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&I(t.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var r=t.display,i=t.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=r.view,u=r.viewFrom,h=0;h-1&&(p=!1),un(t,f,u,n)),p&&(N(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Qt(t.options,u)))),a=f.node.nextSibling}else{var d=vn(t,f,u,n);o.insertBefore(d,a)}u+=f.size}for(;a;)a=s(a)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=R()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&I(document.body,t.anchorNode)&&I(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),N(n.cursorDiv),N(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,ri(t,400)),n.updateLineNumbers=null,!0}function si(t,e){for(var n=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Nn(t))r&&(e.visible=wr(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+En(t.display)-wn(t),n.top)}),e.visible=wr(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!ai(t,e))break;kr(t);var i=Ur(t);gr(t),Br(t,i),ui(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function li(t,e){var n=new oi(t,e);if(ai(t,n)){kr(t),si(t,n);var r=Ur(t);gr(t),Br(t,r),ui(t,r),n.finish()}}function ci(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function ui(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+kn(t)+"px"}function hi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=ar(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)t:for(var f=e.target,p=a.view;f!=s;f=f.parentNode)for(var d=0;d=0&&ee(t,r.to())<=0)return n}return-1};var xi=function(t,e){this.anchor=t,this.head=e};function Ei(t,e,n){var r=t&&t.options.selectionsMayTouch,i=e[n];e.sort((function(t,e){return ee(t.from(),e.from())})),n=W(e,i);for(var o=1;o0:l>=0){var c=oe(s.from(),a.from()),u=ie(s.to(),a.to()),h=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,e.splice(--o,2,new xi(h?u:c,h?c:u))}}return new Si(e,n)}function Ci(t,e){return new Si([new xi(t,e||t)],0)}function ki(t){return t.text?te(t.from.line+t.text.length-1,$(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Ni(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return ki(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=ki(e).ch-e.to.ch),te(n,r)}function wi(t,e){for(var n=[],r=0;r1&&t.remove(s.line+1,d-1),t.insert(s.line+1,v)}ln(t,"change",t,e)}function _i(t,e,n){!function t(r,i,o){if(r.linked)for(var a=0;as-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(Fi(t.done),$(t.done)):t.done.length&&!$(t.done).ranges?$(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),$(t.done)):void 0}(i,i.lastOp==r)))a=$(o.changes),0==ee(e.from,e.to)&&0==ee(e.from,a.to)?a.to=ki(e):o.changes.push(Ui(t,e));else{var l=$(i.done);for(l&&l.ranges||Hi(t.sel,i.done),o={changes:[Ui(t,e)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,a||dt(t,"historyAdded")}function Bi(t,e,n,r){var i=t.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(t,e,n,r){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,$(i.done),e))?i.done[i.done.length-1]=e:Hi(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Fi(i.undone)}function Hi(t,e){var n=$(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Gi(t,e,n,r){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),(function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=n.markedSpans),++o}))}function zi(t){if(!t)return null;for(var e,n=0;n-1&&($(s)[h]=c[h],delete c[h])}}}return r}function Yi(t,e,n,r){if(r){var i=t.anchor;if(n){var o=ee(e,i)<0;o!=ee(n,i)<0?(i=e,e=n):o!=ee(e,n)<0&&(e=n)}return new xi(i,e)}return new xi(n||e,e)}function $i(t,e,n,r,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),Qi(t,new Si([Yi(t.sel.primary(),e,n,i)],0),r)}function Xi(t,e,n){for(var r=[],i=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:s.to>e.ch))){if(i&&(dt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var h=l.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(h=ao(t,h,-r,h&&h.line==e.line?o:null)),h&&h.line==e.line&&(f=ee(h,n))&&(r<0?f<0:f>0))return io(t,h,e,r,i)}var p=l.find(r<0?-1:1);return(r<0?c:u)&&(p=ao(t,p,r,p.line==e.line?o:null)),p?io(t,p,e,r,i):null}}return e}function oo(t,e,n,r,i){var o=r||1,a=io(t,e,n,o,i)||!i&&io(t,e,n,o,!0)||io(t,e,n,-o,i)||!i&&io(t,e,n,-o,!0);return a||(t.cantEdit=!0,te(t.first,0))}function ao(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?se(t,te(e.line-1)):null:n>0&&e.ch==(r||Kt(t,e.line)).text.length?e.line0)){var u=[l,1],h=ee(c.from,s.from),f=ee(c.to,s.to);(h<0||!a.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(t,e.from,e.to);if(r)for(var i=r.length-1;i>=0;--i)uo(t,{from:r[i].from,to:r[i].to,text:i?[""]:e.text,origin:e.origin});else uo(t,e)}}function uo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var n=wi(t,e);Wi(t,e,n,t.cm?t.cm.curOp.id:NaN),po(t,e,n,ke(t,e));var r=[];_i(t,(function(t,n){n||-1!=W(r,t.history)||(yo(t.history,e),r.push(t.history)),po(t,e,null,ke(t,e))}))}}function ho(t,e,n){var r=t.cm&&t.cm.state.suppressEdits;if(!r||n){for(var i,o=t.history,a=t.sel,s="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c=0;--p){var d=f(p);if(d)return d.v}}}}function fo(t,e){if(0!=e&&(t.first+=e,t.sel=new Si(X(t.sel.ranges,(function(t){return new xi(te(t.anchor.line+e,t.anchor.ch),te(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){hr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;rt.lastLine())){if(e.from.lineo&&(e={from:e.from,to:te(o,Kt(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Yt(t,e.from,e.to),n||(n=wi(t,e)),t.cm?function(t,e,n){var r=t.doc,i=t.display,o=e.from,a=e.to,s=!1,l=o.line;t.options.lineWrapping||(l=qt(Ue(Kt(r,o.line))),r.iter(l,a.line+1,(function(t){if(t==i.maxLine)return s=!0,!0}))),r.sel.contains(e.from,e.to)>-1&>(t),Mi(r,e,n,sr(t)),t.options.lineWrapping||(r.iter(l,o.line+e.text.length,(function(t){var e=ze(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)})),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;r--){var i=Kt(t,r).stateAfter;if(i&&(!(i instanceof ce)||r+i.lookAhead1||!(this.children[0]instanceof To))){var s=[];this.collapse(s),this.children=[new To(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var a=i.lines.length%25+25,s=a;s10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(De(t,e.line,e,n,o)||e.line!=n.line&&De(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Se=!0}o.addToHistory&&Wi(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,n.line+1,(function(t){c&&o.collapsed&&!c.options.lineWrapping&&Ue(t)==c.display.maxLine&&(s=!0),o.collapsed&&l!=e.line&&Xt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new xe(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&t.iter(e.line,n.line+1,(function(e){Be(t,e)&&Xt(e,0)})),o.clearOnEnter&&ht(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Oe=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++Eo,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)hr(c,e.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=e.line;u<=n.line;u++)fr(c,u,"text");o.atomic&&no(c.doc),ln(c,"markerAdded",c,o)}return o}Co.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Kr(t),vt(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&hr(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&no(t.doc)),t&&ln(t,"markerCleared",t,this,r,i),e&&Yr(t),this.parent&&this.parent.clear()}},Co.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i=0;l--)co(this,r[l]);s?Ji(this,s):this.cm&&Ir(this.cm)})),undo:ni((function(){ho(this,"undo")})),redo:ni((function(){ho(this,"redo")})),undoSelection:ni((function(){ho(this,"undo",!0)})),redoSelection:ni((function(){ho(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,n){t=se(this,t),e=se(this,e);var r=[],i=t.line;return this.iter(t.line,e.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=t.line||null!=l.from&&i==e.line&&l.from>=e.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var r=0;rt)return e=t,!0;t-=o,++n})),se(this,te(n,e))},indexFromPos:function(t){var e=(t=se(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var f;if(e.state.draggingText&&!e.state.draggingText.copy&&(f=e.listSelections()),to(e.doc,Ci(n,n)),f)for(var p=0;p=0;e--)mo(t.doc,"",r[e].from,r[e].to,"+delete");Ir(t)}))}function Jo(t,e,n){var r=it(t.text,e+n,n);return r<0||r>t.text.length?null:r}function Qo(t,e,n){var r=Jo(t,e.ch,n);return null==r?null:new te(e.line,r,n<0?"after":"before")}function ta(t,e,n,r,i){if(t){"rtl"==e.doc.direction&&(i=-i);var o=ct(n,e.doc.direction);if(o){var a,s=i<0?$(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var c=Rn(e,n);a=i<0?n.text.length-1:0;var u=Mn(e,c,a).top;a=ot((function(t){return Mn(e,c,t).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Jo(n,a,1))}else a=i<0?s.to:s.from;return new te(r,a,l)}}return new te(r,i<0?n.text.length:0,i<0?"before":"after")}Go.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Go.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Go.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Go.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Go.default=y?Go.macDefault:Go.pcDefault;var ea={selectAll:so,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),H)},killLine:function(t){return Zo(t,(function(e){if(e.empty()){var n=Kt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)i=new te(i.line,i.ch+1),t.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),te(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var a=Kt(t.doc,i.line-1).text;a&&(i=new te(i.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),te(i.line-1,a.length-1),i,"+transpose"))}n.push(new xi(i,i))}t.setSelections(n)}))},newlineAndIndent:function(t){return Qr(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;r-1&&(ee((i=c.ranges[i]).from(),e)<0||e.xRel>0)&&(ee(i.to(),e)>0||e.xRel<0)?function(t,e,n,r){var i=t.display,o=!1,c=ti(t,(function(e){l&&(i.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:xr(t)),pt(i.wrapper.ownerDocument,"mouseup",c),pt(i.wrapper.ownerDocument,"mousemove",u),pt(i.scroller,"dragstart",h),pt(i.scroller,"drop",c),o||(bt(e),r.addNew||$i(t.doc,n,null,null,r.extend),l&&!f||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return o=!0};l&&(i.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,ht(i.wrapper.ownerDocument,"mouseup",c),ht(i.wrapper.ownerDocument,"mousemove",u),ht(i.scroller,"dragstart",h),ht(i.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(t,r,e,o):function(t,e,n,r){a&&xr(t);var i=t.display,o=t.doc;bt(e);var s,l,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?u[l]:new xi(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new xi(n,n)),n=cr(t,e,!0,!0),l=-1;else{var h=va(t,n,r.unit);s=r.extend?Yi(s,h.anchor,h.head,r.extend):h}r.addNew?-1==l?(l=u.length,Qi(o,Ei(t,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(Qi(o,Ei(t,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):qi(o,l,s,G):(l=0,Qi(o,new Si([s],0),G),c=o.sel);var f=n;function p(e){if(0!=ee(f,e))if(f=e,"rectangle"==r.unit){for(var i=[],a=t.options.tabSize,u=U(Kt(o,n.line).text,n.ch,a),h=U(Kt(o,e.line).text,e.ch,a),p=Math.min(u,h),d=Math.max(u,h),m=Math.min(n.line,e.line),g=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=g;m++){var v=Kt(o,m).text,y=V(v,p,a);p==d?i.push(new xi(te(m,y),te(m,y))):v.length>y&&i.push(new xi(te(m,y),te(m,V(v,d,a))))}i.length||i.push(new xi(n,n)),Qi(o,Ei(t,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,T=s,O=va(t,e,r.unit),S=T.anchor;ee(O.anchor,S)>0?(b=O.head,S=oe(T.from(),O.anchor)):(b=O.anchor,S=ie(T.to(),O.head));var x=c.ranges.slice(0);x[l]=function(t,e){var n=e.anchor,r=e.head,i=Kt(t.doc,n.line);if(0==ee(n,r)&&n.sticky==r.sticky)return e;var o=ct(i);if(!o)return e;var a=st(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return e;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=st(o,r.ch,r.sticky),h=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var f=o[c+(l?-1:0)],p=l==(1==f.level),d=p?f.from:f.to,m=p?"after":"before";return n.ch==d&&n.sticky==m?e:new xi(new te(n.line,d,m),r)}(t,new xi(se(o,S),b)),Qi(o,Ei(t,x,l),G)}}var d=i.wrapper.getBoundingClientRect(),m=0;function g(e){t.state.selectingText=!1,m=1/0,e&&(bt(e),i.input.focus()),pt(i.wrapper.ownerDocument,"mousemove",v),pt(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var v=ti(t,(function(e){0!==e.buttons&&Et(e)?function e(n){var a=++m,s=cr(t,n,!0,"rectangle"==r.unit);if(s)if(0!=ee(s,f)){t.curOp.focus=R(),p(s);var l=wr(i,o);(s.line>=l.to||s.lined.bottom?20:0;c&&setTimeout(ti(t,(function(){m==a&&(i.scroller.scrollTop+=c,e(n))})),50)}}(e):g(e)})),y=ti(t,g);t.state.selectingText=y,ht(i.wrapper.ownerDocument,"mousemove",v),ht(i.wrapper.ownerDocument,"mouseup",y)}(t,r,e,o)}(e,r,o,t):xt(t)==n.scroller&&bt(t):2==i?(r&&$i(e.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(x?e.display.input.onContextMenu(t):xr(e)))}}function va(t,e,n){if("char"==n)return new xi(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new xi(te(e.line,0),se(t.doc,te(e.line+1,0)));var r=n(t,e);return new xi(r.from,r.to)}function ya(t,e,n,r){var i,o;if(e.touches)i=e.touches[0].clientX,o=e.touches[0].clientY;else try{i=e.clientX,o=e.clientY}catch(t){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&bt(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!vt(t,n))return Ot(e);o-=s.top-a.viewOffset;for(var l=0;l=i)return dt(t,n,t,Zt(t.doc,o),t.display.gutterSpecs[l].className,e),Ot(e)}}function ba(t,e){return ya(t,e,"gutterClick",!0)}function Ta(t,e){Sn(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&ya(t,e,"gutterContextMenu",!1)}(t,e)||mt(t,e,"contextmenu")||x||t.display.input.onContextMenu(e)}function Oa(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Wn(t)}ma.prototype.compare=function(t,e,n){return this.time+400>t&&0==ee(e,this.pos)&&n==this.button};var Sa={toString:function(){return"CodeMirror.Init"}},xa={},Ea={};function Ca(t,e,n){if(!e!=!(n&&n!=Sa)){var r=t.display.dragFunctions,i=e?ht:pt;i(t.display.scroller,"dragstart",r.start),i(t.display.scroller,"dragenter",r.enter),i(t.display.scroller,"dragover",r.over),i(t.display.scroller,"dragleave",r.leave),i(t.display.scroller,"drop",r.drop)}}function ka(t){t.options.lineWrapping?(M(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(k(t.display.wrapper,"CodeMirror-wrap"),Ve(t)),lr(t),hr(t),Wn(t),setTimeout((function(){return Br(t)}),100)}function Na(t,e){var n=this;if(!(this instanceof Na))return new Na(t,e);this.options=e=e?D(e):{},D(xa,e,!1);var r=e.value;"string"==typeof r?r=new Io(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var i=new Na.inputStyles[e.inputStyle](this),o=this.display=new gi(t,r,i,e);for(var c in o.wrapper.CodeMirror=this,Oa(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),zr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new F,keySeq:null,specialChars:null},e.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",ti(t,ga)),ht(e.scroller,"dblclick",a&&s<11?ti(t,(function(e){if(!mt(t,e)){var n=cr(t,e);if(n&&!ba(t,e)&&!Sn(t.display,e)){bt(e);var r=t.findWordAt(n);$i(t.doc,r.anchor,r.head)}}})):function(e){return mt(t,e)||bt(e)}),ht(e.scroller,"contextmenu",(function(e){return Ta(t,e)})),ht(e.input.getField(),"contextmenu",(function(n){e.scroller.contains(n.target)||Ta(t,n)}));var n,r={end:0};function i(){e.activeTouch&&(n=setTimeout((function(){return e.activeTouch=null}),1e3),(r=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,r=e.top-t.top;return n*n+r*r>400}ht(e.scroller,"touchstart",(function(i){if(!mt(t,i)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(i)&&!ba(t,i)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}})),ht(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ht(e.scroller,"touchend",(function(n){var r=e.activeTouch;if(r&&!Sn(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=t.coordsChar(e.activeTouch,"page");a=!r.prev||o(r,r.prev)?new xi(s,s):!r.prev.prev||o(r,r.prev.prev)?t.findWordAt(s):new xi(te(s.line,0),se(t.doc,te(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),bt(n)}i()})),ht(e.scroller,"touchcancel",i),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Pr(t,e.scroller.scrollTop),Dr(t,e.scroller.scrollLeft,!0),dt(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return Oi(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return Oi(t,e)})),ht(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){mt(t,e)||St(e)},over:function(e){mt(t,e)||(function(t,e){var n=cr(t,e);if(n){var r=document.createDocumentFragment();yr(t,n,r),t.display.dragCursor||(t.display.dragCursor=L("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),w(t.display.dragCursor,r)}}(t,e),St(e))},start:function(e){return function(t,e){if(a&&(!t.state.draggingText||+new Date-Ro<100))St(e);else if(!mt(t,e)&&!Sn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!f)){var n=L("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(t,e)},drop:ti(t,Mo),leave:function(e){mt(t,e)||_o(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return ha.call(t,e)})),ht(l,"keydown",ti(t,ua)),ht(l,"keypress",ti(t,fa)),ht(l,"focus",(function(e){return Er(t,e)})),ht(l,"blur",(function(e){return Cr(t,e)}))}(this),Do(),Kr(this),this.curOp.forceUpdate=!0,Pi(this,r),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Er(n)}),20):Cr(this),Ea)Ea.hasOwnProperty(c)&&Ea[c](this,e[c],Sa);fi(this),e.finishInit&&e.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?U(Kt(o,e-1).text,null,a):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",f=0;if(t.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)f+=a,h+="\t";if(fa,l=It(e),c=null;if(s&&r.ranges.length>1)if(Aa&&Aa.text.join("\n")==e){if(r.ranges.length%Aa.text.length==0){c=[];for(var u=0;u=0;f--){var p=r.ranges[f],d=p.from(),m=p.to();p.empty()&&(n&&n>0?d=te(d.line,d.ch-n):t.state.overwrite&&!s?m=te(m.line,Math.min(Kt(o,m.line).text.length,m.ch+$(l).length)):s&&Aa&&Aa.lineWise&&Aa.text.join("\n")==l.join("\n")&&(d=m=te(d.line,0)));var g={from:d,to:m,text:c?c[f%c.length]:l,origin:i||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};co(t.doc,g),ln(t,"inputRead",t,g)}e&&!s&&_a(t,e),Ir(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Ma(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Qr(e,(function(){return Ra(e,n,0,null,"paste")})),!0}function _a(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=t.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=La(t,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Kt(t.doc,i.head.line).text.slice(0,i.head.ch))&&(a=La(t,i.head.line,"smart"));a&&ln(t,"electricInput",t,i.head.line)}}}function Pa(t){for(var e=[],n=[],r=0;r0?0:-1));if(isNaN(u))a=null;else{var h=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new te(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(h?2:1))),-n)}}else a=i?function(t,e,n,r){var i=ct(e,t.doc.direction);if(!i)return Qo(e,n,r);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=st(i,n.ch,n.sticky),a=i[o];if("ltr"==t.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&f>=u.begin)){var p=h?"before":"after";return new te(n.line,f,p)}}var d=function(t,e,r){for(var o=function(t,e){return e?new te(n.line,l(t,1),"before"):new te(n.line,t,"after")};t>=0&&t0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==e.text.length||!(m=d(r>0?0:i.length-1,r,c(g)))?null:m}(t.cm,s,e,n):Qo(s,e,n);if(null==a){if(o||(c=e.line+l)=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(s=Kt(t,c))))return!1;e=ta(i,t.cm,s,e.line,l)}else e=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,h="group"==r,f=t.cm&&t.cm.getHelper(e,"wordChars"),p=!0;!(n<0)||c(!p);p=!1){var d=s.text.charAt(e.ch)||"\n",m=tt(d,f)?"w":h&&"\n"==d?"n":!h||/\s/.test(d)?null:"p";if(!h||p||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),e.sticky="after");break}if(m&&(u=m),n>0&&!c(!p))break}var g=oo(t,e,o,a,!0);return ne(o,g)&&(g.hitSide=!0),g}function Fa(t,e,n,r){var i,o,a=t.doc,s=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(t.display),3);i=(n>0?e.bottom:e.top)+n*c}else"line"==r&&(i=n>0?e.bottom+3:e.top-3);for(;(o=qn(t,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Wa=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new F,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ba(t,e){var n=In(t,e.line);if(!n||n.hidden)return null;var r=Kt(t.doc,e.line),i=Ln(n,r,e.line),o=ct(r,t.doc.direction),a="left";o&&(a=st(o,e.ch)%2?"right":"left");var s=jn(i.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ha(t,e){return e&&(t.bad=!0),t}function Ga(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return Ha(t.clipPos(te(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var i=0;i=e.display.viewTo||o.line=e.display.viewFrom&&Ba(e,i)||{node:l[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=te(a.line-1,Kt(r.doc,a.line-1).length)),s.ch==Kt(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(t=ur(r,a.line))?(e=qt(i.view[0].line),n=i.view[0].node):(e=qt(i.view[t].line),n=i.view[t-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=qt(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(t,e,n,r,i){var o="",a=!1,s=t.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(t){t&&(c(),o+=t)}function h(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,f=e.getAttribute("cm-marker");if(f){var p=t.findMarks(te(r,0),te(i+1,0),(g=+f,function(t){return t.id==g}));return void(p.length&&(o=p[0].find(0))&&u(Yt(t.doc,o.from,o.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var d=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;d&&c();for(var m=0;m1&&f.length>1;)if($(h)==$(f))h.pop(),f.pop(),l--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),e++}for(var p=0,d=0,m=h[0],g=f[0],v=Math.min(m.length,g.length);pa.ch&&y.charCodeAt(y.length-d-1)==b.charCodeAt(b.length-d-1);)p--,d++;h[h.length-1]=y.slice(0,y.length-d).replace(/^\u200b+/,""),h[0]=h[0].slice(p).replace(/\u200b+$/,"");var O=te(e,p),S=te(l,f.length?$(f).length-d:0);return h.length>1||h[0]||ee(O,S)?(mo(r.doc,h,O,S,"+input"),!0):void 0},Wa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Wa.prototype.reset=function(){this.forceCompositionEnd()},Wa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Wa.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Wa.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return hr(t.cm)}))},Wa.prototype.setUneditable=function(t){t.contentEditable="false"},Wa.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||ti(this.cm,Ra)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Wa.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Wa.prototype.onContextMenu=function(){},Wa.prototype.resetPosition=function(){},Wa.prototype.needsContentAttribute=!0;var Va=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new F,this.hasSelection=!1,this.composing=null};Va.prototype.init=function(t){var e=this,n=this,r=this.cm;this.createField(t);var i=this.textarea;function o(t){if(!mt(r,t)){if(r.somethingSelected())Ia({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Pa(r);Ia({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,H):(n.prevInput="",i.value=e.text.join("\n"),P(i))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),m&&(i.style.width="0px"),ht(i,"input",(function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),ht(i,"paste",(function(t){mt(r,t)||Ma(t,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),ht(i,"cut",o),ht(i,"copy",o),ht(t.scroller,"paste",(function(e){if(!Sn(t,e)&&!mt(r,e)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,i.dispatchEvent(o)}})),ht(t.lineSpace,"selectstart",(function(e){Sn(t,e)||bt(e)})),ht(i,"compositionstart",(function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ht(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Va.prototype.createField=function(t){this.wrapper=Da(),this.textarea=this.wrapper.firstChild},Va.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Va.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=vr(t);if(t.options.moveInputWithCursor){var i=Yn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Va.prototype.showSelection=function(t){var e=this.cm.display;w(e.cursorDiv,t.cursors),w(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Va.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&P(this.textarea),a&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Va.prototype.getField=function(){return this.textarea},Va.prototype.supportsTouch=function(){return!1},Va.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||R()!=this.textarea))try{this.textarea.focus()}catch(t){}},Va.prototype.blur=function(){this.textarea.blur()},Va.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Va.prototype.receivedFocus=function(){this.slowPoll()},Va.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Va.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}))},Va.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||Rt(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==r&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Va.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Va.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Va.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,i=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=cr(n,t),c=r.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ti(n,Qi)(n.doc,Ci(o),H);var u,f=i.style.cssText,p=e.wrapper.style.cssText,d=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-d.top-5)+"px; left: "+(t.clientX-d.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),x){St(t);var m=function(){pt(window,"mouseup",m),setTimeout(v,20)};ht(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var t=n.somethingSelected(),o="​"+(t?i.value:"");i.value="⇚",i.value=o,e.prevInput=t?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=p,i.style.cssText=f,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&g();var t=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==e.prevInput?ti(n,so)(n):t++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Va.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Va.prototype.setUneditable=function(){},Va.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,r,i,o){t.defaults[n]=r,i&&(e[n]=o?function(t,e,n){n!=Sa&&i(t,e,n)}:i)}t.defineOption=n,t.Init=Sa,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,Ai(t)}),!0),n("indentUnit",2,Ai,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){Ii(t),Wn(t),hr(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter((function(t){for(var i=0;;){var o=t.text.indexOf(e,i);if(-1==o)break;i=o+e.length,n.push(te(r,o))}r++}));for(var i=n.length-1;i>=0;i--)mo(t.doc,e,n[i],te(n[i].line,n[i].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Sa&&t.refresh()})),n("specialCharPlaceholder",Je,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!T),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){Oa(t),mi(t)}),!0),n("keyMap","default",(function(t,e,n){var r=qo(e),i=n!=Sa&&qo(n);i&&i.detach&&i.detach(t,r),r.attach&&r.attach(t,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,ka,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=pi(e,t.options.lineNumbers),mi(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?ar(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return Br(t)}),!0),n("scrollbarStyle","native",(function(t){zr(t),Br(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=pi(t.options.gutters,e),mi(t)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(t){return t}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(Cr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,Ca),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ii,!0),n("addModeClass",!1,Ii,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,Ii,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}(Na),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var r=this.options,i=r[t];r[t]==n&&"mode"!=t||(r[t]=n,e.hasOwnProperty(t)&&ti(this,e[t])(this,n,i),dt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](qo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(La(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&Ir(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&qi(this.doc,r,new xi(o,c[r].to()),H)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,te(t),e,!0)},getTokenTypeAt:function(t){t=se(this.doc,t);var e,n=fe(this,Kt(this.doc,t.line)),r=0,i=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(t=o,i=!0),r=Kt(this.doc,t)}else r=t;return zn(this,r,{top:0,left:0},e||"page",n||i).top+(i?this.doc.height-Ge(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,i){var o,a,s,l=this.display,c=(t=Yn(this,se(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==r)c=t.top;else if("above"==r||"near"==r){var h=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>h)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=h&&(c=t.bottom),u+e.offsetWidth>f&&(u=f-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==i?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(s=Lr(o,a)).scrollTop&&Pr(o,s.scrollTop),null!=s.scrollLeft&&Dr(o,s.scrollLeft))},triggerOnKeyDown:ei(ua),triggerOnKeyPress:ei(fa),triggerOnKeyUp:ha,triggerOnMouseDown:ei(ga),execCommand:function(t){if(ea.hasOwnProperty(t))return ea[t].call(null,this)},triggerElectric:ei((function(t){_a(this,t)})),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var o=se(this.doc,t),a=0;a0&&a(e.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&lr(this),dt(this,"refresh",this)})),swapDoc:ei((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Pi(this,t),Wn(this),this.display.input.reset(),Rr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(t),t.registerHelper=function(e,r,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=i},t.registerGlobalHelper=function(e,r,i,o){t.registerHelper(e,r,o),n[e]._global.push({pred:i,val:o})}}(Na);var Ka="iter insert remove copy getEditor constructor".split(" ");for(var Ya in Io.prototype)Io.prototype.hasOwnProperty(Ya)&&W(Ka,Ya)<0&&(Na.prototype[Ya]=function(t){return function(){return t.apply(this.doc,arguments)}}(Io.prototype[Ya]));return yt(Io),Na.inputStyles={textarea:Va,contenteditable:Wa},Na.defineMode=function(t){Na.defaults.mode||"null"==t||(Na.defaults.mode=t),Dt.apply(this,arguments)},Na.defineMIME=function(t,e){jt[t]=e},Na.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Na.defineMIME("text/plain","null"),Na.defineExtension=function(t,e){Na.prototype[t]=e},Na.defineDocExtension=function(t,e){Io.prototype[t]=e},Na.fromTextArea=function(t,e){if((e=e?D(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=R();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=s.getValue()}var i;if(t.form&&(ht(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(n){n.save=r,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,r(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(pt(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var s=Na((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return s},function(t){t.off=pt,t.on=ht,t.wheelEventPixels=Ti,t.Doc=Io,t.splitLines=It,t.countColumn=U,t.findColumn=V,t.isWordChar=Q,t.Pass=B,t.signal=dt,t.Line=Ke,t.changeEnd=ki,t.scrollbarModel=Gr,t.Pos=te,t.cmpPos=ee,t.modes=Pt,t.mimeModes=jt,t.resolveMode=Ut,t.getMode=Ft,t.modeExtensions=Wt,t.extendMode=Bt,t.copyState=Ht,t.startState=zt,t.innerMode=Gt,t.commands=ea,t.keyMap=Go,t.keyName=Xo,t.isModifierKey=Yo,t.lookupKey=Ko,t.normalizeKeyMap=Vo,t.StringStream=Vt,t.SharedTextMarker=No,t.TextMarker=Co,t.LineWidget=So,t.e_preventDefault=bt,t.e_stopPropagation=Tt,t.e_stop=St,t.addClass=M,t.contains=I,t.rmClass=k,t.keyNames=Fo}(Na),Na.version="5.59.1",Na}()},function(t,e,n){"use strict";n.r(e),n.d(e,"VERSION",(function(){return r})),n.d(e,"CstParser",(function(){return en})),n.d(e,"EmbeddedActionsParser",(function(){return nn})),n.d(e,"ParserDefinitionErrorType",(function(){return qe})),n.d(e,"EMPTY_ALT",(function(){return Qe})),n.d(e,"Lexer",(function(){return $})),n.d(e,"LexerDefinitionErrorType",(function(){return V})),n.d(e,"createToken",(function(){return J})),n.d(e,"createTokenInstance",(function(){return tt})),n.d(e,"EOF",(function(){return Q})),n.d(e,"tokenLabel",(function(){return X})),n.d(e,"tokenMatcher",(function(){return et})),n.d(e,"tokenName",(function(){return q})),n.d(e,"defaultGrammarResolverErrorProvider",(function(){return Lt})),n.d(e,"defaultGrammarValidatorErrorProvider",(function(){return At})),n.d(e,"defaultParserErrorProvider",(function(){return wt})),n.d(e,"EarlyExitException",(function(){return ge})),n.d(e,"isRecognitionException",(function(){return fe})),n.d(e,"MismatchedTokenException",(function(){return pe})),n.d(e,"NotAllInputParsedException",(function(){return me})),n.d(e,"NoViableAltException",(function(){return de})),n.d(e,"defaultLexerErrorProvider",(function(){return K})),n.d(e,"Alternation",(function(){return ft})),n.d(e,"Alternative",(function(){return at})),n.d(e,"NonTerminal",(function(){return it})),n.d(e,"Option",(function(){return st})),n.d(e,"Repetition",(function(){return ut})),n.d(e,"RepetitionMandatory",(function(){return lt})),n.d(e,"RepetitionMandatoryWithSeparator",(function(){return ct})),n.d(e,"RepetitionWithSeparator",(function(){return ht})),n.d(e,"Rule",(function(){return ot})),n.d(e,"Terminal",(function(){return pt})),n.d(e,"serializeGrammar",(function(){return dt})),n.d(e,"serializeProduction",(function(){return mt})),n.d(e,"GAstVisitor",(function(){return yt})),n.d(e,"assignOccurrenceIndices",(function(){return ue})),n.d(e,"resolveGrammar",(function(){return le})),n.d(e,"validateGrammar",(function(){return ce})),n.d(e,"clearCache",(function(){return mn})),n.d(e,"createSyntaxDiagramsCode",(function(){return rn})),n.d(e,"generateParserFactory",(function(){return pn})),n.d(e,"generateParserModule",(function(){return dn})),n.d(e,"Parser",(function(){return gn}));var r="7.1.0",i=n(0),o=n(1),a={},s=new o.RegExpParser;function l(t){var e=t.toString();if(a.hasOwnProperty(e))return a[e];var n=s.pattern(e);return a[e]=n,n}var c,u=(c=function(t,e){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h='Unable to use "first char" lexer optimizations:\n';function f(t,e){void 0===e&&(e=!1);try{var n=l(t);return function t(e,n,r){switch(e.type){case"Disjunction":for(var o=0;o=_)for(var o=e.from>=_?e.from:_,a=e.to,s=P(o),l=P(a),c=s;c<=l;c++)n[c]=c}}}));break;case"Group":t(l.value,n,r);break;default:throw Error("Non Exhaustive Match")}var c=void 0!==l.quantifier&&0===l.quantifier.atLeast;if("Group"===l.type&&!1===m(l)||"Group"!==l.type&&!1===c)break}break;default:throw Error("non exhaustive match!")}return Object(i.U)(n)}(n.value,{},n.flags.ignoreCase)}catch(n){if("Complement Sets are not supported for first char optimization"===n.message)e&&Object(i.d)(h+"\tUnable to optimize: < "+t.toString()+" >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var r="";e&&(r="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Object(i.c)(h+"\n\tFailed parsing: < "+t.toString()+" >\n\tUsing the regexp-to-ast library version: "+o.VERSION+"\n\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues"+r)}}return[]}function p(t,e,n){var r=P(t);e[r]=r,!0===n&&function(t,e){var n=String.fromCharCode(t),r=n.toUpperCase();if(r!==n){var i=P(r.charCodeAt(0));e[i]=i}else{var o=n.toLowerCase();if(o!==n){i=P(o.charCodeAt(0));e[i]=i}}}(t,e)}function d(t,e){return Object(i.q)(t.value,(function(t){if("number"==typeof t)return Object(i.j)(e,t);var n=t;return void 0!==Object(i.q)(e,(function(t){return n.from<=t&&t<=n.to}))}))}function m(t){return!(!t.quantifier||0!==t.quantifier.atLeast)||!!t.value&&(Object(i.y)(t.value)?Object(i.o)(t.value,m):m(t.value))}var g=function(t){function e(e){var n=t.call(this)||this;return n.targetCharCodes=e,n.found=!1,n}return u(e,t),e.prototype.visitChildren=function(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e)}t.prototype.visitChildren.call(this,e)}},e.prototype.visitCharacter=function(t){Object(i.j)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?void 0===d(t,this.targetCharCodes)&&(this.found=!0):void 0!==d(t,this.targetCharCodes)&&(this.found=!0)},e}(o.BaseRegExpVisitor);function v(t,e){if(e instanceof RegExp){var n=l(e),r=new g(t);return r.visit(n),r.found}return void 0!==Object(i.q)(e,(function(e){return Object(i.j)(t,e.charCodeAt(0))}))}var y=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b="PATTERN",T="boolean"==typeof new RegExp("(?:)").sticky;function O(t,e){var n,r=(e=Object(i.k)(e,{useSticky:T,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(t,e){return e()}})).tracer;r("initCharCodeToOptimizedIndexMap",(function(){!function(){if(Object(i.A)(j)){j=new Array(65536);for(var t=0;t<65536;t++)j[t]=t>255?255+~~(t/255):t}}()})),r("Reject Lexer.NA",(function(){n=Object(i.P)(t,(function(t){return t[b]===$.NA}))}));var o,a,s,l,c,u,p,d,m,g,y,O=!1;r("Transform Patterns",(function(){O=!1,o=Object(i.I)(n,(function(t){var n=t[b];if(Object(i.D)(n)){var r=n.source;return 1!==r.length||"^"===r||"$"===r||"."===r||n.ignoreCase?2!==r.length||"\\"!==r[0]||Object(i.j)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?e.useSticky?k(n):C(n):r[1]:r}if(Object(i.B)(n))return O=!0,{exec:n};if(Object(i.w)(n,"exec"))return O=!0,n;if("string"==typeof n){if(1===n.length)return n;var o=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),a=new RegExp(o);return e.useSticky?k(a):C(a)}throw Error("non exhaustive match")}))})),r("misc mapping",(function(){a=Object(i.I)(n,(function(t){return t.tokenTypeIdx})),s=Object(i.I)(n,(function(t){var e=t.GROUP;if(e!==$.SKIPPED){if(Object(i.E)(e))return e;if(Object(i.F)(e))return!1;throw Error("non exhaustive match")}})),l=Object(i.I)(n,(function(t){var e=t.LONGER_ALT;if(e)return Object(i.x)(n,e)})),c=Object(i.I)(n,(function(t){return t.PUSH_MODE})),u=Object(i.I)(n,(function(t){return Object(i.w)(t,"POP_MODE")}))})),r("Line Terminator Handling",(function(){var t=R(e.lineTerminatorCharacters);p=Object(i.I)(n,(function(t){return!1})),"onlyOffset"!==e.positionTracking&&(p=Object(i.I)(n,(function(e){return Object(i.w)(e,"LINE_BREAKS")?e.LINE_BREAKS:!1===I(e,t)?v(t,e.PATTERN):void 0})))})),r("Misc Mapping #2",(function(){d=Object(i.I)(n,w),m=Object(i.I)(o,L),g=Object(i.O)(n,(function(t,e){var n=e.GROUP;return Object(i.E)(n)&&n!==$.SKIPPED&&(t[n]=[]),t}),{}),y=Object(i.I)(o,(function(t,e){return{pattern:o[e],longerAlt:l[e],canLineTerminator:p[e],isCustom:d[e],short:m[e],group:s[e],push:c[e],pop:u[e],tokenTypeIdx:a[e],tokenType:n[e]}}))}));var S=!0,x=[];return e.safeMode||r("First Char Optimization",(function(){x=Object(i.O)(n,(function(t,n,r){if("string"==typeof n.PATTERN){var o=P(n.PATTERN.charCodeAt(0));M(t,o,y[r])}else if(Object(i.y)(n.START_CHARS_HINT)){var a;Object(i.u)(n.START_CHARS_HINT,(function(e){var n=P("string"==typeof e?e.charCodeAt(0):e);a!==n&&(a=n,M(t,n,y[r]))}))}else if(Object(i.D)(n.PATTERN))if(n.PATTERN.unicode)S=!1,e.ensureOptimizations&&Object(i.c)(h+"\tUnable to analyze < "+n.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var s=f(n.PATTERN,e.ensureOptimizations);Object(i.A)(s)&&(S=!1),Object(i.u)(s,(function(e){M(t,e,y[r])}))}else e.ensureOptimizations&&Object(i.c)(h+"\tTokenType: <"+n.name+"> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),S=!1;return t}),[])})),r("ArrayPacking",(function(){x=Object(i.L)(x)})),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:x,hasCustom:O,canBeOptimized:S}}function S(t,e){var n=[],r=function(t){var e=Object(i.p)(t,(function(t){return!Object(i.w)(t,b)})),n=Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:V.MISSING_PATTERN,tokenTypes:[t]}})),r=Object(i.l)(t,e);return{errors:n,valid:r}}(t);n=n.concat(r.errors);var a=function(t){var e=Object(i.p)(t,(function(t){var e=t[b];return!(Object(i.D)(e)||Object(i.B)(e)||Object(i.w)(e,"exec")||Object(i.E)(e))})),n=Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:V.INVALID_PATTERN,tokenTypes:[t]}})),r=Object(i.l)(t,e);return{errors:n,valid:r}}(r.valid),s=a.valid;return n=(n=(n=(n=(n=n.concat(a.errors)).concat(function(t){var e=[],n=Object(i.p)(t,(function(t){return Object(i.D)(t[b])}));return e=(e=(e=(e=(e=e.concat(function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.found=!1,e}return y(e,t),e.prototype.visitEndAnchor=function(t){this.found=!0},e}(o.BaseRegExpVisitor),n=Object(i.p)(t,(function(t){var n=t[b];try{var r=l(n),i=new e;return i.visit(r),i.found}catch(t){return x.test(n.source)}}));return Object(i.I)(n,(function(t){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:V.EOI_ANCHOR_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.found=!1,e}return y(e,t),e.prototype.visitStartAnchor=function(t){this.found=!0},e}(o.BaseRegExpVisitor),n=Object(i.p)(t,(function(t){var n=t[b];try{var r=l(n),i=new e;return i.visit(r),i.found}catch(t){return E.test(n.source)}}));return Object(i.I)(n,(function(t){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:V.SOI_ANCHOR_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=Object(i.p)(t,(function(t){var e=t[b];return e instanceof RegExp&&(e.multiline||e.global)}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:V.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=[],n=Object(i.I)(t,(function(n){return Object(i.O)(t,(function(t,r){return n.PATTERN.source!==r.PATTERN.source||Object(i.j)(e,r)||r.PATTERN===$.NA||(e.push(r),t.push(r)),t}),[])}));n=Object(i.i)(n);var r=Object(i.p)(n,(function(t){return t.length>1}));return Object(i.I)(r,(function(t){var e=Object(i.I)(t,(function(t){return t.name}));return{message:"The same RegExp pattern ->"+Object(i.s)(t).PATTERN+"<-has been used in all of the following Token Types: "+e.join(", ")+" <-",type:V.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}}))}(n))).concat(function(t){var e=Object(i.p)(t,(function(t){return t[b].test("")}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:V.EMPTY_MATCH_PATTERN,tokenTypes:[t]}}))}(n))}(s))).concat(function(t){var e=Object(i.p)(t,(function(t){if(!Object(i.w)(t,"GROUP"))return!1;var e=t.GROUP;return e!==$.SKIPPED&&e!==$.NA&&!Object(i.E)(e)}));return Object(i.I)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:V.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}}))}(s))).concat(function(t,e){var n=Object(i.p)(t,(function(t){return void 0!==t.PUSH_MODE&&!Object(i.j)(e,t.PUSH_MODE)}));return Object(i.I)(n,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+t.PUSH_MODE+"<-which does not exist",type:V.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}}))}(s,e))).concat(function(t){var e=[],n=Object(i.O)(t,(function(t,e,n){var r,o=e.PATTERN;return o===$.NA||(Object(i.E)(o)?t.push({str:o,idx:n,tokenType:e}):Object(i.D)(o)&&(r=o,void 0===Object(i.q)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(function(t){return-1!==r.source.indexOf(t)})))&&t.push({str:o.source,idx:n,tokenType:e})),t}),[]);return Object(i.u)(t,(function(t,r){Object(i.u)(n,(function(n){var o=n.str,a=n.idx,s=n.tokenType;if(r"+t.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";e.push({message:l,type:V.UNREACHABLE_PATTERN,tokenTypes:[t,s]})}}))})),e}(s))}var x=/[^\\][\$]/;var E=/[^\\[][\^]|^\^/;function C(t){var e=t.ignoreCase?"i":"";return new RegExp("^(?:"+t.source+")",e)}function k(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function N(t,e,n){var r=[],o=!1,a=Object(i.i)(Object(i.t)(Object(i.J)(t.modes,(function(t){return t})))),s=Object(i.P)(a,(function(t){return t[b]===$.NA})),l=R(n);return e&&Object(i.u)(s,(function(t){var e=I(t,l);if(!1!==e){var n={message:function(t,e){if(e.issue===V.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+t.name+"> Token Type\n\t Root cause: "+e.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===V.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <"+t.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}(t,e),type:e.issue,tokenType:t};r.push(n)}else Object(i.w)(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(o=!0):v(l,t.PATTERN)&&(o=!0)})),e&&!o&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:V.NO_LINE_BREAKS_FLAGS}),r}function w(t){var e=t.PATTERN;if(Object(i.D)(e))return!1;if(Object(i.B)(e))return!0;if(Object(i.w)(e,"exec"))return!0;if(Object(i.E)(e))return!1;throw Error("non exhaustive match")}function L(t){return!(!Object(i.E)(t)||1!==t.length)&&t.charCodeAt(0)}var A={test:function(t){for(var e=t.length,n=this.lastIndex;n0?t.charCodeAt(0):t}))}function M(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}var _=256;function P(t){return t<_?t:j[t]}var j=[];function D(t,e){var n=t.tokenTypeIdx;return n===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[n]}function U(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}var F=1,W={};function B(t){var e=function(t){var e=Object(i.g)(t),n=t,r=!0;for(;r;){n=Object(i.i)(Object(i.t)(Object(i.I)(n,(function(t){return t.CATEGORIES}))));var o=Object(i.l)(n,e);e=e.concat(o),Object(i.A)(o)?r=!1:n=o}return e}(t);!function(t){Object(i.u)(t,(function(t){var e;H(t)||(W[F]=t,t.tokenTypeIdx=F++),G(t)&&!Object(i.y)(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),G(t)||(t.CATEGORIES=[]),e=t,Object(i.w)(e,"categoryMatches")||(t.categoryMatches=[]),function(t){return Object(i.w)(t,"categoryMatchesMap")}(t)||(t.categoryMatchesMap={})}))}(e),function(t){Object(i.u)(t,(function(t){!function t(e,n){Object(i.u)(e,(function(t){n.categoryMatchesMap[t.tokenTypeIdx]=!0})),Object(i.u)(n.CATEGORIES,(function(r){var o=e.concat(n);Object(i.j)(o,r)||t(o,r)}))}([],t)}))}(e),function(t){Object(i.u)(t,(function(t){t.categoryMatches=[],Object(i.u)(t.categoryMatchesMap,(function(e,n){t.categoryMatches.push(W[n].tokenTypeIdx)}))}))}(e),Object(i.u)(e,(function(t){t.isParent=t.categoryMatches.length>0}))}function H(t){return Object(i.w)(t,"tokenTypeIdx")}function G(t){return Object(i.w)(t,"CATEGORIES")}function z(t){return Object(i.w)(t,"tokenTypeIdx")}var V,K={buildUnableToPopLexerModeMessage:function(t){return"Unable to pop Lexer Mode after encountering Token ->"+t.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(t,e,n,r,i){return"unexpected character: ->"+t.charAt(e)+"<- at offset: "+e+", skipped "+n+" characters."}};!function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"}(V||(V={}));var Y={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:K,traceInitPerf:!1,skipValidations:!1};Object.freeze(Y);var $=function(){function t(t,e){var n=this;if(void 0===e&&(e=Y),this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"==typeof e)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Object(i.K)(Y,e);var r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(function(){var r,o=!0;n.TRACE_INIT("Lexer Config handling",(function(){if(n.config.lineTerminatorsPattern===Y.lineTerminatorsPattern)n.config.lineTerminatorsPattern=A;else if(n.config.lineTerminatorCharacters===Y.lineTerminatorCharacters)throw Error("Error: Missing property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(e.safeMode&&e.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');n.trackStartLines=/full|onlyStart/i.test(n.config.positionTracking),n.trackEndLines=/full/i.test(n.config.positionTracking),Object(i.y)(t)?((r={modes:{}}).modes.defaultMode=Object(i.g)(t),r.defaultMode="defaultMode"):(o=!1,r=Object(i.h)(t))})),!1===n.config.skipValidations&&(n.TRACE_INIT("performRuntimeChecks",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(function(t,e,n){var r=[];return Object(i.w)(t,"defaultMode")||r.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:V.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object(i.w)(t,"modes")||r.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:V.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object(i.w)(t,"modes")&&Object(i.w)(t,"defaultMode")&&!Object(i.w)(t.modes,t.defaultMode)&&r.push({message:"A MultiMode Lexer cannot be initialized with a defaultMode: <"+t.defaultMode+">which does not exist\n",type:V.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object(i.w)(t,"modes")&&Object(i.u)(t.modes,(function(t,e){Object(i.u)(t,(function(t,n){Object(i.F)(t)&&r.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+e+"> at index: <"+n+">\n",type:V.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),r}(r,n.trackStartLines,n.config.lineTerminatorCharacters))})),n.TRACE_INIT("performWarningRuntimeChecks",(function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat(N(r,n.trackStartLines,n.config.lineTerminatorCharacters))}))),r.modes=r.modes?r.modes:{},Object(i.u)(r.modes,(function(t,e){r.modes[e]=Object(i.P)(t,(function(t){return Object(i.F)(t)}))}));var s=Object(i.G)(r.modes);if(Object(i.u)(r.modes,(function(t,r){n.TRACE_INIT("Mode: <"+r+"> processing",(function(){var o;(n.modes.push(r),!1===n.config.skipValidations&&n.TRACE_INIT("validatePatterns",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(S(t,s))})),Object(i.A)(n.lexerDefinitionErrors))&&(B(t),n.TRACE_INIT("analyzeTokenTypes",(function(){o=O(t,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:e.positionTracking,ensureOptimizations:e.ensureOptimizations,safeMode:e.safeMode,tracer:n.TRACE_INIT.bind(n)})})),n.patternIdxToConfig[r]=o.patternIdxToConfig,n.charCodeToPatternIdxToConfig[r]=o.charCodeToPatternIdxToConfig,n.emptyGroups=Object(i.K)(n.emptyGroups,o.emptyGroups),n.hasCustom=o.hasCustom||n.hasCustom,n.canModeBeOptimized[r]=o.canBeOptimized)}))})),n.defaultMode=r.defaultMode,!Object(i.A)(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var l=Object(i.I)(n.lexerDefinitionErrors,(function(t){return t.message})).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+l)}Object(i.u)(n.lexerDefinitionWarning,(function(t){Object(i.d)(t.message)})),n.TRACE_INIT("Choosing sub-methods implementations",(function(){if(T?(n.chopInput=i.a,n.match=n.matchWithTest):(n.updateLastIndex=i.b,n.match=n.matchWithExec),o&&(n.handleModes=i.b),!1===n.trackStartLines&&(n.computeNewColumn=i.a),!1===n.trackEndLines&&(n.updateTokenEndLineColumnLocation=i.b),/full/i.test(n.config.positionTracking))n.createTokenInstance=n.createFullToken;else if(/onlyStart/i.test(n.config.positionTracking))n.createTokenInstance=n.createStartOnlyToken;else{if(!/onlyOffset/i.test(n.config.positionTracking))throw Error('Invalid config option: "'+n.config.positionTracking+'"');n.createTokenInstance=n.createOffsetOnlyToken}n.hasCustom?(n.addToken=n.addTokenUsingPush,n.handlePayload=n.handlePayloadWithCustom):(n.addToken=n.addTokenUsingMemberAccess,n.handlePayload=n.handlePayloadNoCustom)})),n.TRACE_INIT("Failed Optimization Warnings",(function(){var t=Object(i.O)(n.canModeBeOptimized,(function(t,e,n){return!1===e&&t.push(n),t}),[]);if(e.ensureOptimizations&&!Object(i.A)(t))throw Error("Lexer Modes: < "+t.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),n.TRACE_INIT("clearRegExpParserCache",(function(){a={}})),n.TRACE_INIT("toFastProperties",(function(){Object(i.S)(n)}))}))}return t.prototype.tokenize=function(t,e){if(void 0===e&&(e=this.defaultMode),!Object(i.A)(this.lexerDefinitionErrors)){var n=Object(i.I)(this.lexerDefinitionErrors,(function(t){return t.message})).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+n)}return this.tokenizeInternal(t,e)},t.prototype.tokenizeInternal=function(t,e){var n,r,o,a,s,l,c,u,h,f,p,d,m,g,v,y,b,T=this,O=t,S=O.length,x=0,E=0,C=this.hasCustom?0:Math.floor(t.length/10),k=new Array(C),N=[],w=this.trackStartLines?1:void 0,L=this.trackStartLines?1:void 0,A=(v=this.emptyGroups,y={},b=Object(i.G)(v),Object(i.u)(b,(function(t){var e=v[t];if(!Object(i.y)(e))throw Error("non exhaustive match");y[t]=[]})),y),I=this.trackStartLines,R=this.config.lineTerminatorsPattern,M=0,_=[],j=[],D=[],U=[];Object.freeze(U);var F=void 0;function W(){return _}function B(t){var e=P(t),n=j[e];return void 0===n?U:n}var H,G=function(t){if(1===D.length&&void 0===t.tokenType.PUSH_MODE){var e=T.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t);N.push({offset:t.startOffset,line:void 0!==t.startLine?t.startLine:void 0,column:void 0!==t.startColumn?t.startColumn:void 0,length:t.image.length,message:e})}else{D.pop();var n=Object(i.H)(D);_=T.patternIdxToConfig[n],j=T.charCodeToPatternIdxToConfig[n],M=_.length;var r=T.canModeBeOptimized[n]&&!1===T.config.safeMode;F=j&&r?B:W}};function z(t){D.push(t),j=this.charCodeToPatternIdxToConfig[t],_=this.patternIdxToConfig[t],M=_.length,M=_.length;var e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;F=j&&e?B:W}for(z.call(this,e);xs.length&&(s=o,l=c,H=X)}break}}if(null!==s){if(u=s.length,void 0!==(h=H.group)&&(f=H.tokenTypeIdx,p=this.createTokenInstance(s,x,f,H.tokenType,w,L,u),this.handlePayload(p,l),!1===h?E=this.addToken(k,E,p):A[h].push(p)),t=this.chopInput(t,u),x+=u,L=this.computeNewColumn(L,u),!0===I&&!0===H.canLineTerminator){var Z=0,J=void 0,Q=void 0;R.lastIndex=0;do{!0===(J=R.test(s))&&(Q=R.lastIndex-1,Z++)}while(!0===J);0!==Z&&(w+=Z,L=u-Q,this.updateTokenEndLineColumnLocation(p,h,Q,Z,w,L,u))}this.handleModes(H,G,z,p)}else{for(var tt=x,et=w,nt=L,rt=!1;!rt&&x");var r=Object(i.R)(e),o=r.time,a=r.value,s=o>10?console.warn:console.log;return this.traceInitIndent time: "+o+"ms"),this.traceInitIndent--,a}return e()},t.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",t.NA=/NOT_APPLICABLE/,t}();function X(t){return Z(t)?t.LABEL:t.name}function q(t){return t.name}function Z(t){return Object(i.E)(t.LABEL)&&""!==t.LABEL}function J(t){return function(t){var e=t.pattern,n={};n.name=t.name,Object(i.F)(e)||(n.PATTERN=e);if(Object(i.w)(t,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";Object(i.w)(t,"categories")&&(n.CATEGORIES=t.categories);B([n]),Object(i.w)(t,"label")&&(n.LABEL=t.label);Object(i.w)(t,"group")&&(n.GROUP=t.group);Object(i.w)(t,"pop_mode")&&(n.POP_MODE=t.pop_mode);Object(i.w)(t,"push_mode")&&(n.PUSH_MODE=t.push_mode);Object(i.w)(t,"longer_alt")&&(n.LONGER_ALT=t.longer_alt);Object(i.w)(t,"line_breaks")&&(n.LINE_BREAKS=t.line_breaks);Object(i.w)(t,"start_chars_hint")&&(n.START_CHARS_HINT=t.start_chars_hint);return n}(t)}var Q=J({name:"EOF",pattern:$.NA});function tt(t,e,n,r,i,o,a,s){return{image:e,startOffset:n,endOffset:r,startLine:i,endLine:o,startColumn:a,endColumn:s,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function et(t,e){return D(t,e)}B([Q]);var nt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rt=function(){function t(t){this._definition=t}return Object.defineProperty(t.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),t.prototype.accept=function(t){t.visit(this),Object(i.u)(this.definition,(function(e){e.accept(t)}))},t}(),it=function(t){function e(e){var n=t.call(this,[])||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),Object.defineProperty(e.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(rt),ot=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.orgText="",Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),at=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.ignoreAmbiguities=!1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),st=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),lt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ct=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ut=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ht=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),e}(rt),ft=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,Object(i.f)(n,Object(i.N)(e,(function(t){return void 0!==t}))),n}return nt(e,t),Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(rt),pt=function(){function t(t){this.idx=1,Object(i.f)(this,Object(i.N)(t,(function(t){return void 0!==t})))}return t.prototype.accept=function(t){t.visit(this)},t}();function dt(t){return Object(i.I)(t,mt)}function mt(t){function e(t){return Object(i.I)(t,mt)}if(t instanceof it)return{type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};if(t instanceof at)return{type:"Alternative",definition:e(t.definition)};if(t instanceof st)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof lt)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof ct)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:mt(new pt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ht)return{type:"RepetitionWithSeparator",idx:t.idx,separator:mt(new pt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ut)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof ft)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof pt){var n={type:"Terminal",name:t.terminalType.name,label:X(t.terminalType),idx:t.idx},r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=Object(i.D)(r)?r.source:r),n}if(t instanceof ot)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var gt=function(){function t(){}return t.prototype.walk=function(t,e){var n=this;void 0===e&&(e=[]),Object(i.u)(t.definition,(function(r,o){var a=Object(i.m)(t.definition,o+1);if(r instanceof it)n.walkProdRef(r,a,e);else if(r instanceof pt)n.walkTerminal(r,a,e);else if(r instanceof at)n.walkFlat(r,a,e);else if(r instanceof st)n.walkOption(r,a,e);else if(r instanceof lt)n.walkAtLeastOne(r,a,e);else if(r instanceof ct)n.walkAtLeastOneSep(r,a,e);else if(r instanceof ht)n.walkManySep(r,a,e);else if(r instanceof ut)n.walkMany(r,a,e);else{if(!(r instanceof ft))throw Error("non exhaustive match");n.walkOr(r,a,e)}}))},t.prototype.walkTerminal=function(t,e,n){},t.prototype.walkProdRef=function(t,e,n){},t.prototype.walkFlat=function(t,e,n){var r=e.concat(n);this.walk(t,r)},t.prototype.walkOption=function(t,e,n){var r=e.concat(n);this.walk(t,r)},t.prototype.walkAtLeastOne=function(t,e,n){var r=[new st({definition:t.definition})].concat(e,n);this.walk(t,r)},t.prototype.walkAtLeastOneSep=function(t,e,n){var r=vt(t,e,n);this.walk(t,r)},t.prototype.walkMany=function(t,e,n){var r=[new st({definition:t.definition})].concat(e,n);this.walk(t,r)},t.prototype.walkManySep=function(t,e,n){var r=vt(t,e,n);this.walk(t,r)},t.prototype.walkOr=function(t,e,n){var r=this,o=e.concat(n);Object(i.u)(t.definition,(function(t){var e=new at({definition:[t]});r.walk(e,o)}))},t}();function vt(t,e,n){return[new st({definition:[new pt({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}var yt=function(){function t(){}return t.prototype.visit=function(t){var e=t;switch(e.constructor){case it:return this.visitNonTerminal(e);case at:return this.visitAlternative(e);case st:return this.visitOption(e);case lt:return this.visitRepetitionMandatory(e);case ct:return this.visitRepetitionMandatoryWithSeparator(e);case ht:return this.visitRepetitionWithSeparator(e);case ut:return this.visitRepetition(e);case ft:return this.visitAlternation(e);case pt:return this.visitTerminal(e);case ot:return this.visitRule(e);default:throw Error("non exhaustive match")}},t.prototype.visitNonTerminal=function(t){},t.prototype.visitAlternative=function(t){},t.prototype.visitOption=function(t){},t.prototype.visitRepetition=function(t){},t.prototype.visitRepetitionMandatory=function(t){},t.prototype.visitRepetitionMandatoryWithSeparator=function(t){},t.prototype.visitRepetitionWithSeparator=function(t){},t.prototype.visitAlternation=function(t){},t.prototype.visitTerminal=function(t){},t.prototype.visitRule=function(t){},t}(),bt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Tt(t,e){return void 0===e&&(e=[]),!!(t instanceof st||t instanceof ut||t instanceof ht)||(t instanceof ft?Object(i.Q)(t.definition,(function(t){return Tt(t,e)})):!(t instanceof it&&Object(i.j)(e,t))&&(t instanceof rt&&(t instanceof it&&e.push(t),Object(i.o)(t.definition,(function(t){return Tt(t,e)})))))}function Ot(t){if(t instanceof it)return"SUBRULE";if(t instanceof st)return"OPTION";if(t instanceof ft)return"OR";if(t instanceof lt)return"AT_LEAST_ONE";if(t instanceof ct)return"AT_LEAST_ONE_SEP";if(t instanceof ht)return"MANY_SEP";if(t instanceof ut)return"MANY";if(t instanceof pt)return"CONSUME";throw Error("non exhaustive match")}var St=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.separator="-",e.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},e}return bt(e,t),e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var e=t.terminalType.name+this.separator+"Terminal";Object(i.w)(this.dslMethods,e)||(this.dslMethods[e]=[]),this.dslMethods[e].push(t)},e.prototype.visitNonTerminal=function(t){var e=t.nonTerminalName+this.separator+"Terminal";Object(i.w)(this.dslMethods,e)||(this.dslMethods[e]=[]),this.dslMethods[e].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(yt),xt=new St;function Et(t){if(t instanceof it)return Et(t.referencedRule);if(t instanceof pt)return[t.terminalType];if(function(t){return t instanceof at||t instanceof st||t instanceof ut||t instanceof lt||t instanceof ct||t instanceof ht||t instanceof pt||t instanceof ot}(t))return function(t){var e,n=[],r=t.definition,o=0,a=r.length>o,s=!0;for(;a&&s;)e=r[o],s=Tt(e),n=n.concat(Et(e)),o+=1,a=r.length>o;return Object(i.T)(n)}(t);if(function(t){return t instanceof ft}(t))return function(t){var e=Object(i.I)(t.definition,(function(t){return Et(t)}));return Object(i.T)(Object(i.t)(e))}(t);throw Error("non exhaustive match")}var Ct="_~IN~_",kt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nt=function(t){function e(e){var n=t.call(this)||this;return n.topProd=e,n.follows={},n}return kt(e,t),e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,e,n){},e.prototype.walkProdRef=function(t,e,n){var r,i,o=(r=t.referencedRule,i=t.idx,r.name+i+Ct+this.topProd.name),a=e.concat(n),s=Et(new at({definition:a}));this.follows[o]=s},e}(gt);var wt={buildMismatchTokenMessage:function(t){var e=t.expected,n=t.actual;t.previous,t.ruleName;return"Expecting "+(Z(e)?"--\x3e "+X(e)+" <--":"token of type --\x3e "+e.name+" <--")+" but found --\x3e '"+n.image+"' <--"},buildNotAllInputParsedMessage:function(t){var e=t.firstRedundant;t.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(t){var e=t.expectedPathsPerAlt,n=t.actual,r=(t.previous,t.customUserDescription),o=(t.ruleName,"\nbut found: '"+Object(i.s)(n).image+"'");if(r)return"Expecting: "+r+o;var a=Object(i.O)(e,(function(t,e){return t.concat(e)}),[]),s=Object(i.I)(a,(function(t){return"["+Object(i.I)(t,(function(t){return X(t)})).join(", ")+"]"}));return"Expecting: "+("one of these possible Token sequences:\n"+Object(i.I)(s,(function(t,e){return" "+(e+1)+". "+t})).join("\n"))+o},buildEarlyExitMessage:function(t){var e=t.expectedIterationPaths,n=t.actual,r=t.customUserDescription,o=(t.ruleName,"\nbut found: '"+Object(i.s)(n).image+"'");return r?"Expecting: "+r+o:"Expecting: "+("expecting at least one iteration which starts with one of these possible Token sequences::\n <"+Object(i.I)(e,(function(t){return"["+Object(i.I)(t,(function(t){return X(t)})).join(",")+"]"})).join(" ,")+">")+o}};Object.freeze(wt);var Lt={buildRuleNotFoundError:function(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+"<-\ninside top level rule: ->"+t.name+"<-"}},At={buildDuplicateFoundError:function(t,e){var n,r=t.name,o=Object(i.s)(e),a=o.idx,s=Ot(o),l=(n=o)instanceof pt?n.terminalType.name:n instanceof it?n.nonTerminalName:"",c="->"+s+(a>0?a:"")+"<- "+(l?"with argument: ->"+l+"<-":"")+"\n appears more than once ("+e.length+" times) in the top level rule: ->"+r+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return c=(c=c.replace(/[ \t]+/g," ")).replace(/\s\s+/g,"\n")},buildNamespaceConflictError:function(t){return"Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+t.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter."},buildAlternationPrefixAmbiguityError:function(t){var e=Object(i.I)(t.prefixPath,(function(t){return X(t)})).join(", "),n=0===t.alternation.idx?"":t.alternation.idx;return"Ambiguous alternatives: <"+t.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin inside <"+t.topLevelRule.name+"> Rule,\n<"+e+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details."},buildAlternationAmbiguityError:function(t){var e=Object(i.I)(t.prefixPath,(function(t){return X(t)})).join(", "),n=0===t.alternation.idx?"":t.alternation.idx,r="Ambiguous Alternatives Detected: <"+t.ambiguityIndices.join(" ,")+"> in inside <"+t.topLevelRule.name+"> Rule,\n<"+e+"> may appears as a prefix path in all these alternatives.\n";return r+="See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."},buildEmptyRepetitionError:function(t){var e=Ot(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),"The repetition <"+e+"> within Rule <"+t.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop."},buildTokenNameError:function(t){return"deprecated"},buildEmptyAlternationError:function(t){return"Ambiguous empty alternative: <"+(t.emptyChoiceIdx+1)+"> in inside <"+t.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative."},buildTooManyAlternativesError:function(t){return"An Alternation cannot have more than 256 alternatives:\n inside <"+t.topLevelRule.name+"> Rule.\n has "+(t.alternation.definition.length+1)+" alternatives."},buildLeftRecursionError:function(t){var e=t.topLevelRule.name;return"Left Recursion found in grammar.\nrule: <"+e+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+(e+" --\x3e "+i.I(t.leftRecursionPath,(function(t){return t.name})).concat([e]).join(" --\x3e "))+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."},buildInvalidRuleNameError:function(t){return"deprecated"},buildDuplicateRuleNameError:function(t){return"Duplicate definition, rule: ->"+(t.topLevelRule instanceof ot?t.topLevelRule.name:t.topLevelRule)+"<- is already defined in the grammar: ->"+t.grammarName+"<-"}},It=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();var Rt=function(t){function e(e,n){var r=t.call(this)||this;return r.nameToTopRule=e,r.errMsgProvider=n,r.errors=[],r}return It(e,t),e.prototype.resolveRefs=function(){var t=this;Object(i.u)(Object(i.U)(this.nameToTopRule),(function(e){t.currTopLevel=e,e.accept(t)}))},e.prototype.visitNonTerminal=function(t){var e=this.nameToTopRule[t.nonTerminalName];if(e)t.referencedRule=e;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:qe.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(yt),Mt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_t=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.path=n,r.nextTerminalName="",r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return Mt(e,t),e.prototype.walkTerminal=function(t,e,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var r=e.concat(n),i=new at({definition:r});this.possibleTokTypes=Et(i),this.found=!0}},e}(function(t){function e(e,n){var r=t.call(this)||this;return r.topProd=e,r.path=n,r.possibleTokTypes=[],r.nextProductionName="",r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return Mt(e,t),e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Object(i.g)(this.path.ruleStack).reverse(),this.occurrenceStack=Object(i.g)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(e,n){void 0===n&&(n=[]),this.found||t.prototype.walk.call(this,e,n)},e.prototype.walkProdRef=function(t,e,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var r=e.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,r)}},e.prototype.updateExpectedNext=function(){Object(i.A)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(gt)),Pt=function(t){function e(e,n){var r=t.call(this)||this;return r.topRule=e,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return Mt(e,t),e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(gt),jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkMany=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkMany.call(this,e,n,r)},e}(Pt),Dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkManySep=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkManySep.call(this,e,n,r)},e}(Pt),Ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkAtLeastOne=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkAtLeastOne.call(this,e,n,r)},e}(Pt),Ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mt(e,t),e.prototype.walkAtLeastOneSep=function(e,n,r){if(e.idx===this.occurrence){var o=Object(i.s)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof pt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkAtLeastOneSep.call(this,e,n,r)},e}(Pt);function Wt(t,e,n){void 0===n&&(n=[]),n=Object(i.g)(n);var r=[],o=0;function a(a){var s=Wt(a.concat(Object(i.m)(t,o+1)),e,n);return r.concat(s)}for(;n.length=0;k--){var N={idx:p,def:g.definition[k].definition.concat(Object(i.m)(f)),ruleStack:d,occurrenceStack:m};u.push(N),u.push("EXIT_ALTERNATIVE")}else if(g instanceof at)u.push({idx:p,def:g.definition.concat(Object(i.m)(f)),ruleStack:d,occurrenceStack:m});else{if(!(g instanceof ot))throw Error("non exhaustive match");u.push(Ht(g,p,d,m))}}}else a&&Object(i.H)(u).idx<=l&&u.pop()}return c}function Ht(t,e,n,r){var o=Object(i.g)(n);o.push(t.name);var a=Object(i.g)(r);return a.push(1),{idx:e,def:t.definition,ruleStack:o,occurrenceStack:a}}var Gt,zt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"}(Gt||(Gt={}));var Vt=function(t){function e(e,n,r){var i=t.call(this)||this;return i.topProd=e,i.targetOccurrence=n,i.targetProdType=r,i}return zt(e,t),e.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},e.prototype.checkIsTarget=function(t,e,n,r){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=n.concat(r),!0)},e.prototype.walkOption=function(e,n,r){this.checkIsTarget(e,Gt.OPTION,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkAtLeastOne=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION_MANDATORY,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkAtLeastOneSep=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkMany=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkManySep=function(e,n,r){this.checkIsTarget(e,Gt.REPETITION_WITH_SEPARATOR,n,r)||t.prototype.walkOption.call(this,e,n,r)},e}(gt),Kt=function(t){function e(e,n,r){var i=t.call(this)||this;return i.targetOccurrence=e,i.targetProdType=n,i.targetRef=r,i.result=[],i}return zt(e,t),e.prototype.checkIsTarget=function(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)},e.prototype.visitOption=function(t){this.checkIsTarget(t,Gt.OPTION)},e.prototype.visitRepetition=function(t){this.checkIsTarget(t,Gt.REPETITION)},e.prototype.visitRepetitionMandatory=function(t){this.checkIsTarget(t,Gt.REPETITION_MANDATORY)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.checkIsTarget(t,Gt.REPETITION_MANDATORY_WITH_SEPARATOR)},e.prototype.visitRepetitionWithSeparator=function(t){this.checkIsTarget(t,Gt.REPETITION_WITH_SEPARATOR)},e.prototype.visitAlternation=function(t){this.checkIsTarget(t,Gt.ALTERNATION)},e}(yt);function Yt(t){for(var e=new Array(t),n=0;n1}));return i.I(i.U(a),(function(n){var r=i.s(n),o=e.buildDuplicateFoundError(t,n),a=Ot(r),s={message:o,type:qe.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:a,occurrence:r.idx},l=ie(r);return l&&(s.parameter=l),s}))}(t,r)})),s=i.I(t,(function(t){return function t(e,n,r,o){void 0===o&&(o=[]);var a=[],s=function t(e){var n=[];if(i.A(e))return n;var r=i.s(e);if(r instanceof it)n.push(r.referencedRule);else if(r instanceof at||r instanceof st||r instanceof lt||r instanceof ct||r instanceof ht||r instanceof ut)n=n.concat(t(r.definition));else if(r instanceof ft)n=i.t(i.I(r.definition,(function(e){return t(e.definition)})));else if(!(r instanceof pt))throw Error("non exhaustive match");var o=Tt(r),a=e.length>1;if(o&&a){var s=i.m(e);return n.concat(t(s))}return n}(n.definition);if(i.A(s))return[];var l=e.name;i.j(s,e)&&a.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:o}),type:qe.LEFT_RECURSION,ruleName:l});var c=i.l(s,o.concat([e])),u=i.I(c,(function(n){var a=i.g(o);return a.push(n),t(e,n,r,a)}));return a.concat(i.t(u))}(t,t,r)})),l=[],c=[],u=[];Object(i.o)(s,i.A)&&(l=Object(i.I)(t,(function(t){return function(t,e){var n=new ae;t.accept(n);var r=n.alternations;return i.O(r,(function(n,r){var o=i.n(r.definition),a=i.I(o,(function(n,o){var a=Bt([n],[],null,1);return i.A(a)?{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:r,emptyChoiceIdx:o}),type:qe.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:r.idx,alternative:o+1}:null}));return n.concat(i.i(a))}),[])}(t,r)})),c=Object(i.I)(t,(function(t){return function(t,e,n){var r=new ae;t.accept(r);var o=r.alternations;return o=Object(i.P)(o,(function(t){return!0===t.ignoreAmbiguities})),i.O(o,(function(r,o){var a=o.idx,s=o.maxLookahead||e,l=Zt(a,t,s,o),c=function(t,e,n,r){var o=[],a=Object(i.O)(t,(function(n,r,a){return!0===e.definition[a].ignoreAmbiguities||Object(i.u)(r,(function(r){var s=[a];Object(i.u)(t,(function(t,n){a!==n&&Qt(t,r)&&!0!==e.definition[n].ignoreAmbiguities&&s.push(n)})),s.length>1&&!Qt(o,r)&&(o.push(r),n.push({alts:s,path:r}))})),n}),[]);return i.I(a,(function(t){var o=Object(i.I)(t.alts,(function(t){return t+1}));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:o,prefixPath:t.path}),type:qe.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:[t.alts]}}))}(l,o,t,n),u=function(t,e,n,r){var o=[],a=Object(i.O)(t,(function(t,e,n){var r=Object(i.I)(e,(function(t){return{idx:n,path:t}}));return t.concat(r)}),[]);return Object(i.u)(a,(function(t){if(!0!==e.definition[t.idx].ignoreAmbiguities){var s=t.idx,l=t.path,c=Object(i.r)(a,(function(t){return!0!==e.definition[t.idx].ignoreAmbiguities&&t.idx255&&n.push({message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:r}),type:qe.TOO_MANY_ALTS,ruleName:t.name,occurrence:r.idx}),n}),[])}(t,r)})),p=Object(i.I)(t,(function(e){return function(t,e,n,r){var o=[];if(Object(i.O)(e,(function(e,n){return n.name===t.name?e+1:e}),0)>1){var a=r.buildDuplicateRuleNameError({topLevelRule:t,grammarName:n});o.push({message:a,type:qe.DUPLICATE_RULE_NAME,ruleName:t.name})}return o}(e,t,o,r)}));return i.t(a.concat(u,s,l,c,h,f,p))}function re(t){return Ot(t)+"_#_"+t.idx+"_#_"+ie(t)}function ie(t){return t instanceof pt?t.terminalType.name:t instanceof it?t.nonTerminalName:""}var oe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allProductions=[],e}return ee(e,t),e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}(yt);var ae=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.alternations=[],e}return ee(e,t),e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}(yt);var se=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allProductions=[],e}return ee(e,t),e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}(yt);function le(t){t=Object(i.k)(t,{errMsgProvider:Lt});var e,n,r,o={};return Object(i.u)(t.rules,(function(t){o[t.name]=t})),e=o,n=t.errMsgProvider,(r=new Rt(e,n)).resolveRefs(),r.errors}function ce(t){return ne((t=Object(i.k)(t,{errMsgProvider:At})).rules,t.maxLookahead,t.tokenTypes,t.errMsgProvider,t.grammarName)}function ue(t){Object(i.u)(t.rules,(function(t){var e=new St;t.accept(e),Object(i.u)(e.dslMethods,(function(t){Object(i.u)(t,(function(t,e){t.idx=e+1}))}))}))}var he=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"];function fe(t){return Object(i.j)(he,t.name)}function pe(t,e,n){this.name="MismatchedTokenException",this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}function de(t,e,n){this.name="NoViableAltException",this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}function me(t,e){this.name="NotAllInputParsedException",this.message=t,this.token=e,this.resyncedTokens=[]}function ge(t,e,n){this.name="EarlyExitException",this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}Object.freeze(he),pe.prototype=Error.prototype,de.prototype=Error.prototype,me.prototype=Error.prototype,ge.prototype=Error.prototype;var ve={};function ye(t){this.name="InRuleRecoveryException",this.message=t}ye.prototype=Error.prototype;var be=function(){function t(){}return t.prototype.initRecoverable=function(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object(i.w)(t,"recoveryEnabled")?t.recoveryEnabled:Ze.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Te)},t.prototype.getTokenToInsert=function(t){var e=tt(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return e.isInsertedInRecovery=!0,e},t.prototype.canTokenTypeBeInsertedInRecovery=function(t){return!0},t.prototype.tryInRepetitionRecovery=function(t,e,n,r){for(var o=this,a=this.findReSyncTokenType(),s=this.exportLexerState(),l=[],c=!1,u=this.LA(1),h=this.LA(1),f=function(){var t=o.LA(0),e=new pe(o.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:u,previous:t,ruleName:o.getCurrRuleFullName()}),u,o.LA(0));e.resyncedTokens=Object(i.n)(l),o.SAVE_ERROR(e)};!c;){if(this.tokenMatcher(h,r))return void f();if(n.call(this))return f(),void t.apply(this,e);this.tokenMatcher(h,a)?c=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,l))}this.importLexerState(s)},t.prototype.shouldInRepetitionRecoveryBeTried=function(t,e,n){return!1!==n&&(void 0!==t&&void 0!==e&&(!this.tokenMatcher(this.LA(1),t)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e)))))},t.prototype.getFollowsForInRuleRecovery=function(t,e){var n=this.getCurrentGrammarPath(t,e);return this.getNextPossibleTokenTypes(n)},t.prototype.tryInRuleRecovery=function(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new ye("sad sad panda")},t.prototype.canPerformInRuleRecovery=function(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)},t.prototype.canRecoverWithSingleTokenInsertion=function(t,e){var n=this;if(!this.canTokenTypeBeInsertedInRecovery(t))return!1;if(Object(i.A)(e))return!1;var r=this.LA(1);return void 0!==Object(i.q)(e,(function(t){return n.tokenMatcher(r,t)}))},t.prototype.canRecoverWithSingleTokenDeletion=function(t){return this.tokenMatcher(this.LA(2),t)},t.prototype.isInCurrentRuleReSyncSet=function(t){var e=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(e);return Object(i.j)(n,t)},t.prototype.findReSyncTokenType=function(){for(var t=this.flattenFollowSet(),e=this.LA(1),n=2;;){var r=e.tokenType;if(Object(i.j)(t,r))return r;e=this.LA(n),n++}},t.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return ve;var t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(n)}},t.prototype.buildFullFollowKeyStack=function(){var t=this,e=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return Object(i.I)(e,(function(r,i){return 0===i?ve:{ruleName:t.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:t.shortRuleNameToFullName(e[i-1])}}))},t.prototype.flattenFollowSet=function(){var t=this,e=Object(i.I)(this.buildFullFollowKeyStack(),(function(e){return t.getFollowSetFromFollowKey(e)}));return Object(i.t)(e)},t.prototype.getFollowSetFromFollowKey=function(t){if(t===ve)return[Q];var e=t.ruleName+t.idxInCallingRule+Ct+t.inRule;return this.resyncFollows[e]},t.prototype.addToResyncTokens=function(t,e){return this.tokenMatcher(t,Q)||e.push(t),e},t.prototype.reSyncTo=function(t){for(var e=[],n=this.LA(1);!1===this.tokenMatcher(n,t);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,e);return Object(i.n)(e)},t.prototype.attemptInRepetitionRecovery=function(t,e,n,r,i,o,a){},t.prototype.getCurrentGrammarPath=function(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Object(i.g)(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}},t.prototype.getHumanReadableRuleStack=function(){var t=this;return Object(i.I)(this.RULE_STACK,(function(e){return t.shortRuleNameToFullName(e)}))},t}();function Te(t,e,n,r,i,o,a){var s=this.getKeyForAutomaticLookahead(r,i),l=this.firstAfterRepMap[s];if(void 0===l){var c=this.getCurrRuleFullName();l=new o(this.getGAstProductions()[c],i).startWalking(),this.firstAfterRepMap[s]=l}var u=l.token,h=l.occurrence,f=l.isEndOfRule;1===this.RULE_STACK.length&&f&&void 0===u&&(u=Q,h=1),this.shouldInRepetitionRecoveryBeTried(u,h,a)&&this.tryInRepetitionRecovery(t,e,n,u)}function Oe(t,e,n){return n|e|t}var Se=function(){function t(){}return t.prototype.initLooksAhead=function(t){this.dynamicTokensEnabled=Object(i.w)(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:Ze.dynamicTokensEnabled,this.maxLookahead=Object(i.w)(t,"maxLookahead")?t.maxLookahead:Ze.maxLookahead,this.lookAheadFuncsCache=Object(i.z)()?new Map:[],Object(i.z)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},t.prototype.preComputeLookaheadFunctions=function(t){var e=this;Object(i.u)(t,(function(t){e.TRACE_INIT(t.name+" Rule Lookahead",(function(){var n=function(t){xt.reset(),t.accept(xt);var e=xt.dslMethods;return xt.reset(),e}(t),r=n.alternation,o=n.repetition,a=n.option,s=n.repetitionMandatory,l=n.repetitionMandatoryWithSeparator,c=n.repetitionWithSeparator;Object(i.u)(r,(function(n){var r=0===n.idx?"":n.idx;e.TRACE_INIT(""+Ot(n)+r,(function(){var r,i,o,a,s,l,c,u=(r=n.idx,i=t,o=n.maxLookahead||e.maxLookahead,a=n.hasPredicates,s=e.dynamicTokensEnabled,l=e.lookAheadBuilderForAlternatives,c=Zt(r,i,o),l(c,a,te(c)?U:D,s)),h=Oe(e.fullRuleNameToShort[t.name],256,n.idx);e.setLaFuncCache(h,u)}))})),Object(i.u)(o,(function(n){e.computeLookaheadFunc(t,n.idx,768,Gt.REPETITION,n.maxLookahead,Ot(n))})),Object(i.u)(a,(function(n){e.computeLookaheadFunc(t,n.idx,512,Gt.OPTION,n.maxLookahead,Ot(n))})),Object(i.u)(s,(function(n){e.computeLookaheadFunc(t,n.idx,1024,Gt.REPETITION_MANDATORY,n.maxLookahead,Ot(n))})),Object(i.u)(l,(function(n){e.computeLookaheadFunc(t,n.idx,1536,Gt.REPETITION_MANDATORY_WITH_SEPARATOR,n.maxLookahead,Ot(n))})),Object(i.u)(c,(function(n){e.computeLookaheadFunc(t,n.idx,1280,Gt.REPETITION_WITH_SEPARATOR,n.maxLookahead,Ot(n))}))}))}))},t.prototype.computeLookaheadFunc=function(t,e,n,r,i,o){var a=this;this.TRACE_INIT(""+o+(0===e?"":e),(function(){var o=function(t,e,n,r,i,o){var a=Jt(t,e,i,n),s=te(a)?U:D;return o(a[0],s,r)}(e,t,i||a.maxLookahead,a.dynamicTokensEnabled,r,a.lookAheadBuilderForOptional),s=Oe(a.fullRuleNameToShort[t.name],n,e);a.setLaFuncCache(s,o)}))},t.prototype.lookAheadBuilderForOptional=function(t,e,n){return function(t,e,n){var r=Object(i.o)(t,(function(t){return 1===t.length})),o=t.length;if(r&&!n){var a=Object(i.t)(t);if(1===a.length&&Object(i.A)(a[0].categoryMatches)){var s=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}var l=Object(i.O)(a,(function(t,e,n){return t[e.tokenTypeIdx]=!0,Object(i.u)(e.categoryMatches,(function(e){t[e]=!0})),t}),[]);return function(){var t=this.LA(1);return!0===l[t.tokenTypeIdx]}}return function(){t:for(var n=0;n on "+ke(t.constructor)+" CST Visitor.",type:Ce.MISSING_METHOD,methodName:e}}));return Object(i.i)(n)}(t,e),r=function(t,e){var n=[];for(var r in t)!Object(i.B)(t[r])||Object(i.j)(Ae,r)||Object(i.j)(e,r)||n.push({msg:"Redundant visitor method: <"+r+"> on "+ke(t.constructor)+" CST Visitor\nThere is no Grammar Rule corresponding to this method's name.\n",type:Ce.REDUNDANT_METHOD,methodName:r});return n}(t,e);return n.concat(r)}(this,e);if(!Object(i.A)(t)){var n=Object(i.I)(t,(function(t){return t.msg}));throw Error("Errors Detected in CST Visitor <"+ke(this.constructor)+">:\n\t"+n.join("\n\n").replace(/\n/g,"\n\t"))}}}).constructor=n,n._RULE_NAMES=e,n}!function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"}(Ce||(Ce={}));var Ae=["constructor","visit","validateVisitor"];var Ie=function(){function t(){}return t.prototype.initTreeBuilder=function(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=Object(i.w)(t,"nodeLocationTracking")?t.nodeLocationTracking:Ze.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ee,this.setNodeLocationFromNode=Ee,this.cstPostRule=i.b,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=xe,this.setNodeLocationFromNode=xe,this.cstPostRule=i.b,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error('Invalid config option: "'+t.nodeLocationTracking+'"');this.setNodeLocationFromToken=i.b,this.setNodeLocationFromNode=i.b,this.cstPostRule=i.b,this.setInitialNodeLocation=i.b}else this.cstInvocationStateUpdate=i.b,this.cstFinallyStateUpdate=i.b,this.cstPostTerminal=i.b,this.cstPostNonTerminal=i.b,this.cstPostRule=i.b},t.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(t){t.location={startOffset:NaN,endOffset:NaN}},t.prototype.setInitialNodeLocationOnlyOffsetRegular=function(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},t.prototype.setInitialNodeLocationFullRecovery=function(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.setInitialNodeLocationFullRegular=function(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.cstInvocationStateUpdate=function(t,e){var n={name:t,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},t.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},t.prototype.cstPostRuleFull=function(t){var e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==!0?(n.endOffset=e.endOffset,n.endLine=e.endLine,n.endColumn=e.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},t.prototype.cstPostRuleOnlyOffset=function(t){var e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==!0?n.endOffset=e.endOffset:n.startOffset=NaN},t.prototype.cstPostTerminal=function(t,e){var n,r,i,o=this.CST_STACK[this.CST_STACK.length-1];r=e,i=t,void 0===(n=o).children[i]?n.children[i]=[r]:n.children[i].push(r),this.setNodeLocationFromToken(o.location,e)},t.prototype.cstPostNonTerminal=function(t,e){var n=this.CST_STACK[this.CST_STACK.length-1];!function(t,e,n){void 0===t.children[e]?t.children[e]=[n]:t.children[e].push(n)}(n,e,t),this.setNodeLocationFromNode(n.location,t.location)},t.prototype.getBaseCstVisitorConstructor=function(){if(Object(i.F)(this.baseCstVisitorConstructor)){var t=Le(this.className,Object(i.G)(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor},t.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(Object(i.F)(this.baseCstVisitorWithDefaultsConstructor)){var t=function(t,e,n){var r=function(){};Ne(r,t+"BaseSemanticsWithDefaults");var o=Object.create(n.prototype);return Object(i.u)(e,(function(t){o[t]=we})),(r.prototype=o).constructor=r,r}(this.className,Object(i.G)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor},t.prototype.getLastExplicitRuleShortName=function(){var t=this.RULE_STACK;return t[t.length-1]},t.prototype.getPreviousExplicitRuleShortName=function(){var t=this.RULE_STACK;return t[t.length-2]},t.prototype.getLastExplicitRuleOccurrenceIndex=function(){var t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]},t}(),Re=function(){function t(){}return t.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(t.prototype,"input",{get:function(){return this.tokVector},set:function(t){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length},enumerable:!1,configurable:!0}),t.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Xe},t.prototype.LA=function(t){var e=this.currIdx+t;return e<0||this.tokVectorLength<=e?Xe:this.tokVector[e]},t.prototype.consumeToken=function(){this.currIdx++},t.prototype.exportLexerState=function(){return this.currIdx},t.prototype.importLexerState=function(t){this.currIdx=t},t.prototype.resetLexerState=function(){this.currIdx=-1},t.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},t.prototype.getLexerPosition=function(){return this.exportLexerState()},t}(),Me=function(){function t(){}return t.prototype.ACTION=function(t){return t.call(this)},t.prototype.consume=function(t,e,n){return this.consumeInternal(e,t,n)},t.prototype.subrule=function(t,e,n){return this.subruleInternal(e,t,n)},t.prototype.option=function(t,e){return this.optionInternal(e,t)},t.prototype.or=function(t,e){return this.orInternal(e,t)},t.prototype.many=function(t,e){return this.manyInternal(t,e)},t.prototype.atLeastOne=function(t,e){return this.atLeastOneInternal(t,e)},t.prototype.CONSUME=function(t,e){return this.consumeInternal(t,0,e)},t.prototype.CONSUME1=function(t,e){return this.consumeInternal(t,1,e)},t.prototype.CONSUME2=function(t,e){return this.consumeInternal(t,2,e)},t.prototype.CONSUME3=function(t,e){return this.consumeInternal(t,3,e)},t.prototype.CONSUME4=function(t,e){return this.consumeInternal(t,4,e)},t.prototype.CONSUME5=function(t,e){return this.consumeInternal(t,5,e)},t.prototype.CONSUME6=function(t,e){return this.consumeInternal(t,6,e)},t.prototype.CONSUME7=function(t,e){return this.consumeInternal(t,7,e)},t.prototype.CONSUME8=function(t,e){return this.consumeInternal(t,8,e)},t.prototype.CONSUME9=function(t,e){return this.consumeInternal(t,9,e)},t.prototype.SUBRULE=function(t,e){return this.subruleInternal(t,0,e)},t.prototype.SUBRULE1=function(t,e){return this.subruleInternal(t,1,e)},t.prototype.SUBRULE2=function(t,e){return this.subruleInternal(t,2,e)},t.prototype.SUBRULE3=function(t,e){return this.subruleInternal(t,3,e)},t.prototype.SUBRULE4=function(t,e){return this.subruleInternal(t,4,e)},t.prototype.SUBRULE5=function(t,e){return this.subruleInternal(t,5,e)},t.prototype.SUBRULE6=function(t,e){return this.subruleInternal(t,6,e)},t.prototype.SUBRULE7=function(t,e){return this.subruleInternal(t,7,e)},t.prototype.SUBRULE8=function(t,e){return this.subruleInternal(t,8,e)},t.prototype.SUBRULE9=function(t,e){return this.subruleInternal(t,9,e)},t.prototype.OPTION=function(t){return this.optionInternal(t,0)},t.prototype.OPTION1=function(t){return this.optionInternal(t,1)},t.prototype.OPTION2=function(t){return this.optionInternal(t,2)},t.prototype.OPTION3=function(t){return this.optionInternal(t,3)},t.prototype.OPTION4=function(t){return this.optionInternal(t,4)},t.prototype.OPTION5=function(t){return this.optionInternal(t,5)},t.prototype.OPTION6=function(t){return this.optionInternal(t,6)},t.prototype.OPTION7=function(t){return this.optionInternal(t,7)},t.prototype.OPTION8=function(t){return this.optionInternal(t,8)},t.prototype.OPTION9=function(t){return this.optionInternal(t,9)},t.prototype.OR=function(t){return this.orInternal(t,0)},t.prototype.OR1=function(t){return this.orInternal(t,1)},t.prototype.OR2=function(t){return this.orInternal(t,2)},t.prototype.OR3=function(t){return this.orInternal(t,3)},t.prototype.OR4=function(t){return this.orInternal(t,4)},t.prototype.OR5=function(t){return this.orInternal(t,5)},t.prototype.OR6=function(t){return this.orInternal(t,6)},t.prototype.OR7=function(t){return this.orInternal(t,7)},t.prototype.OR8=function(t){return this.orInternal(t,8)},t.prototype.OR9=function(t){return this.orInternal(t,9)},t.prototype.MANY=function(t){this.manyInternal(0,t)},t.prototype.MANY1=function(t){this.manyInternal(1,t)},t.prototype.MANY2=function(t){this.manyInternal(2,t)},t.prototype.MANY3=function(t){this.manyInternal(3,t)},t.prototype.MANY4=function(t){this.manyInternal(4,t)},t.prototype.MANY5=function(t){this.manyInternal(5,t)},t.prototype.MANY6=function(t){this.manyInternal(6,t)},t.prototype.MANY7=function(t){this.manyInternal(7,t)},t.prototype.MANY8=function(t){this.manyInternal(8,t)},t.prototype.MANY9=function(t){this.manyInternal(9,t)},t.prototype.MANY_SEP=function(t){this.manySepFirstInternal(0,t)},t.prototype.MANY_SEP1=function(t){this.manySepFirstInternal(1,t)},t.prototype.MANY_SEP2=function(t){this.manySepFirstInternal(2,t)},t.prototype.MANY_SEP3=function(t){this.manySepFirstInternal(3,t)},t.prototype.MANY_SEP4=function(t){this.manySepFirstInternal(4,t)},t.prototype.MANY_SEP5=function(t){this.manySepFirstInternal(5,t)},t.prototype.MANY_SEP6=function(t){this.manySepFirstInternal(6,t)},t.prototype.MANY_SEP7=function(t){this.manySepFirstInternal(7,t)},t.prototype.MANY_SEP8=function(t){this.manySepFirstInternal(8,t)},t.prototype.MANY_SEP9=function(t){this.manySepFirstInternal(9,t)},t.prototype.AT_LEAST_ONE=function(t){this.atLeastOneInternal(0,t)},t.prototype.AT_LEAST_ONE1=function(t){return this.atLeastOneInternal(1,t)},t.prototype.AT_LEAST_ONE2=function(t){this.atLeastOneInternal(2,t)},t.prototype.AT_LEAST_ONE3=function(t){this.atLeastOneInternal(3,t)},t.prototype.AT_LEAST_ONE4=function(t){this.atLeastOneInternal(4,t)},t.prototype.AT_LEAST_ONE5=function(t){this.atLeastOneInternal(5,t)},t.prototype.AT_LEAST_ONE6=function(t){this.atLeastOneInternal(6,t)},t.prototype.AT_LEAST_ONE7=function(t){this.atLeastOneInternal(7,t)},t.prototype.AT_LEAST_ONE8=function(t){this.atLeastOneInternal(8,t)},t.prototype.AT_LEAST_ONE9=function(t){this.atLeastOneInternal(9,t)},t.prototype.AT_LEAST_ONE_SEP=function(t){this.atLeastOneSepFirstInternal(0,t)},t.prototype.AT_LEAST_ONE_SEP1=function(t){this.atLeastOneSepFirstInternal(1,t)},t.prototype.AT_LEAST_ONE_SEP2=function(t){this.atLeastOneSepFirstInternal(2,t)},t.prototype.AT_LEAST_ONE_SEP3=function(t){this.atLeastOneSepFirstInternal(3,t)},t.prototype.AT_LEAST_ONE_SEP4=function(t){this.atLeastOneSepFirstInternal(4,t)},t.prototype.AT_LEAST_ONE_SEP5=function(t){this.atLeastOneSepFirstInternal(5,t)},t.prototype.AT_LEAST_ONE_SEP6=function(t){this.atLeastOneSepFirstInternal(6,t)},t.prototype.AT_LEAST_ONE_SEP7=function(t){this.atLeastOneSepFirstInternal(7,t)},t.prototype.AT_LEAST_ONE_SEP8=function(t){this.atLeastOneSepFirstInternal(8,t)},t.prototype.AT_LEAST_ONE_SEP9=function(t){this.atLeastOneSepFirstInternal(9,t)},t.prototype.RULE=function(t,e,n){if(void 0===n&&(n=Je),Object(i.j)(this.definedRulesNames,t)){var r={message:At.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:qe.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(r)}this.definedRulesNames.push(t);var o=this.defineRule(t,e,n);return this[t]=o,o},t.prototype.OVERRIDE_RULE=function(t,e,n){void 0===n&&(n=Je);var r,o,a,s,l,c=[];c=c.concat((r=t,o=this.definedRulesNames,a=this.className,l=[],i.j(o,r)||(s="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+a+"<-as it is not defined in any of the super grammars ",l.push({message:s,type:qe.INVALID_RULE_OVERRIDE,ruleName:r})),l)),this.definitionErrors.push.apply(this.definitionErrors,c);var u=this.defineRule(t,e,n);return this[t]=u,u},t.prototype.BACKTRACK=function(t,e){return function(){this.isBackTrackingStack.push(1);var n=this.saveRecogState();try{return t.apply(this,e),!0}catch(t){if(fe(t))return!1;throw t}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}},t.prototype.getGAstProductions=function(){return this.gastProductionsCache},t.prototype.getSerializedGastProductions=function(){return dt(Object(i.U)(this.gastProductionsCache))},t}(),_e=function(){function t(){}return t.prototype.initRecognizerEngine=function(t,e){if(this.className=ke(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=U,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Object(i.w)(e,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a property.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(Object(i.y)(t)){if(Object(i.A)(t))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof t[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(Object(i.y)(t))this.tokensMap=Object(i.O)(t,(function(t,e){return t[e.name]=e,t}),{});else if(Object(i.w)(t,"modes")&&Object(i.o)(Object(i.t)(Object(i.U)(t.modes)),z)){var n=Object(i.t)(Object(i.U)(t.modes)),r=Object(i.T)(n);this.tokensMap=Object(i.O)(r,(function(t,e){return t[e.name]=e,t}),{})}else{if(!Object(i.C)(t))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Object(i.h)(t)}this.tokensMap.EOF=Q;var o=Object(i.o)(Object(i.U)(t),(function(t){return Object(i.A)(t.categoryMatches)}));this.tokenMatcher=o?U:D,B(Object(i.U)(this.tokensMap))},t.prototype.defineRule=function(t,e,n){if(this.selfAnalysisDone)throw Error("Grammar rule <"+t+"> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");var r,o=Object(i.w)(n,"resyncEnabled")?n.resyncEnabled:Je.resyncEnabled,a=Object(i.w)(n,"recoveryValueFunc")?n.recoveryValueFunc:Je.recoveryValueFunc,s=this.ruleShortNameIdx<<12;function l(t){try{if(!0===this.outputCst){e.apply(this,t);var n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}return e.apply(this,t)}catch(t){return this.invokeRuleCatch(t,o,a)}finally{this.ruleFinallyStateUpdate()}}this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=t,this.fullRuleNameToShort[t]=s;return(r=function(e,n){return void 0===e&&(e=0),this.ruleInvocationStateUpdate(s,t,e),l.call(this,n)}).ruleName=t,r.originalGrammarAction=e,r},t.prototype.invokeRuleCatch=function(t,e,n){var r=1===this.RULE_STACK.length,i=e&&!this.isBackTracking()&&this.recoveryEnabled;if(fe(t)){var o=t;if(i){var a,s=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(s))return o.resyncedTokens=this.reSyncTo(s),this.outputCst?((a=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,a):n();throw this.outputCst&&((a=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,o.partialCstResult=a),o}if(r)return this.moveToTerminatedState(),n();throw o}throw t},t.prototype.optionInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,n)},t.prototype.optionInternalLogic=function(t,e,n){var r,i,o=this,a=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,void 0!==(i=t.GATE)){var s=a;a=function(){return i.call(o)&&s.call(o)}}}else r=t;if(!0===a.call(this))return r.call(this)},t.prototype.atLeastOneInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,e,n)},t.prototype.atLeastOneInternalLogic=function(t,e,n){var r,i,o=this,a=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,void 0!==(i=e.GATE)){var s=a;a=function(){return i.call(o)&&s.call(o)}}}else r=e;if(!0!==a.call(this))throw this.raiseEarlyExitException(t,Gt.REPETITION_MANDATORY,e.ERR_MSG);for(var l=this.doSingleRepetition(r);!0===a.call(this)&&!0===l;)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,e],a,1024,t,Ut)},t.prototype.atLeastOneSepFirstInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,e,n)},t.prototype.atLeastOneSepFirstInternalLogic=function(t,e,n){var r=this,i=e.DEF,o=e.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(t,Gt.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);i.call(this);for(var a=function(){return r.tokenMatcher(r.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,a,i,Ft],a,1536,t,Ft)},t.prototype.manyInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,n)},t.prototype.manyInternalLogic=function(t,e,n){var r,i,o=this,a=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,void 0!==(i=e.GATE)){var s=a;a=function(){return i.call(o)&&s.call(o)}}}else r=e;for(var l=!0;!0===a.call(this)&&!0===l;)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[t,e],a,768,t,jt,l)},t.prototype.manySepFirstInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,e,n)},t.prototype.manySepFirstInternalLogic=function(t,e,n){var r=this,i=e.DEF,o=e.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){i.call(this);for(var a=function(){return r.tokenMatcher(r.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,a,i,Dt],a,1280,t,Dt)}},t.prototype.repetitionSepSecondInternal=function(t,e,n,r,i){for(;n();)this.CONSUME(e),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,n,r,i],n,1536,t,i)},t.prototype.doSingleRepetition=function(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e},t.prototype.orInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(256,e),r=Object(i.y)(t)?t:t.DEF,o=this.getLaFuncFromCache(n).call(this,r);if(void 0!==o)return r[o].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)},t.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){var t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new me(e,t))}},t.prototype.subruleInternal=function(t,e,n){var r;try{var i=void 0!==n?n.ARGS:void 0;return r=t.call(this,e,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:t.ruleName),r}catch(e){this.subruleInternalError(e,n,t.ruleName)}},t.prototype.subruleInternalError=function(t,e,n){throw fe(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:n),delete t.partialCstResult),t},t.prototype.consumeInternal=function(t,e,n){var r;try{var i=this.LA(1);!0===this.tokenMatcher(i,t)?(this.consumeToken(),r=i):this.consumeInternalError(t,i,n)}catch(n){r=this.consumeInternalRecovery(t,e,n)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:t.name,r),r},t.prototype.consumeInternalError=function(t,e,n){var r,i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new pe(r,e,i))},t.prototype.consumeInternalRecovery=function(t,e,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;var r=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,r)}catch(t){throw"InRuleRecoveryException"===t.name?n:t}},t.prototype.saveRecogState=function(){var t=this.errors,e=Object(i.g)(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}},t.prototype.reloadRecogState=function(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK},t.prototype.ruleInvocationStateUpdate=function(t,e,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e,t)},t.prototype.isBackTracking=function(){return 0!==this.isBackTrackingStack.length},t.prototype.getCurrRuleFullName=function(){var t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]},t.prototype.shortRuleNameToFullName=function(t){return this.shortRuleNameToFull[t]},t.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),Q)},t.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},t}(),Pe=function(){function t(){}return t.prototype.initErrorHandler=function(t){this._errors=[],this.errorMessageProvider=Object(i.w)(t,"errorMessageProvider")?t.errorMessageProvider:Ze.errorMessageProvider},t.prototype.SAVE_ERROR=function(t){if(fe(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Object(i.g)(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(t.prototype,"errors",{get:function(){return Object(i.g)(this._errors)},set:function(t){this._errors=t},enumerable:!1,configurable:!0}),t.prototype.raiseEarlyExitException=function(t,e,n){for(var r=this.getCurrRuleFullName(),i=Jt(t,this.getGAstProductions()[r],e,this.maxLookahead)[0],o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new ge(s,this.LA(1),this.LA(0)))},t.prototype.raiseNoAltException=function(t,e){for(var n=this.getCurrRuleFullName(),r=Zt(t,this.getGAstProductions()[n],this.maxLookahead),i=[],o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));var a=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:a,customUserDescription:e,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new de(s,this.LA(1),a))},t}(),je=function(){function t(){}return t.prototype.initContentAssist=function(){},t.prototype.computeContentAssist=function(t,e){var n=this.gastProductionsCache[t];if(Object(i.F)(n))throw Error("Rule ->"+t+"<- does not exist in this grammar.");return Bt([n],e,this.tokenMatcher,this.maxLookahead)},t.prototype.getNextPossibleTokenTypes=function(t){var e=Object(i.s)(t.ruleStack),n=this.getGAstProductions()[e];return new _t(n,t).startWalking()},t}(),De={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(De);var Ue=Math.pow(2,8)-1,Fe=J({name:"RECORDING_PHASE_TOKEN",pattern:$.NA});B([Fe]);var We=tt(Fe,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(We);var Be={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},He=function(){function t(){}return t.prototype.initGastRecorder=function(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1},t.prototype.enableRecording=function(){var t=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(function(){for(var e=function(e){var n=e>0?e:"";t["CONSUME"+n]=function(t,n){return this.consumeInternalRecord(t,e,n)},t["SUBRULE"+n]=function(t,n){return this.subruleInternalRecord(t,e,n)},t["OPTION"+n]=function(t){return this.optionInternalRecord(t,e)},t["OR"+n]=function(t){return this.orInternalRecord(t,e)},t["MANY"+n]=function(t){this.manyInternalRecord(e,t)},t["MANY_SEP"+n]=function(t){this.manySepFirstInternalRecord(e,t)},t["AT_LEAST_ONE"+n]=function(t){this.atLeastOneInternalRecord(e,t)},t["AT_LEAST_ONE_SEP"+n]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}},n=0;n<10;n++)e(n);t.consume=function(t,e,n){return this.consumeInternalRecord(e,t,n)},t.subrule=function(t,e,n){return this.subruleInternalRecord(e,t,n)},t.option=function(t,e){return this.optionInternalRecord(e,t)},t.or=function(t,e){return this.orInternalRecord(e,t)},t.many=function(t,e){this.manyInternalRecord(t,e)},t.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},t.ACTION=t.ACTION_RECORD,t.BACKTRACK=t.BACKTRACK_RECORD,t.LA=t.LA_RECORD}))},t.prototype.disableRecording=function(){var t=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(function(){for(var e=0;e<10;e++){var n=e>0?e:"";delete t["CONSUME"+n],delete t["SUBRULE"+n],delete t["OPTION"+n],delete t["OR"+n],delete t["MANY"+n],delete t["MANY_SEP"+n],delete t["AT_LEAST_ONE"+n],delete t["AT_LEAST_ONE_SEP"+n]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA}))},t.prototype.ACTION_RECORD=function(t){},t.prototype.BACKTRACK_RECORD=function(t,e){return function(){return!0}},t.prototype.LA_RECORD=function(t){return Xe},t.prototype.topLevelRuleRecord=function(t,e){try{var n=new ot({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),e.call(this),this.recordingProdStack.pop(),n}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(e){throw t}throw t}},t.prototype.optionInternalRecord=function(t,e){return Ge.call(this,st,t,e)},t.prototype.atLeastOneInternalRecord=function(t,e){Ge.call(this,lt,e,t)},t.prototype.atLeastOneSepFirstInternalRecord=function(t,e){Ge.call(this,ct,e,t,!0)},t.prototype.manyInternalRecord=function(t,e){Ge.call(this,ut,e,t)},t.prototype.manySepFirstInternalRecord=function(t,e){Ge.call(this,ht,e,t,!0)},t.prototype.orInternalRecord=function(t,e){return ze.call(this,t,e)},t.prototype.subruleInternalRecord=function(t,e,n){if(Ke(e),!t||!1===Object(i.w)(t,"ruleName")){var r=new Error(" argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(t)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var o=Object(i.M)(this.recordingProdStack),a=t.ruleName,s=new it({idx:e,nonTerminalName:a,referencedRule:void 0});return o.definition.push(s),this.outputCst?Be:De},t.prototype.consumeInternalRecord=function(t,e,n){if(Ke(e),!H(t)){var r=new Error(" argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(t)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var o=Object(i.M)(this.recordingProdStack),a=new pt({idx:e,terminalType:t});return o.definition.push(a),We},t}();function Ge(t,e,n,r){void 0===r&&(r=!1),Ke(n);var o=Object(i.M)(this.recordingProdStack),a=Object(i.B)(e)?e:e.DEF,s=new t({definition:[],idx:n});return r&&(s.separator=e.SEP),Object(i.w)(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),o.definition.push(s),this.recordingProdStack.pop(),De}function ze(t,e){var n=this;Ke(e);var r=Object(i.M)(this.recordingProdStack),o=!1===Object(i.y)(t),a=!1===o?t:t.DEF,s=new ft({definition:[],idx:e,ignoreAmbiguities:o&&!0===t.IGNORE_AMBIGUITIES});Object(i.w)(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD);var l=Object(i.Q)(a,(function(t){return Object(i.B)(t.GATE)}));return s.hasPredicates=l,r.definition.push(s),Object(i.u)(a,(function(t){var e=new at({definition:[]});s.definition.push(e),Object(i.w)(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:Object(i.w)(t,"GATE")&&(e.ignoreAmbiguities=!0),n.recordingProdStack.push(e),t.ALT.call(n),n.recordingProdStack.pop()})),De}function Ve(t){return 0===t?"":""+t}function Ke(t){if(t<0||t>Ue){var e=new Error("Invalid DSL Method idx value: <"+t+">\n\tIdx value must be a none negative value smaller than "+(Ue+1));throw e.KNOWN_RECORDER_ERROR=!0,e}}var Ye=function(){function t(){}return t.prototype.initPerformanceTracer=function(t){if(Object(i.w)(t,"traceInitPerf")){var e=t.traceInitPerf,n="number"==typeof e;this.traceInitMaxIdent=n?e:1/0,this.traceInitPerf=n?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=Ze.traceInitPerf;this.traceInitIndent=-1},t.prototype.TRACE_INIT=function(t,e){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent");var r=Object(i.R)(e),o=r.time,a=r.value,s=o>10?console.warn:console.log;return this.traceInitIndent time: "+o+"ms"),this.traceInitIndent--,a}return e()},t}(),$e=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xe=tt(Q,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Xe);var qe,Ze=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:wt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Je=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function Qe(t){return void 0===t&&(t=void 0),function(){return t}}!function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"}(qe||(qe={}));var tn=function(){function t(t,e){this.definitionErrors=[],this.selfAnalysisDone=!1;if(this.initErrorHandler(e),this.initLexerAdapter(),this.initLooksAhead(e),this.initRecognizerEngine(t,e),this.initRecoverable(e),this.initTreeBuilder(e),this.initContentAssist(),this.initGastRecorder(e),this.initPerformanceTracer(e),Object(i.w)(e,"ignoredIssues"))throw new Error("The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=Object(i.w)(e,"skipValidations")?e.skipValidations:Ze.skipValidations}return t.performSelfAnalysis=function(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")},t.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",(function(){var n;e.selfAnalysisDone=!0;var r=e.className;e.TRACE_INIT("toFastProps",(function(){Object(i.S)(e)})),e.TRACE_INIT("Grammar Recording",(function(){try{e.enableRecording(),Object(i.u)(e.definedRulesNames,(function(t){var n=e[t].originalGrammarAction,r=void 0;e.TRACE_INIT(t+" Rule",(function(){r=e.topLevelRuleRecord(t,n)})),e.gastProductionsCache[t]=r}))}finally{e.disableRecording()}}));var o=[];if(e.TRACE_INIT("Grammar Resolving",(function(){o=le({rules:Object(i.U)(e.gastProductionsCache)}),e.definitionErrors.push.apply(e.definitionErrors,o)})),e.TRACE_INIT("Grammar Validations",(function(){if(Object(i.A)(o)&&!1===e.skipValidations){var t=ce({rules:Object(i.U)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:Object(i.U)(e.tokensMap),errMsgProvider:At,grammarName:r});e.definitionErrors.push.apply(e.definitionErrors,t)}})),Object(i.A)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",(function(){var t,n,r=(t=Object(i.U)(e.gastProductionsCache),n={},Object(i.u)(t,(function(t){var e=new Nt(t).startWalking();Object(i.f)(n,e)})),n);e.resyncFollows=r})),e.TRACE_INIT("ComputeLookaheadFunctions",(function(){e.preComputeLookaheadFunctions(Object(i.U)(e.gastProductionsCache))}))),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Object(i.A)(e.definitionErrors))throw n=Object(i.I)(e.definitionErrors,(function(t){return t.message})),new Error("Parser Definition Errors detected:\n "+n.join("\n-------------------------------\n"))}))},t.DEFER_DEFINITION_ERRORS_HANDLING=!1,t}();Object(i.e)(tn,[be,Se,Ie,Re,_e,Me,Pe,je,He,Ye]);var en=function(t){function e(e,n){void 0===n&&(n=Ze);var r=Object(i.h)(n);return r.outputCst=!0,t.call(this,e,r)||this}return $e(e,t),e}(tn),nn=function(t){function e(e,n){void 0===n&&(n=Ze);var r=Object(i.h)(n);return r.outputCst=!1,t.call(this,e,r)||this}return $e(e,t),e}(tn);function rn(t,e){var n=void 0===e?{}:e,i=n.resourceBase,o=void 0===i?"https://unpkg.com/chevrotain@"+r+"/diagrams/":i,a=n.css;return'\n\x3c!-- This is a generated file --\x3e\n\n\n\n\n'+("\n\n")+("\n \ No newline at end of file +

The regular expression returned by this will be "/(?<TestGroup>Hello(?<InnerGroup>World))/". Again, in JavaScript, the following

"HelloWorld".match(/(?<TestGroup>Hello(?<InnerGroup>World))/).groups

Will return an object with {TestGroup: "HelloWorld", InnerGroup: "World"}.


Putting it all together

Grouping, repetition, and matching are the 3 primary elements that make up H2R. They can be combined in any way to generate a regular expression. See the main page for an example that combines all above to parse a URL.

Advanced features

Backreferences

Sometimes you may wish to match the same text as a previously matched. Take for example matching opening and closing XML tags such as <hello>world</hello>:

match "<"
+create a group called opening_tag
+	match a word or digit or "_" or "-"
+match ">"
+match 0+ not "<"
+match "</" 
+create a group called closing_tag
+	match a word or digit or "_" or "-"
+match ">"
+

To ensure you matched the same opening tag as closing tag, you'll normally need to perform an additional step afterwards by checking the capture groups are equal. However, in most regex engines, this can be performed automatically through backreferences. Backreferences effectively re-capture the same group. Human2Regex allows you to rerun or recapture a previous group.

match "<"
+create a group called tag
+	match a word or digit or "_" or "-"
+match ">"
+match 0+ not "<"
+match "</" 
+recapture tag
+match ">"
+

The regex will only successfully match if both the tags are the same. One thing to note however, the first group must be captured. For a "function"-like capture see regex subroutines (not yet implemented).

To allow for a more natural language, recapture the group and recapture the group called are also supported.

If statements

Certain regex languages support if statements which can be used simplify statements. Human2Regex supports if, else if, and else statements. Inside each if, you can recapture a group or run a new match. This is done as the following:

if match "hello" then optionally "world"
+	match "!"
+else if match "goodbye" then optionally "world"
+	match "!"
+

or

create a group called tag
+	match "<" then a word or digit or "_" or "-" then ">"
+//do we have another tag? keep matching the same tags
+if rerun tag
+	repeat
+		recapture tag
+//ignore everything else
+else
+	match 0+ any thing
+

Unicode character properties

You can match specific unicode sequences using "\uXXXX" or "\UXXXXXXXX" where X is a hexadecimal character. match "\u0669" // matches arabic digit 9 "٩" Unicode character classes/scripts can be matched using the unicode keyword. match unicode "Latin" // matches any latin character match unicode "N" // matches any number character The following Unicode class specifiers are available:

ClassDescription
COther
CcControl
CfFormat
CnUnassigned
CoPrivate use
CsSurrogate
LLetter
LlLower case letter
LmModifier letter
LoOther letter
LtTitle case letter
LuUpper case letter
MMark
McSpacing mark
MeEnclosing mark
MnNon-spacing mark
NNumber
NdDecimal number
NlLetter number
NoOther number
PPunctuation
PcConnector punctuation
PdDash punctuation
PeClose punctuation
PfFinal punctuation
PiInitial punctuation
PoOther punctuation
PsOpen punctuation
SSymbol
ScCurrency symbol
SkModifier symbol
SmMathematical symbol
SoOther symbol
ZSeparator
ZlLine separator
ZpParagraph separator
ZsSpace separator

The following Unicode script specifiers are available:

Note: Java and .NET require "Is" in front of the script name. For example, "IsLatin" rather than just "Latin"

ArabicArmenianAvestanBalineseBamum
BatakBengaliBopomofoBrahmiBraille
BugineseBuhidCanadian_AboriginalCarianChakma
ChamCherokeeCommonCopticCuneiform
CypriotCyrillicDeseretDevanagariEgyptian_Hieroglyphs
EthiopicGeorgianGlagoliticGothicGreek
GujaratiGurmukhiHanHangulHanunoo
HebrewHiraganaImperial_AramaicInheritedInscriptional_Pahlavi
Inscriptional_ParthianJavaneseKaithiKannadaKatakana
Kayah_LiKharoshthiKhmerLaoLatin
LepchaLimbuLinear_BLisuLycian
LydianMalayalamMandaicMeetei_MayekMeroitic_Cursive
Meroitic_HieroglyphsMiaoMongolianMyanmarNew_Tai_Lue
NkoOghamOld_ItalicOld_PersianOld_South_Arabian
Old_TurkicOl_ChikiOriyaOsmanyaPhags_Pa
PhoenicianRejangRunicSamaritanSaurashtra
SharadaShavianSinhalaSora_SompengSundanese
Syloti_NagriSyriacTagalogTagbanwaTai_Le
Tai_ThamTai_VietTakriTamilTelugu
ThaanaThaiTibetanTifinaghUgaritic
VaiYi   
\ No newline at end of file diff --git a/lib/parser.js b/lib/parser.js index a53f708..576ee70 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -507,7 +507,7 @@ class Human2RegexParser extends chevrotain_1.EmbeddedActionsParser { tokens.push($.CONSUME(T.Optional)); optional = true; }); - tokens.push($.CONSUME(T.Call)); + tokens.push($.CONSUME(T.Rerun)); $.OPTION6(() => count = $.SUBRULE(CountSubStatement)); $.OPTION7(() => { $.OPTION(() => $.CONSUME(T.The)); diff --git a/lib/tokens.d.ts b/lib/tokens.d.ts index e9eb000..00a9f8c 100644 --- a/lib/tokens.d.ts +++ b/lib/tokens.d.ts @@ -51,7 +51,7 @@ /** @internal */ export declare const CaseInsensitive: import("chevrotain").TokenType; /** @internal */ export declare const CaseSensitive: import("chevrotain").TokenType; /** @internal */ export declare const OrMore: import("chevrotain").TokenType; -/** @internal */ export declare const Call: import("chevrotain").TokenType; +/** @internal */ export declare const Rerun: import("chevrotain").TokenType; /** @internal */ export declare const The: import("chevrotain").TokenType; /** @internal */ export declare const If: import("chevrotain").TokenType; /** @internal */ export declare const Else: import("chevrotain").TokenType; diff --git a/lib/tokens.js b/lib/tokens.js index 09230a4..7a223a1 100644 --- a/lib/tokens.js +++ b/lib/tokens.js @@ -2,7 +2,7 @@ /*! Copyright (c) 2021 Patrick Demian; Licensed under MIT */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CaseInsensitive = exports.CarriageReturn = exports.Newline = exports.Repeat = exports.Called = exports.Create = exports.To = exports.From = exports.Exclusive = exports.Inclusive = exports.Exactly = exports.Times = exports.A = exports.Group = exports.Linefeed = exports.Tab = exports.Between = exports.Not = exports.Matching = exports.Exact = exports.Multiline = exports.Global = exports.Using = exports.Unicode = exports.Number = exports.Boundary = exports.Whitespace = exports.Integer = exports.Decimal = exports.Letter = exports.Character = exports.Digit = exports.Word = exports.And = exports.Or = exports.Anything = exports.Then = exports.Match = exports.Optional = exports.Ten = exports.Nine = exports.Eight = exports.Seven = exports.Six = exports.Five = exports.Four = exports.Three = exports.Two = exports.One = exports.Zero = void 0; -exports.AllTokens = exports.Outdent = exports.Indent = exports.StringLiteral = exports.NumberLiteral = exports.Identifier = exports.MultilineComment = exports.SingleLineComment = exports.WS = exports.EndOfLine = exports.Else = exports.If = exports.The = exports.Call = exports.OrMore = exports.CaseSensitive = void 0; +exports.AllTokens = exports.Outdent = exports.Indent = exports.StringLiteral = exports.NumberLiteral = exports.Identifier = exports.MultilineComment = exports.SingleLineComment = exports.WS = exports.EndOfLine = exports.Else = exports.If = exports.The = exports.Rerun = exports.OrMore = exports.CaseSensitive = void 0; /** * The tokens required for Human2Regex * @packageDocumentation @@ -60,7 +60,7 @@ const chevrotain_1 = require("chevrotain"); /** @internal */ exports.CaseInsensitive = chevrotain_1.createToken({ name: "CaseInsensitive", pattern: /case insensitive/i }); /** @internal */ exports.CaseSensitive = chevrotain_1.createToken({ name: "CaseSensitive", pattern: /case sensitive/i }); /** @internal */ exports.OrMore = chevrotain_1.createToken({ name: "OrMore", pattern: /\+|or more/i }); -/** @internal */ exports.Call = chevrotain_1.createToken({ name: "Call", pattern: /call|invoke|execute|(re ?)?run/i }); +/** @internal */ exports.Rerun = chevrotain_1.createToken({ name: "Rerun", pattern: /re( |-)?(run|capture)/i }); /** @internal */ exports.The = chevrotain_1.createToken({ name: "The", pattern: /the/i }); /** @internal */ exports.If = chevrotain_1.createToken({ name: "If", pattern: /if/i }); /** @internal */ exports.Else = chevrotain_1.createToken({ name: "Else", pattern: /else|otherwise/i }); @@ -107,7 +107,7 @@ exports.AllTokens = [ exports.Number, exports.Unicode, exports.Called, - exports.Call, + exports.Rerun, exports.If, exports.Else, exports.The, diff --git a/package-lock.json b/package-lock.json index 8868698..8337c6a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2211,6 +2211,16 @@ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, + "clean-webpack-plugin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-3.0.0.tgz", + "integrity": "sha512-MciirUH5r+cYLGCOL5JX/ZLzOZbVr1ot3Fw+KcvbhUb6PM+yycqd9ZhIlcigQ5gl+XhppNmw3bEFuaaMNyLj3A==", + "dev": true, + "requires": { + "@types/webpack": "^4.4.31", + "del": "^4.1.1" + } + }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -3048,6 +3058,74 @@ } } }, + "del": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", + "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "globby": "^6.1.0", + "is-path-cwd": "^2.0.0", + "is-path-in-cwd": "^2.0.0", + "p-map": "^2.0.0", + "pify": "^4.0.1", + "rimraf": "^2.6.3" + }, + "dependencies": { + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -4917,6 +4995,32 @@ "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true }, + "is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "dev": true + }, + "is-path-in-cwd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", + "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", + "dev": true, + "requires": { + "is-path-inside": "^2.1.0" + }, + "dependencies": { + "is-path-inside": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", + "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", + "dev": true, + "requires": { + "path-is-inside": "^1.0.2" + } + } + } + }, "is-path-inside": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", @@ -6651,6 +6755,12 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", diff --git a/package.json b/package.json index bcfe1b1..2627730 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "@typescript-eslint/eslint-plugin": "^4.11.1", "@typescript-eslint/parser": "^4.11.1", "before-build-webpack": "^0.2.9", + "clean-webpack-plugin": "^3.0.0", "codecov": "^3.8.1", "copy-webpack-plugin": "^6.4.1", "css-loader": "^4.3.0", diff --git a/src/docs/CNAME b/src/docs/assets/CNAME similarity index 100% rename from src/docs/CNAME rename to src/docs/assets/CNAME diff --git a/src/docs/bootstrap.css b/src/docs/assets/bootstrap.css similarity index 100% rename from src/docs/bootstrap.css rename to src/docs/assets/bootstrap.css diff --git a/src/docs/cleanblog.css b/src/docs/assets/cleanblog.css similarity index 100% rename from src/docs/cleanblog.css rename to src/docs/assets/cleanblog.css diff --git a/src/docs/codemirror.css b/src/docs/assets/codemirror.css similarity index 100% rename from src/docs/codemirror.css rename to src/docs/assets/codemirror.css diff --git a/src/docs/favicon-small.png b/src/docs/assets/favicon-small.png similarity index 100% rename from src/docs/favicon-small.png rename to src/docs/assets/favicon-small.png diff --git a/src/docs/favicon.ico b/src/docs/assets/favicon.ico similarity index 100% rename from src/docs/favicon.ico rename to src/docs/assets/favicon.ico diff --git a/src/docs/favicon.png b/src/docs/assets/favicon.png similarity index 100% rename from src/docs/favicon.png rename to src/docs/assets/favicon.png diff --git a/src/docs/style.css b/src/docs/assets/style.css similarity index 89% rename from src/docs/style.css rename to src/docs/assets/style.css index a49a5ed..fb512d5 100644 --- a/src/docs/style.css +++ b/src/docs/assets/style.css @@ -182,3 +182,25 @@ pre code { .heading-link:focus { color: rgba(255, 255, 255, .8) } + +.tut-contents { + display: table; + padding: 7px; + border: 1px solid #a2a9b1; + background-color: #f8f9fa; + padding: 5px; + font-size: 16px!important; +} +.tut-title { + text-align: center; + font-weight: bold; +} +.tut-contents li { + list-style-type: none; +} +.tut-contents>ul { + margin-top: 0; + padding-left: 0; + margin-left: 0.5em; + margin-right: 0.5em; +} \ No newline at end of file diff --git a/src/docs/example_code.hbs b/src/docs/partials/example_code.hbs similarity index 100% rename from src/docs/example_code.hbs rename to src/docs/partials/example_code.hbs diff --git a/src/docs/footer.hbs b/src/docs/partials/footer.hbs similarity index 100% rename from src/docs/footer.hbs rename to src/docs/partials/footer.hbs diff --git a/src/docs/header.hbs b/src/docs/partials/header.hbs similarity index 100% rename from src/docs/header.hbs rename to src/docs/partials/header.hbs diff --git a/src/docs/tutorial.hbs b/src/docs/tutorial.hbs index 96c7f42..7e1bb50 100644 --- a/src/docs/tutorial.hbs +++ b/src/docs/tutorial.hbs @@ -4,34 +4,57 @@
-

Tutorial

+

Tutorial


0. Preface

Human2Regex (H2R) is a way to spell out a regular expression in an easy to read, easy to modify language. H2R supports multiple languages as well as many (though not all) different regular expression options such as named groups and quantifiers. You may notice multiple keywords specifying the same thing, and that is intended! Just like how in English there are many ways to express yourself, H2R is made to be flexible and easy to understand. With a range, do you prefer "...", "through", or "to"? It's up to you to choose, H2R supports all of those!

+ +

1. Your first Match

Every language starts with a "Hello World" program, so let's match the output of those programs. Matching is done using the keyword {{i-code}}match{{end-i-code}} followed by what you want to match. -{{s-code}} -match "Hello World" -{{end-s-code}} +{{s-code}}match "Hello World"{{end-s-code}} The above statement will generate a regular expression that matches "Hello World", like "/Hello World/". Any invalid characters will automatically be escaped, so you don't need to worry about it. H2R also supports block comments with {{i-code}}/**/{{end-i-code}}, or line comments with {{i-code}}//{{end-i-code}} or {{i-code}}#{{end-i-code}} so you can explain why or what you intend to match.

{{p-code}}/* This is a block comment */ match "Hello World" // matches the output of "Hello World" programs {{end-p-code}}

Now what if we want to match every case variation of "Hello World" like "hello world" or "hELLO wORLD"? H2R supports the {{i-code}}or{{end-i-code}} operator which allows you to specify many possible combinations. -{{s-code}} -match "Hello World" or "hello world" or "hELLO wORLD" -{{end-s-code}} +{{s-code}}match "Hello World" or "hello world" or "hELLO wORLD"{{end-s-code}} Or, you can use a {{i-code}}using{{end-i-code}} statement to specify that you want it to be case insensitive.


2. Using Specifiers

Using statements appear at the beginning. You may have one or more using statements which each can contain one or more specifiers. For example: -{{s-code}} -using global and case insensitive matching -{{end-s-code}} +{{s-code}}using global and case insensitive matching{{end-s-code}} or

{{p-code}}using global using case insensitive @@ -76,7 +99,7 @@ using case insensitive

To match any variation of hello world, we would then do the following:

-
{{i-code}}using case insensitive matching
+{{p-code}}using case insensitive matching
 match "hello world"
 {{end-p-code}}
 
@@ -88,56 +111,36 @@ match " "
 match "world"
 {{end-p-code}}
 				

However, you can also use a comma, {{i-code}}and{{end-i-code}}, or {{i-code}}then{{end-i-code}} for a more concise match. -{{s-code}} -match "hello", " ", "world" -{{end-s-code}} +{{s-code}}match "hello", " ", "world"{{end-s-code}} or -{{s-code}} -match "hello" and " " and "world" -{{end-s-code}} +{{s-code}}match "hello" and " " and "world"{{end-s-code}} or -{{s-code}} -match "hello" then " " then "world" -{{end-s-code}} +{{s-code}}match "hello" then " " then "world"{{end-s-code}} or any combination like -{{s-code}} -match "hello", " " and then "world" -{{end-s-code}} +{{s-code}}match "hello", " " and then "world"{{end-s-code}}

4. Optionality

Sometimes you wish to match something that may or may not exist. In H2R, this is done via the {{i-code}}optional{{end-i-code}}, {{i-code}}optionally{{end-i-code}}, {{i-code}}possibly{{end-i-code}} or {{i-code}}maybe{{end-i-code}} keyword. -{{s-code}} -optionally match "hello world" -{{end-s-code}} +{{s-code}}optionally match "hello world"{{end-s-code}} will match 0 or 1 "hello world"'s. This can be used alongside matching multiple statements in a single {{i-code}}match{{end-i-code}} statement. -{{s-code}} -match "hello", maybe " ", "world" -{{end-s-code}} +{{s-code}}match "hello", maybe " ", "world"{{end-s-code}} will match "hello", an optional space if it exists, and "world". However, the start {{i-code}}optional{{end-i-code}} is for the entire match statement. Thus, -{{s-code}} -possibly match "hello", " ", then "world" -{{end-s-code}} +{{s-code}}possibly match "hello", " ", then "world"{{end-s-code}} will actually make the whole "hello world" an optional match rather than just the first "hello". If you want to make the first match optional but keep the rest required, place the {{i-code}}optional{{end-i-code}} immediately after the {{i-code}}match{{end-i-code}}.


5. Negation

You can negate a match with the operator {{i-code}}not{{end-i-code}} -{{s-code}} -match not "hello world" -{{end-s-code}} +{{s-code}}match not "hello world"{{end-s-code}} or -{{s-code}} -match anything but "hello world" -{{end-s-code}} +{{s-code}}match anything but "hello world"{{end-s-code}} will match everything except for "hello world".


6. Other matching specifiers

Many times you don't know exactly what you wish to match. H2R comes with many specifiers that you can use for your matching. For example, you may wish to match any word. You can do that with: -{{s-code}} -match a word -{{end-s-code}} +{{s-code}}match a word{{end-s-code}} The {{i-code}}a{{end-i-code}} or {{i-code}}an{{end-i-code}} is optional. The possible specifiers that H2R supports are the following:

@@ -223,64 +226,36 @@ match a word

You can also create ranges of characters to match. Say for example, you wanted to match any characters between a and z, you could write any of the following: -{{s-code}} -match from "a" to "z" // "from" is optional -{{end-s-code}} +{{s-code}}match from "a" to "z" // "from" is optional{{end-s-code}} or -{{s-code}} -match between "a" and "z" // "between" is optional -{{end-s-code}} +{{s-code}}match between "a" and "z" // "between" is optional{{end-s-code}} or -{{s-code}} -match "a" ... "z" // can use "..." or ".." -{{end-s-code}} +{{s-code}}match "a" ... "z" // can use "..." or ".."{{end-s-code}} or -{{s-code}} -match "a" - "z" -{{end-s-code}} +{{s-code}}match "a" - "z"{{end-s-code}} or -{{s-code}} -match "a" through "z" // can also use thru -{{end-s-code}} +{{s-code}}match "a" through "z" // can also use thru{{end-s-code}}

7. Repetition

H2R supports 2 types of repetition: single match repetition, or grouped repetition. When using {{i-code}}match{{end-i-code}} you can specify the number of captures you want just before the text to capture. -{{s-code}} -match 2 digits -{{end-s-code}} +{{s-code}}match 2 digits{{end-s-code}} or -{{s-code}} -match exactly 2 digits -{{end-s-code}} +{{s-code}}match exactly 2 digits{{end-s-code}} will match any 2 digits in a row. You can also specify a range you wish to capture -{{s-code}} -match 2 ... 5 digits -{{end-s-code}} +{{s-code}}match 2 ... 5 digits{{end-s-code}} or -{{s-code}} -match 2 to 5 digits -{{end-s-code}} +{{s-code}}match 2 to 5 digits{{end-s-code}} or -{{s-code}} -match between 2 to 5 digits -{{end-s-code}} +{{s-code}}match between 2 to 5 digits{{end-s-code}} will match 2, 3, 4, or 5 digits. You can specify if the final number is exclusive with the {{i-code}}exclusive{{end-i-code}} or {{i-code}}inclusive{{end-i-code}} keywords. -{{s-code}} -match 2 to 5 exclusive digits -{{end-s-code}} +{{s-code}}match 2 to 5 exclusive digits{{end-s-code}} will only match up to 4 digits. You can also choose to leave the end unspecified. -{{s-code}} -match 2+ digits -{{end-s-code}} +{{s-code}}match 2+ digits{{end-s-code}} or -{{s-code}} -match 2 or more digits -{{end-s-code}} +{{s-code}}match 2 or more digits{{end-s-code}} will match 2 or more digits. Repeition can be chained with the {{i-code}}and then{{end-i-code}} keywords or the {{i-code}}optional{{end-i-code}} keyword. For example: -{{s-code}} -match 1+ digits then optionally "." then optionally 0...8 digits -{{end-s-code}} +{{s-code}}match 1+ digits then optionally "." then optionally 0...8 digits{{end-s-code}} Suppose you want to repeat a group of these match statements. You can group a repetition using the {{i-code}}repeat{{end-i-code}} keyword. Everything underneath that is tabbed (scoped) will be repeated. By default, this will match 0 or more of the following statements.

{{p-code}}repeat @@ -299,13 +274,12 @@ match "World" {{p-code}}create a group match "Hello World" {{end-p-code}} -

This will create a non-named captured group, equivalent to the regular expression "/(Hello World)/". A non-named captured group will show up in your chosen language's matches, however will not be given a name. To access this match, you will need to know the index of the group. Most regular expression engines support named capture groups, and H2R highly recommends using this feature. If you wish to do so, simply give it a name:

+

This will create a non-named captured group, equivalent to the regular expression "/(Hello World)/". A non-named captured group will show up in your chosen language's matches, however will not be given a name. To access this match, you will need to know the index of the group. Most regular expression engines support named capture groups, and H2R highly recommends using this feature. If you wish to do so, simply give it a name:

{{p-code}}create a group called TestGroup match "Hello World" {{end-p-code}} -

In most languages, a named group can be accessed through the match result's group list. Take for example, in JavaScript, -{{p-code}}"hello".match(/(?<TestGroup>hello)/).groups -{{end-p-code}} +

In most languages, a named group can be accessed through the match result's group list. Take for example, in JavaScript,

+{{p-code}}"hello".match(/(?<TestGroup>hello)/).groups{{end-p-code}}

Will return an object with {TestGroup: "hello"}. For another example, check out MDN web docs. Groups can also be optional.

{{p-code}}create an optional group @@ -318,8 +292,7 @@ match "World" match "World" {{end-p-code}}

The regular expression returned by this will be "/(?<TestGroup>Hello(?<InnerGroup>World))/". Again, in JavaScript, the following

-{{p-code}}"HelloWorld".match(/(?<TestGroup>Hello(?<InnerGroup>World))/).groups -{{end-p-code}} +{{p-code}}"HelloWorld".match(/(?<TestGroup>Hello(?<InnerGroup>World))/).groups{{end-p-code}}

Will return an object with {TestGroup: "HelloWorld", InnerGroup: "World"}.


@@ -328,25 +301,55 @@ match "World"

Advanced features

-

Backreferences

-

TODO

- +

Backreferences

+

Sometimes you may wish to match the same text as a previously matched. Take for example matching opening and closing XML tags such as <hello>world</hello>:

+{{p-code}}match "<" +create a group called opening_tag + match a word or digit or "_" or "-" +match ">" +match 0+ not "<" +match "</" +create a group called closing_tag + match a word or digit or "_" or "-" +match ">" +{{end-p-code}} +

To ensure you matched the same opening tag as closing tag, you'll normally need to perform an additional step afterwards by checking the capture groups are equal. However, in most regex engines, this can be performed automatically through backreferences. Backreferences effectively re-capture the same group. Human2Regex allows you to {{i-code}}rerun{{end-i-code}} or {{i-code}}recapture{{end-i-code}} a previous group.

+{{p-code}}match "<" +create a group called tag + match a word or digit or "_" or "-" +match ">" +match 0+ not "<" +match "</" +recapture tag +match ">" +{{end-p-code}} +

The regex will only successfully match if both the tags are the same. One thing to note however, the first group must be captured. For a "function"-like capture see regex subroutines (not yet implemented).

+

To allow for a more natural language, {{i-code}}recapture the group {{end-i-code}} and {{i-code}}recapture the group called{{end-i-code}} are also supported.

If statements

-

TODO

- +

Certain regex languages support if statements which can be used simplify statements. Human2Regex supports {{i-code}}if{{end-i-code}}, {{i-code}}else if{{end-i-code}}, and {{i-code}}else{{end-i-code}} statements. Inside each {{i-code}}if{{end-i-code}}, you can recapture a group or run a new match. This is done as the following:

+{{p-code}}if match "hello" then optionally "world" + match "!" +else if match "goodbye" then optionally "world" + match "!" +{{end-p-code}} +

or

+{{p-code}}create a group called tag + match "<" then a word or digit or "_" or "-" then ">" +//do we have another tag? keep matching the same tags +if rerun tag + repeat + recapture tag +//ignore everything else +else + match 0+ any thing +{{end-p-code}}

Unicode character properties

You can match specific unicode sequences using {{i-code}}"\uXXXX" {{end-i-code}} or {{i-code}}"\UXXXXXXXX"{{end-i-code}} where X is a hexadecimal character. -{{s-code}} -match "\u0669" // matches arabic digit 9 "٩" -{{end-s-code}} +{{s-code}}match "\u0669" // matches arabic digit 9 "٩"{{end-s-code}} Unicode character classes/scripts can be matched using the {{i-code}}unicode{{end-i-code}} keyword. -{{s-code}} -match unicode "Latin" // matches any latin character -{{end-s-code}} -{{s-code}} -match unicode "N" // matches any number character -{{end-s-code}} +{{s-code}}match unicode "Latin" // matches any latin character{{end-s-code}} +{{s-code}}match unicode "N" // matches any number character{{end-s-code}} The following Unicode class specifiers are available:

diff --git a/src/parser.ts b/src/parser.ts index 27718d5..517d37b 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -567,7 +567,7 @@ export class Human2RegexParser extends EmbeddedActionsParser { tokens.push($.CONSUME(T.Optional)); optional = true; }); - tokens.push($.CONSUME(T.Call)); + tokens.push($.CONSUME(T.Rerun)); $.OPTION6(() => count = $.SUBRULE(CountSubStatement)); diff --git a/src/script.ts b/src/script.ts index 9e65512..669bb13 100644 --- a/src/script.ts +++ b/src/script.ts @@ -10,10 +10,10 @@ import "codemirror/addon/mode/simple"; import "codemirror/addon/runmode/runmode"; import "codemirror/addon/lint/lint"; -import "./docs/bootstrap.css"; -import "./docs/cleanblog.css"; -import "./docs/codemirror.css"; -import "./docs/style.css"; +import "./docs/assets/bootstrap.css"; +import "./docs/assets/cleanblog.css"; +import "./docs/assets/codemirror.css"; +import "./docs/assets/style.css"; interface CodeMirror { defineSimpleMode: (name: string, value: Record) => void; @@ -81,6 +81,10 @@ document.addEventListener("DOMContentLoaded", function() { {token: "builtin", regex: /case insensitive/i}, {token: "builtin", regex: /case sensitive/i}, {token: "operator", regex: /\+|or more/i}, + {token: "keyword", regex: /re( |-)?(run|capture)/i }, + {token: "operator", regex: /the/i }, + {token: "keyword", regex: /if/i }, + {token: "keyword", regex: /else|otherwise/i }, {token: "variable", regex: /[a-z]\w*/i}, {token: "number", regex: /\d+/}, {token: "string", regex: /"(?:[^\\"]|\\(?:[bfnrtv"\\/]|u[0-9a-f]{4}|U[0-9a-f]{8}))*"/i}, @@ -200,8 +204,6 @@ document.addEventListener("DOMContentLoaded", function() { } } - - const editor = code_mirror.fromTextArea($human, { mode: "human2regex", lineNumbers: false, diff --git a/src/tokens.ts b/src/tokens.ts index 12ee509..d5ec09a 100644 --- a/src/tokens.ts +++ b/src/tokens.ts @@ -60,7 +60,7 @@ import { createToken, Lexer } from "chevrotain"; /** @internal */ export const CaseInsensitive = createToken({name: "CaseInsensitive", pattern: /case insensitive/i}); /** @internal */ export const CaseSensitive = createToken({name: "CaseSensitive", pattern: /case sensitive/i}); /** @internal */ export const OrMore = createToken({name: "OrMore", pattern: /\+|or more/i}); -/** @internal */ export const Call = createToken({name: "Call", pattern: /call|invoke|execute|(re ?)?run/i }); +/** @internal */ export const Rerun = createToken({name: "Rerun", pattern: /re( |-)?(run|capture)/i }); /** @internal */ export const The = createToken({name: "The", pattern: /the/i }); /** @internal */ export const If = createToken({name: "If", pattern: /if/i }); /** @internal */ export const Else = createToken({name: "Else", pattern: /else|otherwise/i }); @@ -111,7 +111,7 @@ export const AllTokens = [ Number, Unicode, Called, - Call, + Rerun, If, Else, The, diff --git a/tests/generator.spec.ts b/tests/generator.spec.ts index 8de3a91..ac815cd 100644 --- a/tests/generator.spec.ts +++ b/tests/generator.spec.ts @@ -72,7 +72,7 @@ describe("Generator functionality", function() { const reg6 = parser.parse(toks6); expect(reg6.validate(RegexDialect.JS).length).toBeGreaterThan(0); - const toks7 = lexer.tokenize("invoke thing").tokens; + const toks7 = lexer.tokenize("rerun thing").tokens; const reg7 = parser.parse(toks7); expect(reg7.validate(RegexDialect.JS).length).toBeGreaterThan(0); }); @@ -162,7 +162,7 @@ describe("Generator functionality", function() { }); it("can generate backreferences", function() { - const toks0 = lexer.tokenize('create a group called thing\n\tmatch "Hello World"\ninvoke thing\noptionally call 3 times the group called thing').tokens; + const toks0 = lexer.tokenize('create a group called thing\n\tmatch "Hello World"\nrerun thing\noptionally recapture 3 times the group called thing').tokens; const reg0 = parser.parse(toks0); expect(reg0.validate(RegexDialect.JS).length).toBe(0); diff --git a/webpack.config.js b/webpack.config.js index b66213b..da14db6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,3 +1,4 @@ +/* eslint-disable func-style */ /* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable @typescript-eslint/no-var-requires */ @@ -12,82 +13,50 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); const WebpackBeforeBuildPlugin = require("before-build-webpack"); const TerserPlugin = require("terser-webpack-plugin"); -const RemovePlugin = require('remove-files-webpack-plugin'); +const RemovePlugin = require("remove-files-webpack-plugin"); +const { CleanWebpackPlugin } = require("clean-webpack-plugin"); -// Todo: Maybe move these values out to a config file or something -const config = { - prod: true, - dst: "./docs/", - src: "./src/", - compression_config: { - html: { - collapseWhitespace: true, - minifyCSS: true, - minifyJS: true, - removeComments: true, - removeEmptyAttributes: true, - removeRedundantAttributes: true - }, - } -}; +const config = require("./config.json"); - -function build_handlebars() { +// todo: if I'm bored, make this a plugin for webpack so it gets "emitted" +function buildHandlebars() { if (!existsSync(config.dst)){ mkdirSync(config.dst); } - const files = [ - "404.hbs", - "index.hbs", - "tutorial.hbs" - ]; + const files = glob.sync(path.join(config.src, "docs", "*.hbs")); const context = { build: { - prod: config.prod+"", - year: new Date().getFullYear()+"" + prod: config.prod, + year: String(new Date().getFullYear()) } }; // helper functions - const compress_html = (input) => config.prod ? minify(input, config.compression_config.html) : input; + const compressHtml = (input) => config.prod ? minify(input, config.compression_config.html) : input; - Handlebars.registerHelper("i-code", function(options) { - return new Handlebars.SafeString(``); - }); + Handlebars.registerHelper("i-code", () => new Handlebars.SafeString('')); + Handlebars.registerHelper("s-code", () => new Handlebars.SafeString('')); + Handlebars.registerHelper("p-code", () => new Handlebars.SafeString('
'));
 
-    Handlebars.registerHelper("s-code", function(options) {
-        return new Handlebars.SafeString(``);
-    });
-
-    Handlebars.registerHelper("p-code", function(options) {
-        return new Handlebars.SafeString(`
`);
-    });
-
-    Handlebars.registerHelper("end-i-code", function(options) {
-        return new Handlebars.SafeString('');
-    });
-
-    Handlebars.registerHelper("end-s-code", function(options) {
-        return new Handlebars.SafeString('');
-    });
-
-    Handlebars.registerHelper("end-p-code", function(options) {
-        return new Handlebars.SafeString('
'); - }); + Handlebars.registerHelper("end-i-code", () => new Handlebars.SafeString("")); + Handlebars.registerHelper("end-s-code", () => new Handlebars.SafeString("")); + Handlebars.registerHelper("end-p-code", () => new Handlebars.SafeString("
")); // get partials - Handlebars.registerPartial("header", readFileSync(path.join(config.src, "docs", "header.hbs"), "utf8")); - Handlebars.registerPartial("footer", readFileSync(path.join(config.src, "docs", "footer.hbs"), "utf8")); - Handlebars.registerPartial("example_code", readFileSync(path.join(config.src, "docs", "example_code.hbs"), "utf8")); + Handlebars.registerPartial("header", readFileSync(path.join(config.src, "docs", "partials", "header.hbs"), "utf8")); + Handlebars.registerPartial("footer", readFileSync(path.join(config.src, "docs", "partials", "footer.hbs"), "utf8")); + Handlebars.registerPartial("example_code", readFileSync(path.join(config.src, "docs", "partials", "example_code.hbs"), "utf8")); // build handlebar files - for (const filename of files) { + for (const file of files) { + const filename = path.basename(file); const to = path.join(config.dst, path.basename(filename, ".hbs") + ".html"); const template = readFileSync(path.join(config.src, "docs", filename), "utf8"); + const html = Handlebars.compile(template)(context); - writeFileSync(to, compress_html(Handlebars.compile(template)(context))); + writeFileSync(to, compressHtml(html)); } } @@ -111,17 +80,23 @@ module.exports = { minimize: config.prod, minimizer: [ new TerserPlugin({cache: true, parallel: true}), new OptimizeCSSAssetsPlugin({}) ] }, + performance: { + hints: false, + maxEntrypointSize: 512000, + maxAssetSize: 512000 + }, plugins: [ + new CleanWebpackPlugin({verbose:true, protectWebpackAssets: false}), new CopyPlugin({ patterns: [ - { from: config.src + "docs/" + "!(*.css|*.hbs)", to: "", flatten: true} + { from: config.src + "docs/" + "assets/" + "!(*.css|*.hbs)", to: "", flatten: true} ] }), new MiniCssExtractPlugin({ filename: "bundle.min.css" }), new WebpackBeforeBuildPlugin(function(_, callback) { - build_handlebars(); + buildHandlebars(); callback(); - }), + }, [ "done" ]), new RemovePlugin({ after: { root: "./lib",