notations 0.0.69 → 0.0.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/notations.umd.js +17409 -23615
  2. package/dist/notations.umd.min.js +8 -3
  3. package/dist/notations.umd.min.js.LICENSE.txt +0 -14
  4. package/dist/notations.umd.min.js.map +1 -1
  5. package/lib/cjs/beats.d.ts +4 -0
  6. package/lib/cjs/beats.js +19 -2
  7. package/lib/cjs/beats.js.map +1 -1
  8. package/lib/cjs/block.d.ts +73 -0
  9. package/lib/cjs/block.js +247 -0
  10. package/lib/cjs/block.js.map +1 -0
  11. package/lib/cjs/carnatic/NotationView.d.ts +11 -4
  12. package/lib/cjs/carnatic/NotationView.js +26 -11
  13. package/lib/cjs/carnatic/NotationView.js.map +1 -1
  14. package/lib/cjs/commands.d.ts +25 -11
  15. package/lib/cjs/commands.js +87 -34
  16. package/lib/cjs/commands.js.map +1 -1
  17. package/lib/cjs/entity.d.ts +3 -7
  18. package/lib/cjs/entity.js +7 -37
  19. package/lib/cjs/entity.js.map +1 -1
  20. package/lib/cjs/grids.d.ts +32 -3
  21. package/lib/cjs/grids.js +96 -9
  22. package/lib/cjs/grids.js.map +1 -1
  23. package/lib/cjs/index.d.ts +1 -0
  24. package/lib/cjs/index.js +1 -0
  25. package/lib/cjs/index.js.map +1 -1
  26. package/lib/cjs/loader.js +1 -41
  27. package/lib/cjs/loader.js.map +1 -1
  28. package/lib/cjs/notation.d.ts +28 -33
  29. package/lib/cjs/notation.js +144 -122
  30. package/lib/cjs/notation.js.map +1 -1
  31. package/lib/cjs/parser.d.ts +21 -6
  32. package/lib/cjs/parser.js +122 -23
  33. package/lib/cjs/parser.js.map +1 -1
  34. package/lib/esm/beats.d.ts +4 -0
  35. package/lib/esm/beats.js +19 -2
  36. package/lib/esm/beats.js.map +1 -1
  37. package/lib/esm/block.d.ts +73 -0
  38. package/lib/esm/block.js +230 -0
  39. package/lib/esm/block.js.map +1 -0
  40. package/lib/esm/carnatic/NotationView.d.ts +11 -4
  41. package/lib/esm/carnatic/NotationView.js +26 -11
  42. package/lib/esm/carnatic/NotationView.js.map +1 -1
  43. package/lib/esm/commands.d.ts +25 -11
  44. package/lib/esm/commands.js +84 -34
  45. package/lib/esm/commands.js.map +1 -1
  46. package/lib/esm/entity.d.ts +3 -7
  47. package/lib/esm/entity.js +7 -37
  48. package/lib/esm/entity.js.map +1 -1
  49. package/lib/esm/grids.d.ts +32 -3
  50. package/lib/esm/grids.js +96 -9
  51. package/lib/esm/grids.js.map +1 -1
  52. package/lib/esm/index.d.ts +1 -0
  53. package/lib/esm/index.js +1 -0
  54. package/lib/esm/index.js.map +1 -1
  55. package/lib/esm/loader.js +1 -8
  56. package/lib/esm/loader.js.map +1 -1
  57. package/lib/esm/notation.d.ts +28 -33
  58. package/lib/esm/notation.js +129 -118
  59. package/lib/esm/notation.js.map +1 -1
  60. package/lib/esm/parser.d.ts +21 -6
  61. package/lib/esm/parser.js +122 -24
  62. package/lib/esm/parser.js.map +1 -1
  63. package/package.json +3 -2
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see notations.umd.min.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Notations=e():t.Notations=e()}(this,()=>(()=>{var __webpack_modules__={167(t,e,r){"use strict";var n=r(8467);t.exports=new n("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)},construct:function(){return null},predicate:function(t){return null===t},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},580(t,e,r){"use strict";var n=r(8467),i=Object.prototype.hasOwnProperty;t.exports=new n("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){if(null===t)return!0;var e,r=t;for(e in r)if(i.call(r,e)&&null!==r[e])return!1;return!0},construct:function(t){return null!==t?t:{}}})},856(t,e,r){"use strict";var n=r(8092),i=r(3190);function o(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}t.exports.Type=r(8467),t.exports.Schema=r(7388),t.exports.FAILSAFE_SCHEMA=r(7786),t.exports.JSON_SCHEMA=r(1045),t.exports.CORE_SCHEMA=r(9452),t.exports.DEFAULT_SAFE_SCHEMA=r(4496),t.exports.DEFAULT_FULL_SCHEMA=r(9140),t.exports.load=n.load,t.exports.loadAll=n.loadAll,t.exports.safeLoad=n.safeLoad,t.exports.safeLoadAll=n.safeLoadAll,t.exports.dump=i.dump,t.exports.safeDump=i.safeDump,t.exports.YAMLException=r(6278),t.exports.MINIMAL_SCHEMA=r(7786),t.exports.SAFE_SCHEMA=r(4496),t.exports.DEFAULT_SCHEMA=r(9140),t.exports.scan=o("scan"),t.exports.parse=o("parse"),t.exports.compose=o("compose"),t.exports.addConstructor=o("addConstructor")},886(t,e,r){"use strict";var n=r(8467);t.exports=new n("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})},1045(t,e,r){"use strict";var n=r(7388);t.exports=new n({include:[r(7786)],implicit:[r(167),r(1466),r(2965),r(8178)]})},1389(t){"use strict";t.exports=function(t){return null!=t&&("object"==typeof t||"function"==typeof t)}},1466(t,e,r){"use strict";var n=r(8467);t.exports=new n("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)},construct:function(t){return"true"===t||"True"===t||"TRUE"===t},predicate:function(t){return"[object Boolean]"===Object.prototype.toString.call(t)},represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})},1578(t,e,r){"use strict";const n=r(3905),i=r(4391);t.exports=function(t){const e=Object.assign({},t);return e.delimiters=i.arrayify(e.delims||e.delimiters||"---"),1===e.delimiters.length&&e.delimiters.push(e.delimiters[0]),e.language=(e.language||e.lang||"yaml").toLowerCase(),e.engines=Object.assign({},n,e.parsers,e.engines),e}},1587(t,e,r){"use strict";var n=r(8467),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;t.exports=new n("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,r,n,s,a,u=[],l=t;for(e=0,r=l.length;e<r;e+=1){if(n=l[e],a=!1,"[object Object]"!==o.call(n))return!1;for(s in n)if(i.call(n,s)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==u.indexOf(s))return!1;u.push(s)}return!0},construct:function(t){return null!==t?t:[]}})},2046(t,e,r){"use strict";var n=r(1389);function i(t,e){for(var r in e)o(e,r)&&(t[r]=e[r])}function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t){n(t)||(t={});for(var e=arguments.length,r=1;r<e;r++){var o=arguments[r];n(o)&&i(t,o)}return t}},2965(t,e,r){"use strict";var n=r(4366),i=r(8467);function o(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function s(t){return 48<=t&&t<=55}function a(t){return 48<=t&&t<=57}t.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,r=t.length,n=0,i=!1;if(!r)return!1;if("-"!==(e=t[n])&&"+"!==e||(e=t[++n]),"0"===e){if(n+1===r)return!0;if("b"===(e=t[++n])){for(n++;n<r;n++)if("_"!==(e=t[n])){if("0"!==e&&"1"!==e)return!1;i=!0}return i&&"_"!==e}if("x"===e){for(n++;n<r;n++)if("_"!==(e=t[n])){if(!o(t.charCodeAt(n)))return!1;i=!0}return i&&"_"!==e}for(;n<r;n++)if("_"!==(e=t[n])){if(!s(t.charCodeAt(n)))return!1;i=!0}return i&&"_"!==e}if("_"===e)return!1;for(;n<r;n++)if("_"!==(e=t[n])){if(":"===e)break;if(!a(t.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===e)&&(":"!==e||/^(:[0-5]?[0-9])+$/.test(t.slice(n)))},construct:function(t){var e,r,n=t,i=1,o=[];return-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(e=n[0])&&"+"!==e||("-"===e&&(i=-1),e=(n=n.slice(1))[0]),"0"===n?0:"0"===e?"b"===n[1]?i*parseInt(n.slice(2),2):"x"===n[1]?i*parseInt(n,16):i*parseInt(n,8):-1!==n.indexOf(":")?(n.split(":").forEach(function(t){o.unshift(parseInt(t,10))}),n=0,r=1,o.forEach(function(t){n+=t*r,r*=60}),i*n):i*parseInt(n,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!n.isNegativeZero(t)},represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},3177(t,e,r){"use strict";var n=r(8467);t.exports=new n("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(t){if(null===t)return!1;if(0===t.length)return!1;var e=t,r=/\/([gim]*)$/.exec(t),n="";if("/"===e[0]){if(r&&(n=r[1]),n.length>3)return!1;if("/"!==e[e.length-n.length-1])return!1}return!0},construct:function(t){var e=t,r=/\/([gim]*)$/.exec(t),n="";return"/"===e[0]&&(r&&(n=r[1]),e=e.slice(1,e.length-n.length-1)),new RegExp(e,n)},predicate:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},represent:function(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}})},3190(t,e,r){"use strict";var n=r(4366),i=r(6278),o=r(9140),s=r(4496),a=Object.prototype.toString,u=Object.prototype.hasOwnProperty,l={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},h=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function c(t){var e,r,o;if(e=t.toString(16).toUpperCase(),t<=255)r="x",o=2;else if(t<=65535)r="u",o=4;else{if(!(t<=4294967295))throw new i("code point within a string may not be greater than 0xFFFFFFFF");r="U",o=8}return"\\"+r+n.repeat("0",o-e.length)+e}function p(t){this.schema=t.schema||o,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=n.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=function(t,e){var r,n,i,o,s,a,l;if(null===e)return{};for(r={},i=0,o=(n=Object.keys(e)).length;i<o;i+=1)s=n[i],a=String(e[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(l=t.compiledTypeMap.fallback[s])&&u.call(l.styleAliases,a)&&(a=l.styleAliases[a]),r[s]=a;return r}(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function f(t,e){for(var r,i=n.repeat(" ",e),o=0,s=-1,a="",u=t.length;o<u;)-1===(s=t.indexOf("\n",o))?(r=t.slice(o),o=u):(r=t.slice(o,s+1),o=s+1),r.length&&"\n"!==r&&(a+=i),a+=r;return a}function d(t,e){return"\n"+n.repeat(" ",t.indent*e)}function m(t){return 32===t||9===t}function y(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&65279!==t||65536<=t&&t<=1114111}function g(t,e){return y(t)&&65279!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&58!==t&&(35!==t||e&&function(t){return y(t)&&!m(t)&&65279!==t&&13!==t&&10!==t}(e))}function v(t){return/^\n* /.test(t)}function x(t,e,r,n){t.dump=function(){if(0===e.length)return"''";if(!t.noCompatMode&&-1!==h.indexOf(e))return"'"+e+"'";var o=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),a=n||t.flowLevel>-1&&r>=t.flowLevel;switch(function(t,e,r,n,i){var o,s,a,u,l=!1,h=!1,c=-1!==n,p=-1,f=y(u=t.charCodeAt(0))&&65279!==u&&!m(u)&&45!==u&&63!==u&&58!==u&&44!==u&&91!==u&&93!==u&&123!==u&&125!==u&&35!==u&&38!==u&&42!==u&&33!==u&&124!==u&&61!==u&&62!==u&&39!==u&&34!==u&&37!==u&&64!==u&&96!==u&&!m(t.charCodeAt(t.length-1));if(e)for(o=0;o<t.length;o++){if(!y(s=t.charCodeAt(o)))return 5;a=o>0?t.charCodeAt(o-1):null,f=f&&g(s,a)}else{for(o=0;o<t.length;o++){if(10===(s=t.charCodeAt(o)))l=!0,c&&(h=h||o-p-1>n&&" "!==t[p+1],p=o);else if(!y(s))return 5;a=o>0?t.charCodeAt(o-1):null,f=f&&g(s,a)}h=h||c&&o-p-1>n&&" "!==t[p+1]}return l||h?r>9&&v(t)?5:h?4:3:f&&!i(t)?1:2}(e,a,t.indent,s,function(e){return function(t,e){var r,n;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}(t,e)})){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+b(e,t.indent)+E(f(e,o));case 4:return">"+b(e,t.indent)+E(f(function(t,e){for(var r,n,i,o=/(\n+)([^\n]*)/g,s=(i=-1!==(i=t.indexOf("\n"))?i:t.length,o.lastIndex=i,C(t.slice(0,i),e)),a="\n"===t[0]||" "===t[0];n=o.exec(t);){var u=n[1],l=n[2];r=" "===l[0],s+=u+(a||r||""===l?"":"\n")+C(l,e),a=r}return s}(e,s),o));case 5:return'"'+function(t){for(var e,r,n,i="",o=0;o<t.length;o++)(e=t.charCodeAt(o))>=55296&&e<=56319&&(r=t.charCodeAt(o+1))>=56320&&r<=57343?(i+=c(1024*(e-55296)+r-56320+65536),o++):i+=!(n=l[e])&&y(e)?t[o]:n||c(e);return i}(e)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function b(t,e){var r=v(t)?String(e):"",n="\n"===t[t.length-1];return r+(!n||"\n"!==t[t.length-2]&&"\n"!==t?n?"":"-":"+")+"\n"}function E(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function C(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,o=0,s=0,a=0,u="";r=i.exec(t);)(a=r.index)-o>e&&(n=s>o?s:a,u+="\n"+t.slice(o,n),o=n+1),s=a;return u+="\n",t.length-o>e&&s>o?u+=t.slice(o,s)+"\n"+t.slice(s+1):u+=t.slice(o),u.slice(1)}function S(t,e,r){var n,o,s,l,h,c;for(s=0,l=(o=r?t.explicitTypes:t.implicitTypes).length;s<l;s+=1)if(((h=o[s]).instanceOf||h.predicate)&&(!h.instanceOf||"object"==typeof e&&e instanceof h.instanceOf)&&(!h.predicate||h.predicate(e))){if(t.tag=r?h.tag:"?",h.represent){if(c=t.styleMap[h.tag]||h.defaultStyle,"[object Function]"===a.call(h.represent))n=h.represent(e,c);else{if(!u.call(h.represent,c))throw new i("!<"+h.tag+'> tag resolver accepts not "'+c+'" style');n=h.represent[c](e,c)}t.dump=n}return!0}return!1}function w(t,e,r,n,o,s){t.tag=null,t.dump=r,S(t,r,!1)||S(t,r,!0);var u=a.call(t.dump);n&&(n=t.flowLevel<0||t.flowLevel>e);var l,h,c="[object Object]"===u||"[object Array]"===u;if(c&&(h=-1!==(l=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||h||2!==t.indent&&e>0)&&(o=!1),h&&t.usedDuplicates[l])t.dump="*ref_"+l;else{if(c&&h&&!t.usedDuplicates[l]&&(t.usedDuplicates[l]=!0),"[object Object]"===u)n&&0!==Object.keys(t.dump).length?(function(t,e,r,n){var o,s,a,u,l,h,c="",p=t.tag,f=Object.keys(r);if(!0===t.sortKeys)f.sort();else if("function"==typeof t.sortKeys)f.sort(t.sortKeys);else if(t.sortKeys)throw new i("sortKeys must be a boolean or a function");for(o=0,s=f.length;o<s;o+=1)h="",n&&0===o||(h+=d(t,e)),u=r[a=f[o]],w(t,e+1,a,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=d(t,e)),w(t,e+1,u,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=p,t.dump=c||"{}"}(t,e,t.dump,o),h&&(t.dump="&ref_"+l+t.dump)):(function(t,e,r){var n,i,o,s,a,u="",l=t.tag,h=Object.keys(r);for(n=0,i=h.length;n<i;n+=1)a="",0!==n&&(a+=", "),t.condenseFlow&&(a+='"'),s=r[o=h[n]],w(t,e,o,!1,!1)&&(t.dump.length>1024&&(a+="? "),a+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),w(t,e,s,!1,!1)&&(u+=a+=t.dump));t.tag=l,t.dump="{"+u+"}"}(t,e,t.dump),h&&(t.dump="&ref_"+l+" "+t.dump));else if("[object Array]"===u){var p=t.noArrayIndent&&e>0?e-1:e;n&&0!==t.dump.length?(function(t,e,r,n){var i,o,s="",a=t.tag;for(i=0,o=r.length;i<o;i+=1)w(t,e+1,r[i],!0,!0)&&(n&&0===i||(s+=d(t,e)),t.dump&&10===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=a,t.dump=s||"[]"}(t,p,t.dump,o),h&&(t.dump="&ref_"+l+t.dump)):(function(t,e,r){var n,i,o="",s=t.tag;for(n=0,i=r.length;n<i;n+=1)w(t,e,r[n],!1,!1)&&(0!==n&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=s,t.dump="["+o+"]"}(t,p,t.dump),h&&(t.dump="&ref_"+l+" "+t.dump))}else{if("[object String]"!==u){if(t.skipInvalid)return!1;throw new i("unacceptable kind of an object to dump "+u)}"?"!==t.tag&&x(t,t.dump,e,s)}null!==t.tag&&"?"!==t.tag&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function A(t,e){var r,n,i=[],o=[];for(D(t,i,o),r=0,n=o.length;r<n;r+=1)e.duplicates.push(i[o[r]]);e.usedDuplicates=new Array(n)}function D(t,e,r){var n,i,o;if(null!==t&&"object"==typeof t)if(-1!==(i=e.indexOf(t)))-1===r.indexOf(i)&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,o=t.length;i<o;i+=1)D(t[i],e,r);else for(i=0,o=(n=Object.keys(t)).length;i<o;i+=1)D(t[n[i]],e,r)}function k(t,e){var r=new p(e=e||{});return r.noRefs||A(t,r),w(r,0,t,!0,!0)?r.dump+"\n":""}t.exports.dump=k,t.exports.safeDump=function(t,e){return k(t,n.extend({schema:s},e))}},3252(t,e){"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],u=o[1],l=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,u)),h=0,c=u>0?s-4:s;for(r=0;r<c;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],l[h++]=e>>16&255,l[h++]=e>>8&255,l[h++]=255&e;return 2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[h++]=255&e),1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[h++]=e>>8&255,l[h++]=255&e),l},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(l(t,a,a+s>u?u:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function l(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(u(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3344(t,e,r){"use strict";const n=r(7926),i=r(6331),o=r(4391);t.exports=function(t){return"object"!==n(t)&&(t={content:t}),"object"!==n(t.data)&&(t.data={}),t.contents&&null==t.content&&(t.content=t.contents),o.define(t,"orig",o.toBuffer(t.content)),o.define(t,"language",t.language||""),o.define(t,"matter",t.matter||""),o.define(t,"stringify",function(e,r){return r&&r.language&&(t.language=r.language),i(t,e,r)}),t.content=o.toString(t.content),t.isEmpty=!1,t.excerpt="",t}},3631(t,e,r){"use strict";var n;try{n=r(6065).hp}catch(t){}var i=r(8467),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,r,n=0,i=t.length,s=o;for(r=0;r<i;r++)if(!((e=s.indexOf(t.charAt(r)))>64)){if(e<0)return!1;n+=6}return n%8==0},construct:function(t){var e,r,i=t.replace(/[\r\n=]/g,""),s=i.length,a=o,u=0,l=[];for(e=0;e<s;e++)e%4==0&&e&&(l.push(u>>16&255),l.push(u>>8&255),l.push(255&u)),u=u<<6|a.indexOf(i.charAt(e));return 0==(r=s%4*6)?(l.push(u>>16&255),l.push(u>>8&255),l.push(255&u)):18===r?(l.push(u>>10&255),l.push(u>>2&255)):12===r&&l.push(u>>4&255),n?n.from?n.from(l):new n(l):l},predicate:function(t){return n&&n.isBuffer(t)},represent:function(t){var e,r,n="",i=0,s=t.length,a=o;for(e=0;e<s;e++)e%3==0&&e&&(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]),i=(i<<8)+t[e];return 0==(r=s%3)?(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]):2===r?(n+=a[i>>10&63],n+=a[i>>4&63],n+=a[i<<2&63],n+=a[64]):1===r&&(n+=a[i>>2&63],n+=a[i<<4&63],n+=a[64],n+=a[64]),n}})},3905(module,exports,__webpack_require__){"use strict";const yaml=__webpack_require__(9449),engines=exports=module.exports;engines.yaml={parse:yaml.safeLoad.bind(yaml),stringify:yaml.safeDump.bind(yaml)},engines.json={parse:JSON.parse.bind(JSON),stringify:function(t,e){const r=Object.assign({replacer:null,space:2},e);return JSON.stringify(t,r.replacer,r.space)}},engines.javascript={parse:function parse(str,options,wrap){try{return!1!==wrap&&(str="(function() {\nreturn "+str.trim()+";\n}());"),eval(str)||{}}catch(t){if(!1!==wrap&&/(unexpected|identifier)/i.test(t.message))return parse(str,options,!1);throw new SyntaxError(t)}},stringify:function(){throw new Error("stringifying JavaScript is not supported")}}},4253(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,l=u>>1,h=-7,c=r?i-1:0,p=r?-1:1,f=t[e+c];for(c+=p,o=f&(1<<-h)-1,f>>=-h,h+=a;h>0;o=256*o+t[e+c],c+=p,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+c],c+=p,h-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),o-=l}return(f?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,l=8*o-i-1,h=(1<<l)-1,c=h>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+c>=1?p/u:p*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(e*u-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[r+f]=255&a,f+=d,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;t[r+f]=255&s,f+=d,s/=256,l-=8);t[r+f-d]|=128*m}},4366(t){"use strict";function e(t){return null==t}t.exports.isNothing=e,t.exports.isObject=function(t){return"object"==typeof t&&null!==t},t.exports.toArray=function(t){return Array.isArray(t)?t:e(t)?[]:[t]},t.exports.repeat=function(t,e){var r,n="";for(r=0;r<e;r+=1)n+=t;return n},t.exports.isNegativeZero=function(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t},t.exports.extend=function(t,e){var r,n,i,o;if(e)for(r=0,n=(o=Object.keys(e)).length;r<n;r+=1)t[i=o[r]]=e[i];return t}},4391(t,e,r){"use strict";var n=r(6065).hp;const i=r(8268),o=r(7926);e.define=function(t,e,r){Reflect.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:r})},e.isBuffer=function(t){return"buffer"===o(t)},e.isObject=function(t){return"object"===o(t)},e.toBuffer=function(t){return"string"==typeof t?n.from(t):t},e.toString=function(t){if(e.isBuffer(t))return i(String(t));if("string"!=typeof t)throw new TypeError("expected input to be a string or buffer");return i(t)},e.arrayify=function(t){return t?Array.isArray(t)?t:[t]:[]},e.startsWith=function(t,e,r){return"number"!=typeof r&&(r=e.length),t.slice(0,r)===e}},4496(t,e,r){"use strict";var n=r(7388);t.exports=new n({include:[r(9452)],implicit:[r(6340),r(9392)],explicit:[r(3631),r(1587),r(8237),r(580)]})},4675(t,e,r){"use strict";const n=r(1578);t.exports=function(t,e){const r=n(e);if(null==t.data&&(t.data={}),"function"==typeof r.excerpt)return r.excerpt(t,r);const i=t.data.excerpt_separator||r.excerpt_separator;if(null==i&&(!1===r.excerpt||null==r.excerpt))return t;const o="string"==typeof r.excerpt?r.excerpt:i||r.delimiters[0],s=t.content.indexOf(o);return-1!==s&&(t.excerpt=t.content.slice(0,s)),t}},4914(t){var e;e=function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}return r.m=t,r.c=e,r.p="",r(0)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),i=r(3),o=r(8),s=r(15);function a(t,e,r){var s=null,a=function(t,e){r&&r(t,e),s&&s.visit(t,e)},u="function"==typeof r?a:null,l=!1;if(e){l="boolean"==typeof e.comment&&e.comment;var h="boolean"==typeof e.attachComment&&e.attachComment;(l||h)&&((s=new n.CommentHandler).attach=h,e.comment=!0,u=a)}var c,p=!1;e&&"string"==typeof e.sourceType&&(p="module"===e.sourceType),c=e&&"boolean"==typeof e.jsx&&e.jsx?new i.JSXParser(t,e,u):new o.Parser(t,e,u);var f=p?c.parseModule():c.parseScript();return l&&s&&(f.comments=s.comments),c.config.tokens&&(f.tokens=c.tokens),c.config.tolerant&&(f.errors=c.errorHandler.errors),f}e.parse=a,e.parseModule=function(t,e,r){var n=e||{};return n.sourceType="module",a(t,n,r)},e.parseScript=function(t,e,r){var n=e||{};return n.sourceType="script",a(t,n,r)},e.tokenize=function(t,e,r){var n,i=new s.Tokenizer(t,e);n=[];try{for(;;){var o=i.getNextToken();if(!o)break;r&&(o=r(o)),n.push(o)}}catch(t){i.errorHandler.tolerate(t)}return i.errorHandler.tolerant&&(n.errors=i.errors()),n};var u=r(2);e.Syntax=u.Syntax,e.version="4.0.1"},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2),i=function(){function t(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return t.prototype.insertInnerComments=function(t,e){if(t.type===n.Syntax.BlockStatement&&0===t.body.length){for(var r=[],i=this.leading.length-1;i>=0;--i){var o=this.leading[i];e.end.offset>=o.start&&(r.unshift(o.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}r.length&&(t.innerComments=r)}},t.prototype.findTrailingComments=function(t){var e=[];if(this.trailing.length>0){for(var r=this.trailing.length-1;r>=0;--r){var n=this.trailing[r];n.start>=t.end.offset&&e.unshift(n.comment)}return this.trailing.length=0,e}var i=this.stack[this.stack.length-1];if(i&&i.node.trailingComments){var o=i.node.trailingComments[0];o&&o.range[0]>=t.end.offset&&(e=i.node.trailingComments,delete i.node.trailingComments)}return e},t.prototype.findLeadingComments=function(t){for(var e,r=[];this.stack.length>0&&(o=this.stack[this.stack.length-1])&&o.start>=t.start.offset;)e=o.node,this.stack.pop();if(e){for(var n=(e.leadingComments?e.leadingComments.length:0)-1;n>=0;--n){var i=e.leadingComments[n];i.range[1]<=t.start.offset&&(r.unshift(i),e.leadingComments.splice(n,1))}return e.leadingComments&&0===e.leadingComments.length&&delete e.leadingComments,r}for(n=this.leading.length-1;n>=0;--n){var o;(o=this.leading[n]).start<=t.start.offset&&(r.unshift(o.comment),this.leading.splice(n,1))}return r},t.prototype.visitNode=function(t,e){if(!(t.type===n.Syntax.Program&&t.body.length>0)){this.insertInnerComments(t,e);var r=this.findTrailingComments(e),i=this.findLeadingComments(e);i.length>0&&(t.leadingComments=i),r.length>0&&(t.trailingComments=r),this.stack.push({node:t,start:e.start.offset})}},t.prototype.visitComment=function(t,e){var r="L"===t.type[0]?"Line":"Block",n={type:r,value:t.value};if(t.range&&(n.range=t.range),t.loc&&(n.loc=t.loc),this.comments.push(n),this.attach){var i={comment:{type:r,value:t.value,range:[e.start.offset,e.end.offset]},start:e.start.offset};t.loc&&(i.comment.loc=t.loc),t.type=r,this.leading.push(i),this.trailing.push(i)}},t.prototype.visit=function(t,e){"LineComment"===t.type||"BlockComment"===t.type?this.visitComment(t,e):this.attach&&this.visitNode(t,e)},t}();e.CommentHandler=i},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=r(4),s=r(5),a=r(6),u=r(7),l=r(8),h=r(13),c=r(14);function p(t){var e;switch(t.type){case a.JSXSyntax.JSXIdentifier:e=t.name;break;case a.JSXSyntax.JSXNamespacedName:var r=t;e=p(r.namespace)+":"+p(r.name);break;case a.JSXSyntax.JSXMemberExpression:var n=t;e=p(n.object)+"."+p(n.property)}return e}h.TokenName[100]="JSXIdentifier",h.TokenName[101]="JSXText";var f=function(t){function e(e,r,n){return t.call(this,e,r,n)||this}return i(e,t),e.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():t.prototype.parsePrimaryExpression.call(this)},e.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},e.prototype.finishJSX=function(){this.nextToken()},e.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},e.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},e.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},e.prototype.scanXHTMLEntity=function(t){for(var e="&",r=!0,n=!1,i=!1,s=!1;!this.scanner.eof()&&r&&!n;){var a=this.scanner.source[this.scanner.index];if(a===t)break;if(n=";"===a,e+=a,++this.scanner.index,!n)switch(e.length){case 2:i="#"===a;break;case 3:i&&(r=(s="x"===a)||o.Character.isDecimalDigit(a.charCodeAt(0)),i=i&&!s);break;default:r=(r=r&&!(i&&!o.Character.isDecimalDigit(a.charCodeAt(0))))&&!(s&&!o.Character.isHexDigit(a.charCodeAt(0)))}}if(r&&n&&e.length>2){var u=e.substr(1,e.length-2);i&&u.length>1?e=String.fromCharCode(parseInt(u.substr(1),10)):s&&u.length>2?e=String.fromCharCode(parseInt("0"+u.substr(1),16)):i||s||!c.XHTMLEntities[u]||(e=c.XHTMLEntities[u])}return e},e.prototype.lexJSX=function(){var t=this.scanner.source.charCodeAt(this.scanner.index);if(60===t||62===t||47===t||58===t||61===t||123===t||125===t)return{type:7,value:a=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===t||39===t){for(var e=this.scanner.index,r=this.scanner.source[this.scanner.index++],n="";!this.scanner.eof()&&(u=this.scanner.source[this.scanner.index++])!==r;)n+="&"===u?this.scanXHTMLEntity(r):u;return{type:8,value:n,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index}}if(46===t){var i=this.scanner.source.charCodeAt(this.scanner.index+1),s=this.scanner.source.charCodeAt(this.scanner.index+2),a=46===i&&46===s?"...":".";return e=this.scanner.index,this.scanner.index+=a.length,{type:7,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index}}if(96===t)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(o.Character.isIdentifierStart(t)&&92!==t){for(e=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(o.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(e,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index}}return this.scanner.lex()},e.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var t=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(t)),t},e.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var t=this.scanner.index,e="";!this.scanner.eof();){var r=this.scanner.source[this.scanner.index];if("{"===r||"<"===r)break;++this.scanner.index,e+=r,o.Character.isLineTerminator(r.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===r&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var n={type:101,value:e,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index};return e.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(n)),n},e.prototype.peekJSXToken=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.lexJSX();return this.scanner.restoreState(t),e},e.prototype.expectJSX=function(t){var e=this.nextJSXToken();7===e.type&&e.value===t||this.throwUnexpectedToken(e)},e.prototype.matchJSX=function(t){var e=this.peekJSXToken();return 7===e.type&&e.value===t},e.prototype.parseJSXIdentifier=function(){var t=this.createJSXNode(),e=this.nextJSXToken();return 100!==e.type&&this.throwUnexpectedToken(e),this.finalize(t,new s.JSXIdentifier(e.value))},e.prototype.parseJSXElementName=function(){var t=this.createJSXNode(),e=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=e;this.expectJSX(":");var n=this.parseJSXIdentifier();e=this.finalize(t,new s.JSXNamespacedName(r,n))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=e;this.expectJSX(".");var o=this.parseJSXIdentifier();e=this.finalize(t,new s.JSXMemberExpression(i,o))}return e},e.prototype.parseJSXAttributeName=function(){var t,e=this.createJSXNode(),r=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=r;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new s.JSXNamespacedName(n,i))}else t=r;return t},e.prototype.parseJSXStringLiteralAttribute=function(){var t=this.createJSXNode(),e=this.nextJSXToken();8!==e.type&&this.throwUnexpectedToken(e);var r=this.getTokenRaw(e);return this.finalize(t,new u.Literal(e.value,r))},e.prototype.parseJSXExpressionAttribute=function(){var t=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var e=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(t,new s.JSXExpressionContainer(e))},e.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},e.prototype.parseJSXNameValueAttribute=function(){var t=this.createJSXNode(),e=this.parseJSXAttributeName(),r=null;return this.matchJSX("=")&&(this.expectJSX("="),r=this.parseJSXAttributeValue()),this.finalize(t,new s.JSXAttribute(e,r))},e.prototype.parseJSXSpreadAttribute=function(){var t=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var e=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(t,new s.JSXSpreadAttribute(e))},e.prototype.parseJSXAttributes=function(){for(var t=[];!this.matchJSX("/")&&!this.matchJSX(">");){var e=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();t.push(e)}return t},e.prototype.parseJSXOpeningElement=function(){var t=this.createJSXNode();this.expectJSX("<");var e=this.parseJSXElementName(),r=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(t,new s.JSXOpeningElement(e,n,r))},e.prototype.parseJSXBoundaryElement=function(){var t=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var e=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(t,new s.JSXClosingElement(e))}var r=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(t,new s.JSXOpeningElement(r,i,n))},e.prototype.parseJSXEmptyExpression=function(){var t=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(t,new s.JSXEmptyExpression)},e.prototype.parseJSXExpressionContainer=function(){var t,e=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new s.JSXExpressionContainer(t))},e.prototype.parseJSXChildren=function(){for(var t=[];!this.scanner.eof();){var e=this.createJSXChildNode(),r=this.nextJSXText();if(r.start<r.end){var n=this.getTokenRaw(r),i=this.finalize(e,new s.JSXText(r.value,n));t.push(i)}if("{"!==this.scanner.source[this.scanner.index])break;var o=this.parseJSXExpressionContainer();t.push(o)}return t},e.prototype.parseComplexJSXElement=function(t){for(var e=[];!this.scanner.eof();){t.children=t.children.concat(this.parseJSXChildren());var r=this.createJSXChildNode(),n=this.parseJSXBoundaryElement();if(n.type===a.JSXSyntax.JSXOpeningElement){var i=n;if(i.selfClosing){var o=this.finalize(r,new s.JSXElement(i,[],null));t.children.push(o)}else e.push(t),t={node:r,opening:i,closing:null,children:[]}}if(n.type===a.JSXSyntax.JSXClosingElement){t.closing=n;var u=p(t.opening.name);if(u!==p(t.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",u),!(e.length>0))break;o=this.finalize(t.node,new s.JSXElement(t.opening,t.children,t.closing)),(t=e[e.length-1]).children.push(o),e.pop()}}return t},e.prototype.parseJSXElement=function(){var t=this.createJSXNode(),e=this.parseJSXOpeningElement(),r=[],n=null;if(!e.selfClosing){var i=this.parseComplexJSXElement({node:t,opening:e,closing:n,children:r});r=i.children,n=i.closing}return this.finalize(t,new s.JSXElement(e,r,n))},e.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var t=this.parseJSXElement();return this.finishJSX(),t},e.prototype.isStartOfExpression=function(){return t.prototype.isStartOfExpression.call(this)||this.match("<")},e}(l.Parser);e.JSXParser=f},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};e.Character={fromCodePoint:function(t){return t<65536?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10))+String.fromCharCode(56320+(t-65536&1023))},isWhiteSpace:function(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0},isLineTerminator:function(t){return 10===t||13===t||8232===t||8233===t},isIdentifierStart:function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||92===t||t>=128&&r.NonAsciiIdentifierStart.test(e.Character.fromCodePoint(t))},isIdentifierPart:function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||92===t||t>=128&&r.NonAsciiIdentifierPart.test(e.Character.fromCodePoint(t))},isDecimalDigit:function(t){return t>=48&&t<=57},isHexDigit:function(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102},isOctalDigit:function(t){return t>=48&&t<=55}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6);e.JSXClosingElement=function(t){this.type=n.JSXSyntax.JSXClosingElement,this.name=t};e.JSXElement=function(t,e,r){this.type=n.JSXSyntax.JSXElement,this.openingElement=t,this.children=e,this.closingElement=r};e.JSXEmptyExpression=function(){this.type=n.JSXSyntax.JSXEmptyExpression};e.JSXExpressionContainer=function(t){this.type=n.JSXSyntax.JSXExpressionContainer,this.expression=t};e.JSXIdentifier=function(t){this.type=n.JSXSyntax.JSXIdentifier,this.name=t};e.JSXMemberExpression=function(t,e){this.type=n.JSXSyntax.JSXMemberExpression,this.object=t,this.property=e};e.JSXAttribute=function(t,e){this.type=n.JSXSyntax.JSXAttribute,this.name=t,this.value=e};e.JSXNamespacedName=function(t,e){this.type=n.JSXSyntax.JSXNamespacedName,this.namespace=t,this.name=e};e.JSXOpeningElement=function(t,e,r){this.type=n.JSXSyntax.JSXOpeningElement,this.name=t,this.selfClosing=e,this.attributes=r};e.JSXSpreadAttribute=function(t){this.type=n.JSXSyntax.JSXSpreadAttribute,this.argument=t};e.JSXText=function(t,e){this.type=n.JSXSyntax.JSXText,this.value=t,this.raw=e}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2);e.ArrayExpression=function(t){this.type=n.Syntax.ArrayExpression,this.elements=t};e.ArrayPattern=function(t){this.type=n.Syntax.ArrayPattern,this.elements=t};e.ArrowFunctionExpression=function(t,e,r){this.type=n.Syntax.ArrowFunctionExpression,this.id=null,this.params=t,this.body=e,this.generator=!1,this.expression=r,this.async=!1};e.AssignmentExpression=function(t,e,r){this.type=n.Syntax.AssignmentExpression,this.operator=t,this.left=e,this.right=r};e.AssignmentPattern=function(t,e){this.type=n.Syntax.AssignmentPattern,this.left=t,this.right=e};e.AsyncArrowFunctionExpression=function(t,e,r){this.type=n.Syntax.ArrowFunctionExpression,this.id=null,this.params=t,this.body=e,this.generator=!1,this.expression=r,this.async=!0};e.AsyncFunctionDeclaration=function(t,e,r){this.type=n.Syntax.FunctionDeclaration,this.id=t,this.params=e,this.body=r,this.generator=!1,this.expression=!1,this.async=!0};e.AsyncFunctionExpression=function(t,e,r){this.type=n.Syntax.FunctionExpression,this.id=t,this.params=e,this.body=r,this.generator=!1,this.expression=!1,this.async=!0};e.AwaitExpression=function(t){this.type=n.Syntax.AwaitExpression,this.argument=t};e.BinaryExpression=function(t,e,r){var i="||"===t||"&&"===t;this.type=i?n.Syntax.LogicalExpression:n.Syntax.BinaryExpression,this.operator=t,this.left=e,this.right=r};e.BlockStatement=function(t){this.type=n.Syntax.BlockStatement,this.body=t};e.BreakStatement=function(t){this.type=n.Syntax.BreakStatement,this.label=t};e.CallExpression=function(t,e){this.type=n.Syntax.CallExpression,this.callee=t,this.arguments=e};e.CatchClause=function(t,e){this.type=n.Syntax.CatchClause,this.param=t,this.body=e};e.ClassBody=function(t){this.type=n.Syntax.ClassBody,this.body=t};e.ClassDeclaration=function(t,e,r){this.type=n.Syntax.ClassDeclaration,this.id=t,this.superClass=e,this.body=r};e.ClassExpression=function(t,e,r){this.type=n.Syntax.ClassExpression,this.id=t,this.superClass=e,this.body=r};e.ComputedMemberExpression=function(t,e){this.type=n.Syntax.MemberExpression,this.computed=!0,this.object=t,this.property=e};e.ConditionalExpression=function(t,e,r){this.type=n.Syntax.ConditionalExpression,this.test=t,this.consequent=e,this.alternate=r};e.ContinueStatement=function(t){this.type=n.Syntax.ContinueStatement,this.label=t};e.DebuggerStatement=function(){this.type=n.Syntax.DebuggerStatement};e.Directive=function(t,e){this.type=n.Syntax.ExpressionStatement,this.expression=t,this.directive=e};e.DoWhileStatement=function(t,e){this.type=n.Syntax.DoWhileStatement,this.body=t,this.test=e};e.EmptyStatement=function(){this.type=n.Syntax.EmptyStatement};e.ExportAllDeclaration=function(t){this.type=n.Syntax.ExportAllDeclaration,this.source=t};e.ExportDefaultDeclaration=function(t){this.type=n.Syntax.ExportDefaultDeclaration,this.declaration=t};e.ExportNamedDeclaration=function(t,e,r){this.type=n.Syntax.ExportNamedDeclaration,this.declaration=t,this.specifiers=e,this.source=r};e.ExportSpecifier=function(t,e){this.type=n.Syntax.ExportSpecifier,this.exported=e,this.local=t};e.ExpressionStatement=function(t){this.type=n.Syntax.ExpressionStatement,this.expression=t};e.ForInStatement=function(t,e,r){this.type=n.Syntax.ForInStatement,this.left=t,this.right=e,this.body=r,this.each=!1};e.ForOfStatement=function(t,e,r){this.type=n.Syntax.ForOfStatement,this.left=t,this.right=e,this.body=r};e.ForStatement=function(t,e,r,i){this.type=n.Syntax.ForStatement,this.init=t,this.test=e,this.update=r,this.body=i};e.FunctionDeclaration=function(t,e,r,i){this.type=n.Syntax.FunctionDeclaration,this.id=t,this.params=e,this.body=r,this.generator=i,this.expression=!1,this.async=!1};e.FunctionExpression=function(t,e,r,i){this.type=n.Syntax.FunctionExpression,this.id=t,this.params=e,this.body=r,this.generator=i,this.expression=!1,this.async=!1};e.Identifier=function(t){this.type=n.Syntax.Identifier,this.name=t};e.IfStatement=function(t,e,r){this.type=n.Syntax.IfStatement,this.test=t,this.consequent=e,this.alternate=r};e.ImportDeclaration=function(t,e){this.type=n.Syntax.ImportDeclaration,this.specifiers=t,this.source=e};e.ImportDefaultSpecifier=function(t){this.type=n.Syntax.ImportDefaultSpecifier,this.local=t};e.ImportNamespaceSpecifier=function(t){this.type=n.Syntax.ImportNamespaceSpecifier,this.local=t};e.ImportSpecifier=function(t,e){this.type=n.Syntax.ImportSpecifier,this.local=t,this.imported=e};e.LabeledStatement=function(t,e){this.type=n.Syntax.LabeledStatement,this.label=t,this.body=e};e.Literal=function(t,e){this.type=n.Syntax.Literal,this.value=t,this.raw=e};e.MetaProperty=function(t,e){this.type=n.Syntax.MetaProperty,this.meta=t,this.property=e};e.MethodDefinition=function(t,e,r,i,o){this.type=n.Syntax.MethodDefinition,this.key=t,this.computed=e,this.value=r,this.kind=i,this.static=o};e.Module=function(t){this.type=n.Syntax.Program,this.body=t,this.sourceType="module"};e.NewExpression=function(t,e){this.type=n.Syntax.NewExpression,this.callee=t,this.arguments=e};e.ObjectExpression=function(t){this.type=n.Syntax.ObjectExpression,this.properties=t};e.ObjectPattern=function(t){this.type=n.Syntax.ObjectPattern,this.properties=t};e.Property=function(t,e,r,i,o,s){this.type=n.Syntax.Property,this.key=e,this.computed=r,this.value=i,this.kind=t,this.method=o,this.shorthand=s};e.RegexLiteral=function(t,e,r,i){this.type=n.Syntax.Literal,this.value=t,this.raw=e,this.regex={pattern:r,flags:i}};e.RestElement=function(t){this.type=n.Syntax.RestElement,this.argument=t};e.ReturnStatement=function(t){this.type=n.Syntax.ReturnStatement,this.argument=t};e.Script=function(t){this.type=n.Syntax.Program,this.body=t,this.sourceType="script"};e.SequenceExpression=function(t){this.type=n.Syntax.SequenceExpression,this.expressions=t};e.SpreadElement=function(t){this.type=n.Syntax.SpreadElement,this.argument=t};e.StaticMemberExpression=function(t,e){this.type=n.Syntax.MemberExpression,this.computed=!1,this.object=t,this.property=e};e.Super=function(){this.type=n.Syntax.Super};e.SwitchCase=function(t,e){this.type=n.Syntax.SwitchCase,this.test=t,this.consequent=e};e.SwitchStatement=function(t,e){this.type=n.Syntax.SwitchStatement,this.discriminant=t,this.cases=e};e.TaggedTemplateExpression=function(t,e){this.type=n.Syntax.TaggedTemplateExpression,this.tag=t,this.quasi=e};e.TemplateElement=function(t,e){this.type=n.Syntax.TemplateElement,this.value=t,this.tail=e};e.TemplateLiteral=function(t,e){this.type=n.Syntax.TemplateLiteral,this.quasis=t,this.expressions=e};e.ThisExpression=function(){this.type=n.Syntax.ThisExpression};e.ThrowStatement=function(t){this.type=n.Syntax.ThrowStatement,this.argument=t};e.TryStatement=function(t,e,r){this.type=n.Syntax.TryStatement,this.block=t,this.handler=e,this.finalizer=r};e.UnaryExpression=function(t,e){this.type=n.Syntax.UnaryExpression,this.operator=t,this.argument=e,this.prefix=!0};e.UpdateExpression=function(t,e,r){this.type=n.Syntax.UpdateExpression,this.operator=t,this.argument=e,this.prefix=r};e.VariableDeclaration=function(t,e){this.type=n.Syntax.VariableDeclaration,this.declarations=t,this.kind=e};e.VariableDeclarator=function(t,e){this.type=n.Syntax.VariableDeclarator,this.id=t,this.init=e};e.WhileStatement=function(t,e){this.type=n.Syntax.WhileStatement,this.test=t,this.body=e};e.WithStatement=function(t,e){this.type=n.Syntax.WithStatement,this.object=t,this.body=e};e.YieldExpression=function(t,e){this.type=n.Syntax.YieldExpression,this.argument=t,this.delegate=e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(9),i=r(10),o=r(11),s=r(7),a=r(12),u=r(2),l=r(13),h="ArrowParameterPlaceHolder",c=function(){function t(t,e,r){void 0===e&&(e={}),this.config={range:"boolean"==typeof e.range&&e.range,loc:"boolean"==typeof e.loc&&e.loc,source:null,tokens:"boolean"==typeof e.tokens&&e.tokens,comment:"boolean"==typeof e.comment&&e.comment,tolerant:"boolean"==typeof e.tolerant&&e.tolerant},this.config.loc&&e.source&&null!==e.source&&(this.config.source=String(e.source)),this.delegate=r,this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new a.Scanner(t,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return t.prototype.throwError=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.prototype.slice.call(arguments,1),o=t.replace(/%(\d)/g,function(t,e){return n.assert(e<i.length,"Message reference must be in range"),i[e]}),s=this.lastMarker.index,a=this.lastMarker.line,u=this.lastMarker.column+1;throw this.errorHandler.createError(s,a,u,o)},t.prototype.tolerateError=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.prototype.slice.call(arguments,1),o=t.replace(/%(\d)/g,function(t,e){return n.assert(e<i.length,"Message reference must be in range"),i[e]}),s=this.lastMarker.index,a=this.scanner.lineNumber,u=this.lastMarker.column+1;this.errorHandler.tolerateError(s,a,u,o)},t.prototype.unexpectedTokenError=function(t,e){var r,n=e||o.Messages.UnexpectedToken;if(t?(e||(n=2===t.type?o.Messages.UnexpectedEOS:3===t.type?o.Messages.UnexpectedIdentifier:6===t.type?o.Messages.UnexpectedNumber:8===t.type?o.Messages.UnexpectedString:10===t.type?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,4===t.type&&(this.scanner.isFutureReservedWord(t.value)?n=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(t.value)&&(n=o.Messages.StrictReservedWord))),r=t.value):r="ILLEGAL",n=n.replace("%0",r),t&&"number"==typeof t.lineNumber){var i=t.start,s=t.lineNumber,a=this.lastMarker.index-this.lastMarker.column,u=t.start-a+1;return this.errorHandler.createError(i,s,u,n)}return i=this.lastMarker.index,s=this.lastMarker.line,u=this.lastMarker.column+1,this.errorHandler.createError(i,s,u,n)},t.prototype.throwUnexpectedToken=function(t,e){throw this.unexpectedTokenError(t,e)},t.prototype.tolerateUnexpectedToken=function(t,e){this.errorHandler.tolerate(this.unexpectedTokenError(t,e))},t.prototype.collectComments=function(){if(this.config.comment){var t=this.scanner.scanComments();if(t.length>0&&this.delegate)for(var e=0;e<t.length;++e){var r=t[e],n=void 0;n={type:r.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(r.slice[0],r.slice[1])},this.config.range&&(n.range=r.range),this.config.loc&&(n.loc=r.loc);var i={start:{line:r.loc.start.line,column:r.loc.start.column,offset:r.range[0]},end:{line:r.loc.end.line,column:r.loc.end.column,offset:r.range[1]}};this.delegate(n,i)}}else this.scanner.scanComments()},t.prototype.getTokenRaw=function(t){return this.scanner.source.slice(t.start,t.end)},t.prototype.convertToken=function(t){var e={type:l.TokenName[t.type],value:this.getTokenRaw(t)};if(this.config.range&&(e.range=[t.start,t.end]),this.config.loc&&(e.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===t.type){var r=t.pattern,n=t.flags;e.regex={pattern:r,flags:n}}return e},t.prototype.nextToken=function(){var t=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var e=this.scanner.lex();return this.hasLineTerminator=t.lineNumber!==e.lineNumber,e&&this.context.strict&&3===e.type&&this.scanner.isStrictModeReservedWord(e.value)&&(e.type=4),this.lookahead=e,this.config.tokens&&2!==e.type&&this.tokens.push(this.convertToken(e)),t},t.prototype.nextRegexToken=function(){this.collectComments();var t=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(t))),this.lookahead=t,this.nextToken(),t},t.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},t.prototype.startNode=function(t,e){void 0===e&&(e=0);var r=t.start-t.lineStart,n=t.lineNumber;return r<0&&(r+=e,n--),{index:t.start,line:n,column:r}},t.prototype.finalize=function(t,e){if(this.config.range&&(e.range=[t.index,this.lastMarker.index]),this.config.loc&&(e.loc={start:{line:t.line,column:t.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(e.loc.source=this.config.source)),this.delegate){var r={start:{line:t.line,column:t.column,offset:t.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(e,r)}return e},t.prototype.expect=function(t){var e=this.nextToken();7===e.type&&e.value===t||this.throwUnexpectedToken(e)},t.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var t=this.lookahead;7===t.type&&","===t.value?this.nextToken():7===t.type&&";"===t.value?(this.nextToken(),this.tolerateUnexpectedToken(t)):this.tolerateUnexpectedToken(t,o.Messages.UnexpectedToken)}else this.expect(",")},t.prototype.expectKeyword=function(t){var e=this.nextToken();4===e.type&&e.value===t||this.throwUnexpectedToken(e)},t.prototype.match=function(t){return 7===this.lookahead.type&&this.lookahead.value===t},t.prototype.matchKeyword=function(t){return 4===this.lookahead.type&&this.lookahead.value===t},t.prototype.matchContextualKeyword=function(t){return 3===this.lookahead.type&&this.lookahead.value===t},t.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var t=this.lookahead.value;return"="===t||"*="===t||"**="===t||"/="===t||"%="===t||"+="===t||"-="===t||"<<="===t||">>="===t||">>>="===t||"&="===t||"^="===t||"|="===t},t.prototype.isolateCoverGrammar=function(t){var e=this.context.isBindingElement,r=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=t.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=e,this.context.isAssignmentTarget=r,this.context.firstCoverInitializedNameError=n,i},t.prototype.inheritCoverGrammar=function(t){var e=this.context.isBindingElement,r=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=t.call(this);return this.context.isBindingElement=this.context.isBindingElement&&e,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r,this.context.firstCoverInitializedNameError=n||this.context.firstCoverInitializedNameError,i},t.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},t.prototype.parsePrimaryExpression=function(){var t,e,r,n=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(n,new s.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),r=this.getTokenRaw(e),t=this.finalize(n,new s.Literal(e.value,r));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),r=this.getTokenRaw(e),t=this.finalize(n,new s.Literal("true"===e.value,r));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),r=this.getTokenRaw(e),t=this.finalize(n,new s.Literal(null,r));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,e=this.nextRegexToken(),r=this.getTokenRaw(e),t=this.finalize(n,new s.RegexLiteral(e.regex,r,e.pattern,e.flags));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?t=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?t=this.finalize(n,new s.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?t=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),t=this.finalize(n,new s.ThisExpression)):t=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:t=this.throwUnexpectedToken(this.nextToken())}return t},t.prototype.parseSpreadElement=function(){var t=this.createNode();this.expect("...");var e=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(t,new s.SpreadElement(e))},t.prototype.parseArrayInitializer=function(){var t=this.createNode(),e=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),e.push(null);else if(this.match("...")){var r=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),e.push(r)}else e.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(t,new s.ArrayExpression(e))},t.prototype.parsePropertyMethod=function(t){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var e=this.context.strict,r=this.context.allowStrictDirective;this.context.allowStrictDirective=t.simple;var n=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&t.firstRestricted&&this.tolerateUnexpectedToken(t.firstRestricted,t.message),this.context.strict&&t.stricted&&this.tolerateUnexpectedToken(t.stricted,t.message),this.context.strict=e,this.context.allowStrictDirective=r,n},t.prototype.parsePropertyMethodFunction=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var r=this.parseFormalParameters(),n=this.parsePropertyMethod(r);return this.context.allowYield=e,this.finalize(t,new s.FunctionExpression(null,r.params,n,!1))},t.prototype.parsePropertyMethodAsyncFunction=function(){var t=this.createNode(),e=this.context.allowYield,r=this.context.await;this.context.allowYield=!1,this.context.await=!0;var n=this.parseFormalParameters(),i=this.parsePropertyMethod(n);return this.context.allowYield=e,this.context.await=r,this.finalize(t,new s.AsyncFunctionExpression(null,n.params,i))},t.prototype.parseObjectPropertyKey=function(){var t,e=this.createNode(),r=this.nextToken();switch(r.type){case 8:case 6:this.context.strict&&r.octal&&this.tolerateUnexpectedToken(r,o.Messages.StrictOctalLiteral);var n=this.getTokenRaw(r);t=this.finalize(e,new s.Literal(r.value,n));break;case 3:case 1:case 5:case 4:t=this.finalize(e,new s.Identifier(r.value));break;case 7:"["===r.value?(t=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):t=this.throwUnexpectedToken(r);break;default:t=this.throwUnexpectedToken(r)}return t},t.prototype.isPropertyKey=function(t,e){return t.type===u.Syntax.Identifier&&t.name===e||t.type===u.Syntax.Literal&&t.value===e},t.prototype.parseObjectProperty=function(t){var e,r=this.createNode(),n=this.lookahead,i=null,a=null,u=!1,l=!1,h=!1,c=!1;if(3===n.type){var p=n.value;this.nextToken(),u=this.match("["),i=(c=!(this.hasLineTerminator||"async"!==p||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(r,new s.Identifier(p))}else this.match("*")?this.nextToken():(u=this.match("["),i=this.parseObjectPropertyKey());var f=this.qualifiedPropertyName(this.lookahead);if(3===n.type&&!c&&"get"===n.value&&f)e="get",u=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod();else if(3===n.type&&!c&&"set"===n.value&&f)e="set",u=this.match("["),i=this.parseObjectPropertyKey(),a=this.parseSetterMethod();else if(7===n.type&&"*"===n.value&&f)e="init",u=this.match("["),i=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),l=!0;else if(i||this.throwUnexpectedToken(this.lookahead),e="init",this.match(":")&&!c)!u&&this.isPropertyKey(i,"__proto__")&&(t.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),t.value=!0),this.nextToken(),a=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))a=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0;else if(3===n.type)if(p=this.finalize(r,new s.Identifier(n.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),h=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(r,new s.AssignmentPattern(p,d))}else h=!0,a=p;else this.throwUnexpectedToken(this.nextToken());return this.finalize(r,new s.Property(e,i,u,a,l,h))},t.prototype.parseObjectInitializer=function(){var t=this.createNode();this.expect("{");for(var e=[],r={value:!1};!this.match("}");)e.push(this.parseObjectProperty(r)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(t,new s.ObjectExpression(e))},t.prototype.parseTemplateHead=function(){n.assert(this.lookahead.head,"Template literal must start with a template head");var t=this.createNode(),e=this.nextToken(),r=e.value,i=e.cooked;return this.finalize(t,new s.TemplateElement({raw:r,cooked:i},e.tail))},t.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var t=this.createNode(),e=this.nextToken(),r=e.value,n=e.cooked;return this.finalize(t,new s.TemplateElement({raw:r,cooked:n},e.tail))},t.prototype.parseTemplateLiteral=function(){var t=this.createNode(),e=[],r=[],n=this.parseTemplateHead();for(r.push(n);!n.tail;)e.push(this.parseExpression()),n=this.parseTemplateElement(),r.push(n);return this.finalize(t,new s.TemplateLiteral(r,e))},t.prototype.reinterpretExpressionAsPattern=function(t){switch(t.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:t.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(t.argument);break;case u.Syntax.ArrayExpression:t.type=u.Syntax.ArrayPattern;for(var e=0;e<t.elements.length;e++)null!==t.elements[e]&&this.reinterpretExpressionAsPattern(t.elements[e]);break;case u.Syntax.ObjectExpression:for(t.type=u.Syntax.ObjectPattern,e=0;e<t.properties.length;e++)this.reinterpretExpressionAsPattern(t.properties[e].value);break;case u.Syntax.AssignmentExpression:t.type=u.Syntax.AssignmentPattern,delete t.operator,this.reinterpretExpressionAsPattern(t.left)}},t.prototype.parseGroupExpression=function(){var t;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),t={type:h,params:[],async:!1};else{var e=this.lookahead,r=[];if(this.match("..."))t=this.parseRestElement(r),this.expect(")"),this.match("=>")||this.expect("=>"),t={type:h,params:[t],async:!1};else{var n=!1;if(this.context.isBindingElement=!0,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(t);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o<i.length;o++)this.reinterpretExpressionAsPattern(i[o]);n=!0,t={type:h,params:i,async:!1}}else if(this.match("...")){for(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),i.push(this.parseRestElement(r)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1,o=0;o<i.length;o++)this.reinterpretExpressionAsPattern(i[o]);n=!0,t={type:h,params:i,async:!1}}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(n)break}n||(t=this.finalize(this.startNode(e),new s.SequenceExpression(i)))}if(!n){if(this.expect(")"),this.match("=>")&&(t.type===u.Syntax.Identifier&&"yield"===t.name&&(n=!0,t={type:h,params:[t],async:!1}),!n)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),t.type===u.Syntax.SequenceExpression)for(o=0;o<t.expressions.length;o++)this.reinterpretExpressionAsPattern(t.expressions[o]);else this.reinterpretExpressionAsPattern(t);var a=t.type===u.Syntax.SequenceExpression?t.expressions:[t];t={type:h,params:a,async:!1}}this.context.isBindingElement=!1}}}return t},t.prototype.parseArguments=function(){this.expect("(");var t=[];if(!this.match(")"))for(;;){var e=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(t.push(e),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),t},t.prototype.isIdentifierName=function(t){return 3===t.type||4===t.type||1===t.type||5===t.type},t.prototype.parseIdentifierName=function(){var t=this.createNode(),e=this.nextToken();return this.isIdentifierName(e)||this.throwUnexpectedToken(e),this.finalize(t,new s.Identifier(e.value))},t.prototype.parseNewExpression=function(){var t,e=this.createNode(),r=this.parseIdentifierName();if(n.assert("new"===r.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var i=this.parseIdentifierName();t=new s.MetaProperty(r,i)}else this.throwUnexpectedToken(this.lookahead);else{var o=this.isolateCoverGrammar(this.parseLeftHandSideExpression),a=this.match("(")?this.parseArguments():[];t=new s.NewExpression(o,a),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(e,t)},t.prototype.parseAsyncArgument=function(){var t=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,t},t.prototype.parseAsyncArguments=function(){this.expect("(");var t=[];if(!this.match(")"))for(;;){var e=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(t.push(e),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),t},t.prototype.parseLeftHandSideExpressionAllowCall=function(){var t,e=this.lookahead,r=this.matchContextualKeyword("async"),n=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(t=this.createNode(),this.nextToken(),t=this.finalize(t,new s.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):t=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var i=this.parseIdentifierName();t=this.finalize(this.startNode(e),new s.StaticMemberExpression(t,i))}else if(this.match("(")){var o=r&&e.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var a=o?this.parseAsyncArguments():this.parseArguments();if(t=this.finalize(this.startNode(e),new s.CallExpression(t,a)),o&&this.match("=>")){for(var u=0;u<a.length;++u)this.reinterpretExpressionAsPattern(a[u]);t={type:h,params:a,async:!0}}}else if(this.match("["))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("["),i=this.isolateCoverGrammar(this.parseExpression),this.expect("]"),t=this.finalize(this.startNode(e),new s.ComputedMemberExpression(t,i));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var l=this.parseTemplateLiteral();t=this.finalize(this.startNode(e),new s.TaggedTemplateExpression(t,l))}return this.context.allowIn=n,t},t.prototype.parseSuper=function(){var t=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(t,new s.Super)},t.prototype.parseLeftHandSideExpression=function(){n.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var t=this.startNode(this.lookahead),e=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var r=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),e=this.finalize(t,new s.ComputedMemberExpression(e,r))}else if(this.match("."))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("."),r=this.parseIdentifierName(),e=this.finalize(t,new s.StaticMemberExpression(e,r));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var i=this.parseTemplateLiteral();e=this.finalize(t,new s.TaggedTemplateExpression(e,i))}return e},t.prototype.parseUpdateExpression=function(){var t,e=this.lookahead;if(this.match("++")||this.match("--")){var r=this.startNode(e),n=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&t.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var i=!0;t=this.finalize(r,new s.UpdateExpression(n.value,t,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(t=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&t.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var a=this.nextToken().value;i=!1,t=this.finalize(this.startNode(e),new s.UpdateExpression(a,t,i))}return t},t.prototype.parseAwaitExpression=function(){var t=this.createNode();this.nextToken();var e=this.parseUnaryExpression();return this.finalize(t,new s.AwaitExpression(e))},t.prototype.parseUnaryExpression=function(){var t;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var e=this.startNode(this.lookahead),r=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),t=this.finalize(e,new s.UnaryExpression(r.value,t)),this.context.strict&&"delete"===t.operator&&t.argument.type===u.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else t=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return t},t.prototype.parseExponentiationExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseUnaryExpression);if(e.type!==u.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e,n=this.isolateCoverGrammar(this.parseExponentiationExpression);e=this.finalize(this.startNode(t),new s.BinaryExpression("**",r,n))}return e},t.prototype.binaryPrecedence=function(t){var e=t.value;return 7===t.type?this.operatorPrecedence[e]||0:4===t.type&&("instanceof"===e||this.context.allowIn&&"in"===e)?7:0},t.prototype.parseBinaryExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseExponentiationExpression),r=this.lookahead,n=this.binaryPrecedence(r);if(n>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[t,this.lookahead],o=e,a=this.isolateCoverGrammar(this.parseExponentiationExpression),u=[o,r.value,a],l=[n];!((n=this.binaryPrecedence(this.lookahead))<=0);){for(;u.length>2&&n<=l[l.length-1];){a=u.pop();var h=u.pop();l.pop(),o=u.pop(),i.pop();var c=this.startNode(i[i.length-1]);u.push(this.finalize(c,new s.BinaryExpression(h,o,a)))}u.push(this.nextToken().value),l.push(n),i.push(this.lookahead),u.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=u.length-1;e=u[p];for(var f=i.pop();p>1;){var d=i.pop(),m=f&&f.lineStart;c=this.startNode(d,m),h=u[p-1],e=this.finalize(c,new s.BinaryExpression(h,u[p-2],e)),p-=2,f=d}}return e},t.prototype.parseConditionalExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=!0;var n=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new s.ConditionalExpression(e,n,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return e},t.prototype.checkPatternParam=function(t,e){switch(e.type){case u.Syntax.Identifier:this.validateParam(t,e,e.name);break;case u.Syntax.RestElement:this.checkPatternParam(t,e.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(t,e.left);break;case u.Syntax.ArrayPattern:for(var r=0;r<e.elements.length;r++)null!==e.elements[r]&&this.checkPatternParam(t,e.elements[r]);break;case u.Syntax.ObjectPattern:for(r=0;r<e.properties.length;r++)this.checkPatternParam(t,e.properties[r].value)}t.simple=t.simple&&e instanceof s.Identifier},t.prototype.reinterpretAsCoverFormalsList=function(t){var e,r=[t],n=!1;switch(t.type){case u.Syntax.Identifier:break;case h:r=t.params,n=t.async;break;default:return null}e={simple:!0,paramSet:{}};for(var i=0;i<r.length;++i)(s=r[i]).type===u.Syntax.AssignmentPattern?s.right.type===u.Syntax.YieldExpression&&(s.right.argument&&this.throwUnexpectedToken(this.lookahead),s.right.type=u.Syntax.Identifier,s.right.name="yield",delete s.right.argument,delete s.right.delegate):n&&s.type===u.Syntax.Identifier&&"await"===s.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(e,s),r[i]=s;if(this.context.strict||!this.context.allowYield)for(i=0;i<r.length;++i){var s;(s=r[i]).type===u.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(e.message===o.Messages.StrictParamDupe){var a=this.context.strict?e.stricted:e.firstRestricted;this.throwUnexpectedToken(a,e.message)}return{simple:e.simple,params:r,stricted:e.stricted,firstRestricted:e.firstRestricted,message:e.message}},t.prototype.parseAssignmentExpression=function(){var t;if(!this.context.allowYield&&this.matchKeyword("yield"))t=this.parseYieldExpression();else{var e=this.lookahead,r=e;if(t=this.parseConditionalExpression(),3===r.type&&r.lineNumber===this.lookahead.lineNumber&&"async"===r.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var n=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(n),t={type:h,params:[n],async:!0}}if(t.type===h||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=t.async,a=this.reinterpretAsCoverFormalsList(t);if(a){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var l=this.context.strict,c=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var p=this.context.allowYield,f=this.context.await;this.context.allowYield=!0,this.context.await=i;var d=this.startNode(e);this.expect("=>");var m=void 0;if(this.match("{")){var y=this.context.allowIn;this.context.allowIn=!0,m=this.parseFunctionSourceElements(),this.context.allowIn=y}else m=this.isolateCoverGrammar(this.parseAssignmentExpression);var g=m.type!==u.Syntax.BlockStatement;this.context.strict&&a.firstRestricted&&this.throwUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),t=i?this.finalize(d,new s.AsyncArrowFunctionExpression(a.params,m,g)):this.finalize(d,new s.ArrowFunctionExpression(a.params,m,g)),this.context.strict=l,this.context.allowStrictDirective=c,this.context.allowYield=p,this.context.await=f}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&t.type===u.Syntax.Identifier){var v=t;this.scanner.isRestrictedWord(v.name)&&this.tolerateUnexpectedToken(r,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(v.name)&&this.tolerateUnexpectedToken(r,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(t):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var x=(r=this.nextToken()).value,b=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new s.AssignmentExpression(x,t,b)),this.context.firstCoverInitializedNameError=null}}return t},t.prototype.parseExpression=function(){var t=this.lookahead,e=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];for(r.push(e);2!==this.lookahead.type&&this.match(",");)this.nextToken(),r.push(this.isolateCoverGrammar(this.parseAssignmentExpression));e=this.finalize(this.startNode(t),new s.SequenceExpression(r))}return e},t.prototype.parseStatementListItem=function(){var t;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),t=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),t=this.parseImportDeclaration();break;case"const":t=this.parseLexicalDeclaration({inFor:!1});break;case"function":t=this.parseFunctionDeclaration();break;case"class":t=this.parseClassDeclaration();break;case"let":t=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:t=this.parseStatement()}else t=this.parseStatement();return t},t.prototype.parseBlock=function(){var t=this.createNode();this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseStatementListItem());return this.expect("}"),this.finalize(t,new s.BlockStatement(e))},t.prototype.parseLexicalBinding=function(t,e){var r=this.createNode(),n=this.parsePattern([],t);this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(o.Messages.StrictVarName);var i=null;return"const"===t?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!e.inFor&&n.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),i=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(r,new s.VariableDeclarator(n,i))},t.prototype.parseBindingList=function(t,e){for(var r=[this.parseLexicalBinding(t,e)];this.match(",");)this.nextToken(),r.push(this.parseLexicalBinding(t,e));return r},t.prototype.isLexicalDeclaration=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.scanner.lex();return this.scanner.restoreState(t),3===e.type||7===e.type&&"["===e.value||7===e.type&&"{"===e.value||4===e.type&&"let"===e.value||4===e.type&&"yield"===e.value},t.prototype.parseLexicalDeclaration=function(t){var e=this.createNode(),r=this.nextToken().value;n.assert("let"===r||"const"===r,"Lexical declaration must be either let or const");var i=this.parseBindingList(r,t);return this.consumeSemicolon(),this.finalize(e,new s.VariableDeclaration(i,r))},t.prototype.parseBindingRestElement=function(t,e){var r=this.createNode();this.expect("...");var n=this.parsePattern(t,e);return this.finalize(r,new s.RestElement(n))},t.prototype.parseArrayPattern=function(t,e){var r=this.createNode();this.expect("[");for(var n=[];!this.match("]");)if(this.match(","))this.nextToken(),n.push(null);else{if(this.match("...")){n.push(this.parseBindingRestElement(t,e));break}n.push(this.parsePatternWithDefault(t,e)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(r,new s.ArrayPattern(n))},t.prototype.parsePropertyPattern=function(t,e){var r,n,i=this.createNode(),o=!1,a=!1;if(3===this.lookahead.type){var u=this.lookahead;r=this.parseVariableIdentifier();var l=this.finalize(i,new s.Identifier(u.value));if(this.match("=")){t.push(u),a=!0,this.nextToken();var h=this.parseAssignmentExpression();n=this.finalize(this.startNode(u),new s.AssignmentPattern(l,h))}else this.match(":")?(this.expect(":"),n=this.parsePatternWithDefault(t,e)):(t.push(u),a=!0,n=l)}else o=this.match("["),r=this.parseObjectPropertyKey(),this.expect(":"),n=this.parsePatternWithDefault(t,e);return this.finalize(i,new s.Property("init",r,o,n,!1,a))},t.prototype.parseObjectPattern=function(t,e){var r=this.createNode(),n=[];for(this.expect("{");!this.match("}");)n.push(this.parsePropertyPattern(t,e)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(r,new s.ObjectPattern(n))},t.prototype.parsePattern=function(t,e){var r;return this.match("[")?r=this.parseArrayPattern(t,e):this.match("{")?r=this.parseObjectPattern(t,e):(!this.matchKeyword("let")||"const"!==e&&"let"!==e||this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),t.push(this.lookahead),r=this.parseVariableIdentifier(e)),r},t.prototype.parsePatternWithDefault=function(t,e){var r=this.lookahead,n=this.parsePattern(t,e);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,n=this.finalize(this.startNode(r),new s.AssignmentPattern(n,o))}return n},t.prototype.parseVariableIdentifier=function(t){var e=this.createNode(),r=this.nextToken();return 4===r.type&&"yield"===r.value?this.context.strict?this.tolerateUnexpectedToken(r,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(r):3!==r.type?this.context.strict&&4===r.type&&this.scanner.isStrictModeReservedWord(r.value)?this.tolerateUnexpectedToken(r,o.Messages.StrictReservedWord):(this.context.strict||"let"!==r.value||"var"!==t)&&this.throwUnexpectedToken(r):(this.context.isModule||this.context.await)&&3===r.type&&"await"===r.value&&this.tolerateUnexpectedToken(r),this.finalize(e,new s.Identifier(r.value))},t.prototype.parseVariableDeclaration=function(t){var e=this.createNode(),r=this.parsePattern([],"var");this.context.strict&&r.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(o.Messages.StrictVarName);var n=null;return this.match("=")?(this.nextToken(),n=this.isolateCoverGrammar(this.parseAssignmentExpression)):r.type===u.Syntax.Identifier||t.inFor||this.expect("="),this.finalize(e,new s.VariableDeclarator(r,n))},t.prototype.parseVariableDeclarationList=function(t){var e={inFor:t.inFor},r=[];for(r.push(this.parseVariableDeclaration(e));this.match(",");)this.nextToken(),r.push(this.parseVariableDeclaration(e));return r},t.prototype.parseVariableStatement=function(){var t=this.createNode();this.expectKeyword("var");var e=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(t,new s.VariableDeclaration(e,"var"))},t.prototype.parseEmptyStatement=function(){var t=this.createNode();return this.expect(";"),this.finalize(t,new s.EmptyStatement)},t.prototype.parseExpressionStatement=function(){var t=this.createNode(),e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new s.ExpressionStatement(e))},t.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},t.prototype.parseIfStatement=function(){var t,e=this.createNode(),r=null;this.expectKeyword("if"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),t=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),r=this.parseIfClause())),this.finalize(e,new s.IfStatement(n,t,r))},t.prototype.parseDoWhileStatement=function(){var t=this.createNode();this.expectKeyword("do");var e=this.context.inIteration;this.context.inIteration=!0;var r=this.parseStatement();this.context.inIteration=e,this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(t,new s.DoWhileStatement(r,n))},t.prototype.parseWhileStatement=function(){var t,e=this.createNode();this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var n=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=n}return this.finalize(e,new s.WhileStatement(r,t))},t.prototype.parseForStatement=function(){var t,e,r,n=null,i=null,a=null,l=!0,h=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){n=this.createNode(),this.nextToken();var c=this.context.allowIn;this.context.allowIn=!1;var p=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=c,1===p.length&&this.matchKeyword("in")){var f=p[0];f.init&&(f.id.type===u.Syntax.ArrayPattern||f.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),n=this.finalize(n,new s.VariableDeclaration(p,"var")),this.nextToken(),t=n,e=this.parseExpression(),n=null}else 1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(n=this.finalize(n,new s.VariableDeclaration(p,"var")),this.nextToken(),t=n,e=this.parseAssignmentExpression(),n=null,l=!1):(n=this.finalize(n,new s.VariableDeclaration(p,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){n=this.createNode();var d=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(c=this.context.allowIn,this.context.allowIn=!1,p=this.parseBindingList(d,{inFor:!0}),this.context.allowIn=c,1===p.length&&null===p[0].init&&this.matchKeyword("in")?(n=this.finalize(n,new s.VariableDeclaration(p,d)),this.nextToken(),t=n,e=this.parseExpression(),n=null):1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(n=this.finalize(n,new s.VariableDeclaration(p,d)),this.nextToken(),t=n,e=this.parseAssignmentExpression(),n=null,l=!1):(this.consumeSemicolon(),n=this.finalize(n,new s.VariableDeclaration(p,d)))):(n=this.finalize(n,new s.Identifier(d)),this.nextToken(),t=n,e=this.parseExpression(),n=null)}else{var m=this.lookahead;if(c=this.context.allowIn,this.context.allowIn=!1,n=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=c,this.matchKeyword("in"))this.context.isAssignmentTarget&&n.type!==u.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(n),t=n,e=this.parseExpression(),n=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&n.type!==u.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(n),t=n,e=this.parseAssignmentExpression(),n=null,l=!1;else{if(this.match(",")){for(var y=[n];this.match(",");)this.nextToken(),y.push(this.isolateCoverGrammar(this.parseAssignmentExpression));n=this.finalize(this.startNode(m),new s.SequenceExpression(y))}this.expect(";")}}if(void 0===t&&(this.match(";")||(i=this.parseExpression()),this.expect(";"),this.match(")")||(a=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),r=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var g=this.context.inIteration;this.context.inIteration=!0,r=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=g}return void 0===t?this.finalize(h,new s.ForStatement(n,i,a,r)):l?this.finalize(h,new s.ForInStatement(t,e,r)):this.finalize(h,new s.ForOfStatement(t,e,r))},t.prototype.parseContinueStatement=function(){var t=this.createNode();this.expectKeyword("continue");var e=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var r=this.parseVariableIdentifier();e=r;var n="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,n)||this.throwError(o.Messages.UnknownLabel,r.name)}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.throwError(o.Messages.IllegalContinue),this.finalize(t,new s.ContinueStatement(e))},t.prototype.parseBreakStatement=function(){var t=this.createNode();this.expectKeyword("break");var e=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var r=this.parseVariableIdentifier(),n="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,n)||this.throwError(o.Messages.UnknownLabel,r.name),e=r}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.context.inSwitch||this.throwError(o.Messages.IllegalBreak),this.finalize(t,new s.BreakStatement(e))},t.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var t=this.createNode();this.expectKeyword("return");var e=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new s.ReturnStatement(e))},t.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var t,e=this.createNode();this.expectKeyword("with"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new s.WithStatement(r,t))},t.prototype.parseSwitchCase=function(){var t,e=this.createNode();this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");for(var r=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)r.push(this.parseStatementListItem());return this.finalize(e,new s.SwitchCase(t,r))},t.prototype.parseSwitchStatement=function(){var t=this.createNode();this.expectKeyword("switch"),this.expect("(");var e=this.parseExpression();this.expect(")");var r=this.context.inSwitch;this.context.inSwitch=!0;var n=[],i=!1;for(this.expect("{");!this.match("}");){var a=this.parseSwitchCase();null===a.test&&(i&&this.throwError(o.Messages.MultipleDefaultsInSwitch),i=!0),n.push(a)}return this.expect("}"),this.context.inSwitch=r,this.finalize(t,new s.SwitchStatement(e,n))},t.prototype.parseLabelledStatement=function(){var t,e=this.createNode(),r=this.parseExpression();if(r.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var n=r,i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError(o.Messages.Redeclaration,"Label",n.name),this.context.labelSet[i]=!0;var a=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),a=this.parseClassDeclaration();else if(this.matchKeyword("function")){var l=this.lookahead,h=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(l,o.Messages.StrictFunction):h.generator&&this.tolerateUnexpectedToken(l,o.Messages.GeneratorInLegacyContext),a=h}else a=this.parseStatement();delete this.context.labelSet[i],t=new s.LabeledStatement(n,a)}else this.consumeSemicolon(),t=new s.ExpressionStatement(r);return this.finalize(e,t)},t.prototype.parseThrowStatement=function(){var t=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new s.ThrowStatement(e))},t.prototype.parseCatchClause=function(){var t=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var e=[],r=this.parsePattern(e),n={},i=0;i<e.length;i++){var a="$"+e[i].value;Object.prototype.hasOwnProperty.call(n,a)&&this.tolerateError(o.Messages.DuplicateBinding,e[i].value),n[a]=!0}this.context.strict&&r.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var l=this.parseBlock();return this.finalize(t,new s.CatchClause(r,l))},t.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},t.prototype.parseTryStatement=function(){var t=this.createNode();this.expectKeyword("try");var e=this.parseBlock(),r=this.matchKeyword("catch")?this.parseCatchClause():null,n=this.matchKeyword("finally")?this.parseFinallyClause():null;return r||n||this.throwError(o.Messages.NoCatchOrFinally),this.finalize(t,new s.TryStatement(e,r,n))},t.prototype.parseDebuggerStatement=function(){var t=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(t,new s.DebuggerStatement)},t.prototype.parseStatement=function(){var t;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:t=this.parseExpressionStatement();break;case 7:var e=this.lookahead.value;t="{"===e?this.parseBlock():"("===e?this.parseExpressionStatement():";"===e?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:t=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":t=this.parseBreakStatement();break;case"continue":t=this.parseContinueStatement();break;case"debugger":t=this.parseDebuggerStatement();break;case"do":t=this.parseDoWhileStatement();break;case"for":t=this.parseForStatement();break;case"function":t=this.parseFunctionDeclaration();break;case"if":t=this.parseIfStatement();break;case"return":t=this.parseReturnStatement();break;case"switch":t=this.parseSwitchStatement();break;case"throw":t=this.parseThrowStatement();break;case"try":t=this.parseTryStatement();break;case"var":t=this.parseVariableStatement();break;case"while":t=this.parseWhileStatement();break;case"with":t=this.parseWithStatement();break;default:t=this.parseExpressionStatement()}break;default:t=this.throwUnexpectedToken(this.lookahead)}return t},t.prototype.parseFunctionSourceElements=function(){var t=this.createNode();this.expect("{");var e=this.parseDirectivePrologues(),r=this.context.labelSet,n=this.context.inIteration,i=this.context.inSwitch,o=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)e.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=r,this.context.inIteration=n,this.context.inSwitch=i,this.context.inFunctionBody=o,this.finalize(t,new s.BlockStatement(e))},t.prototype.validateParam=function(t,e,r){var n="$"+r;this.context.strict?(this.scanner.isRestrictedWord(r)&&(t.stricted=e,t.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(t.paramSet,n)&&(t.stricted=e,t.message=o.Messages.StrictParamDupe)):t.firstRestricted||(this.scanner.isRestrictedWord(r)?(t.firstRestricted=e,t.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(r)?(t.firstRestricted=e,t.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(t.paramSet,n)&&(t.stricted=e,t.message=o.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(t.paramSet,n,{value:!0,enumerable:!0,writable:!0,configurable:!0}):t.paramSet[n]=!0},t.prototype.parseRestElement=function(t){var e=this.createNode();this.expect("...");var r=this.parsePattern(t);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(e,new s.RestElement(r))},t.prototype.parseFormalParameter=function(t){for(var e=[],r=this.match("...")?this.parseRestElement(e):this.parsePatternWithDefault(e),n=0;n<e.length;n++)this.validateParam(t,e[n],e[n].value);t.simple=t.simple&&r instanceof s.Identifier,t.params.push(r)},t.prototype.parseFormalParameters=function(t){var e;if(e={simple:!0,params:[],firstRestricted:t},this.expect("("),!this.match(")"))for(e.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(e),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:e.simple,params:e.params,stricted:e.stricted,firstRestricted:e.firstRestricted,message:e.message}},t.prototype.matchAsyncFunction=function(){var t=this.matchContextualKeyword("async");if(t){var e=this.scanner.saveState();this.scanner.scanComments();var r=this.scanner.lex();this.scanner.restoreState(e),t=e.lineNumber===r.lineNumber&&4===r.type&&"function"===r.value}return t},t.prototype.parseFunctionDeclaration=function(t){var e=this.createNode(),r=this.matchContextualKeyword("async");r&&this.nextToken(),this.expectKeyword("function");var n,i=!r&&this.match("*");i&&this.nextToken();var a=null,u=null;if(!t||!this.match("(")){var l=this.lookahead;a=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(l.value)&&this.tolerateUnexpectedToken(l,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(l.value)?(u=l,n=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(l.value)&&(u=l,n=o.Messages.StrictReservedWord)}var h=this.context.await,c=this.context.allowYield;this.context.await=r,this.context.allowYield=!i;var p=this.parseFormalParameters(u),f=p.params,d=p.stricted;u=p.firstRestricted,p.message&&(n=p.message);var m=this.context.strict,y=this.context.allowStrictDirective;this.context.allowStrictDirective=p.simple;var g=this.parseFunctionSourceElements();return this.context.strict&&u&&this.throwUnexpectedToken(u,n),this.context.strict&&d&&this.tolerateUnexpectedToken(d,n),this.context.strict=m,this.context.allowStrictDirective=y,this.context.await=h,this.context.allowYield=c,r?this.finalize(e,new s.AsyncFunctionDeclaration(a,f,g)):this.finalize(e,new s.FunctionDeclaration(a,f,g,i))},t.prototype.parseFunctionExpression=function(){var t=this.createNode(),e=this.matchContextualKeyword("async");e&&this.nextToken(),this.expectKeyword("function");var r,n=!e&&this.match("*");n&&this.nextToken();var i,a=null,u=this.context.await,l=this.context.allowYield;if(this.context.await=e,this.context.allowYield=!n,!this.match("(")){var h=this.lookahead;a=this.context.strict||n||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(h.value)&&this.tolerateUnexpectedToken(h,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(h.value)?(i=h,r=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(h.value)&&(i=h,r=o.Messages.StrictReservedWord)}var c=this.parseFormalParameters(i),p=c.params,f=c.stricted;i=c.firstRestricted,c.message&&(r=c.message);var d=this.context.strict,m=this.context.allowStrictDirective;this.context.allowStrictDirective=c.simple;var y=this.parseFunctionSourceElements();return this.context.strict&&i&&this.throwUnexpectedToken(i,r),this.context.strict&&f&&this.tolerateUnexpectedToken(f,r),this.context.strict=d,this.context.allowStrictDirective=m,this.context.await=u,this.context.allowYield=l,e?this.finalize(t,new s.AsyncFunctionExpression(a,p,y)):this.finalize(t,new s.FunctionExpression(a,p,y,n))},t.prototype.parseDirective=function(){var t=this.lookahead,e=this.createNode(),r=this.parseExpression(),n=r.type===u.Syntax.Literal?this.getTokenRaw(t).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(e,n?new s.Directive(r,n):new s.ExpressionStatement(r))},t.prototype.parseDirectivePrologues=function(){for(var t=null,e=[];;){var r=this.lookahead;if(8!==r.type)break;var n=this.parseDirective();e.push(n);var i=n.directive;if("string"!=typeof i)break;"use strict"===i?(this.context.strict=!0,t&&this.tolerateUnexpectedToken(t,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(r,o.Messages.IllegalLanguageModeDirective)):!t&&r.octal&&(t=r)}return e},t.prototype.qualifiedPropertyName=function(t){switch(t.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===t.value}return!1},t.prototype.parseGetterMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var r=this.parseFormalParameters();r.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var n=this.parsePropertyMethod(r);return this.context.allowYield=e,this.finalize(t,new s.FunctionExpression(null,r.params,n,!1))},t.prototype.parseSetterMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var r=this.parseFormalParameters();1!==r.params.length?this.tolerateError(o.Messages.BadSetterArity):r.params[0]instanceof s.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var n=this.parsePropertyMethod(r);return this.context.allowYield=e,this.finalize(t,new s.FunctionExpression(null,r.params,n,!1))},t.prototype.parseGeneratorMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var r=this.parseFormalParameters();this.context.allowYield=!1;var n=this.parsePropertyMethod(r);return this.context.allowYield=e,this.finalize(t,new s.FunctionExpression(null,r.params,n,!0))},t.prototype.isStartOfExpression=function(){var t=!0,e=this.lookahead.value;switch(this.lookahead.type){case 7:t="["===e||"("===e||"{"===e||"+"===e||"-"===e||"!"===e||"~"===e||"++"===e||"--"===e||"/"===e||"/="===e;break;case 4:t="class"===e||"delete"===e||"function"===e||"let"===e||"new"===e||"super"===e||"this"===e||"typeof"===e||"void"===e||"yield"===e}return t},t.prototype.parseYieldExpression=function(){var t=this.createNode();this.expectKeyword("yield");var e=null,r=!1;if(!this.hasLineTerminator){var n=this.context.allowYield;this.context.allowYield=!1,(r=this.match("*"))?(this.nextToken(),e=this.parseAssignmentExpression()):this.isStartOfExpression()&&(e=this.parseAssignmentExpression()),this.context.allowYield=n}return this.finalize(t,new s.YieldExpression(e,r))},t.prototype.parseClassElement=function(t){var e=this.lookahead,r=this.createNode(),n="",i=null,a=null,u=!1,l=!1,h=!1,c=!1;if(this.match("*"))this.nextToken();else if(u=this.match("["),"static"===(i=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(e=this.lookahead,h=!0,u=this.match("["),this.match("*")?this.nextToken():i=this.parseObjectPropertyKey()),3===e.type&&!this.hasLineTerminator&&"async"===e.value){var p=this.lookahead.value;":"!==p&&"("!==p&&"*"!==p&&(c=!0,e=this.lookahead,i=this.parseObjectPropertyKey(),3===e.type&&"constructor"===e.value&&this.tolerateUnexpectedToken(e,o.Messages.ConstructorIsAsync))}var f=this.qualifiedPropertyName(this.lookahead);return 3===e.type?"get"===e.value&&f?(n="get",u=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod()):"set"===e.value&&f&&(n="set",u=this.match("["),i=this.parseObjectPropertyKey(),a=this.parseSetterMethod()):7===e.type&&"*"===e.value&&f&&(n="init",u=this.match("["),i=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),l=!0),!n&&i&&this.match("(")&&(n="init",a=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0),n||this.throwUnexpectedToken(this.lookahead),"init"===n&&(n="method"),u||(h&&this.isPropertyKey(i,"prototype")&&this.throwUnexpectedToken(e,o.Messages.StaticPrototype),!h&&this.isPropertyKey(i,"constructor")&&(("method"!==n||!l||a&&a.generator)&&this.throwUnexpectedToken(e,o.Messages.ConstructorSpecialMethod),t.value?this.throwUnexpectedToken(e,o.Messages.DuplicateConstructor):t.value=!0,n="constructor")),this.finalize(r,new s.MethodDefinition(i,u,a,n,h))},t.prototype.parseClassElementList=function(){var t=[],e={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():t.push(this.parseClassElement(e));return this.expect("}"),t},t.prototype.parseClassBody=function(){var t=this.createNode(),e=this.parseClassElementList();return this.finalize(t,new s.ClassBody(e))},t.prototype.parseClassDeclaration=function(t){var e=this.createNode(),r=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=t&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=r,this.finalize(e,new s.ClassDeclaration(n,i,o))},t.prototype.parseClassExpression=function(){var t=this.createNode(),e=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=3===this.lookahead.type?this.parseVariableIdentifier():null,n=null;this.matchKeyword("extends")&&(this.nextToken(),n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=e,this.finalize(t,new s.ClassExpression(r,n,i))},t.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var t=this.createNode(),e=this.parseDirectivePrologues();2!==this.lookahead.type;)e.push(this.parseStatementListItem());return this.finalize(t,new s.Module(e))},t.prototype.parseScript=function(){for(var t=this.createNode(),e=this.parseDirectivePrologues();2!==this.lookahead.type;)e.push(this.parseStatementListItem());return this.finalize(t,new s.Script(e))},t.prototype.parseModuleSpecifier=function(){var t=this.createNode();8!==this.lookahead.type&&this.throwError(o.Messages.InvalidModuleSpecifier);var e=this.nextToken(),r=this.getTokenRaw(e);return this.finalize(t,new s.Literal(e.value,r))},t.prototype.parseImportSpecifier=function(){var t,e,r=this.createNode();return 3===this.lookahead.type?(e=t=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),e=this.parseVariableIdentifier())):(e=t=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),e=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(r,new s.ImportSpecifier(e,t))},t.prototype.parseNamedImports=function(){this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),t},t.prototype.parseImportDefaultSpecifier=function(){var t=this.createNode(),e=this.parseIdentifierName();return this.finalize(t,new s.ImportDefaultSpecifier(e))},t.prototype.parseImportNamespaceSpecifier=function(){var t=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var e=this.parseIdentifierName();return this.finalize(t,new s.ImportNamespaceSpecifier(e))},t.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var t,e=this.createNode();this.expectKeyword("import");var r=[];if(8===this.lookahead.type)t=this.parseModuleSpecifier();else{if(this.match("{")?r=r.concat(this.parseNamedImports()):this.match("*")?r.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(r.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?r.push(this.parseImportNamespaceSpecifier()):this.match("{")?r=r.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var n=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}this.nextToken(),t=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(e,new s.ImportDeclaration(r,t))},t.prototype.parseExportSpecifier=function(){var t=this.createNode(),e=this.parseIdentifierName(),r=e;return this.matchContextualKeyword("as")&&(this.nextToken(),r=this.parseIdentifierName()),this.finalize(t,new s.ExportSpecifier(e,r))},t.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var t,e=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var r=this.parseFunctionDeclaration(!0);t=this.finalize(e,new s.ExportDefaultDeclaration(r))}else this.matchKeyword("class")?(r=this.parseClassDeclaration(!0),t=this.finalize(e,new s.ExportDefaultDeclaration(r))):this.matchContextualKeyword("async")?(r=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),t=this.finalize(e,new s.ExportDefaultDeclaration(r))):(this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value),r=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),t=this.finalize(e,new s.ExportDefaultDeclaration(r)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var n=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),t=this.finalize(e,new s.ExportAllDeclaration(i))}else if(4===this.lookahead.type){switch(r=void 0,this.lookahead.value){case"let":case"const":r=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":r=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new s.ExportNamedDeclaration(r,[],null))}else if(this.matchAsyncFunction())r=this.parseFunctionDeclaration(),t=this.finalize(e,new s.ExportNamedDeclaration(r,[],null));else{var a=[],u=null,l=!1;for(this.expect("{");!this.match("}");)l=l||this.matchKeyword("default"),a.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),u=this.parseModuleSpecifier(),this.consumeSemicolon()):l?(n=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause,this.throwError(n,this.lookahead.value)):this.consumeSemicolon(),t=this.finalize(e,new s.ExportNamedDeclaration(null,a,u))}return t},t}();e.Parser=c},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assert=function(t,e){if(!t)throw new Error("ASSERT: "+e)}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.errors=[],this.tolerant=!1}return t.prototype.recordError=function(t){this.errors.push(t)},t.prototype.tolerate=function(t){if(!this.tolerant)throw t;this.recordError(t)},t.prototype.constructError=function(t,e){var r=new Error(t);try{throw r}catch(t){Object.create&&Object.defineProperty&&(r=Object.create(t),Object.defineProperty(r,"column",{value:e}))}return r},t.prototype.createError=function(t,e,r,n){var i="Line "+e+": "+n,o=this.constructError(i,r);return o.index=t,o.lineNumber=e,o.description=n,o},t.prototype.throwError=function(t,e,r,n){throw this.createError(t,e,r,n)},t.prototype.tolerateError=function(t,e,r,n){var i=this.createError(t,e,r,n);if(!this.tolerant)throw i;this.recordError(i)},t}();e.ErrorHandler=r},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(9),i=r(4),o=r(11);function s(t){return"0123456789abcdef".indexOf(t.toLowerCase())}function a(t){return"01234567".indexOf(t)}var u=function(){function t(t,e){this.source=t,this.errorHandler=e,this.trackComment=!1,this.isModule=!1,this.length=t.length,this.index=0,this.lineNumber=t.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return t.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},t.prototype.restoreState=function(t){this.index=t.index,this.lineNumber=t.lineNumber,this.lineStart=t.lineStart},t.prototype.eof=function(){return this.index>=this.length},t.prototype.throwUnexpectedToken=function(t){return void 0===t&&(t=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.tolerateUnexpectedToken=function(t){void 0===t&&(t=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.skipSingleLineComment=function(t){var e,r,n=[];for(this.trackComment&&(n=[],e=this.index-t,r={start:{line:this.lineNumber,column:this.index-this.lineStart-t},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(++this.index,i.Character.isLineTerminator(o)){if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart-1};var s={multiLine:!1,slice:[e+t,this.index-1],range:[e,this.index-1],loc:r};n.push(s)}return 13===o&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,n}}return this.trackComment&&(r.end={line:this.lineNumber,column:this.index-this.lineStart},s={multiLine:!1,slice:[e+t,this.index],range:[e,this.index],loc:r},n.push(s)),n},t.prototype.skipMultiLineComment=function(){var t,e,r=[];for(this.trackComment&&(r=[],t=this.index-2,e={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var n=this.source.charCodeAt(this.index);if(i.Character.isLineTerminator(n))13===n&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===n){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){e.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:e};r.push(o)}return r}++this.index}else++this.index}return this.trackComment&&(e.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:e},r.push(o)),this.tolerateUnexpectedToken(),r},t.prototype.scanComments=function(){var t;this.trackComment&&(t=[]);for(var e=0===this.index;!this.eof();){var r=this.source.charCodeAt(this.index);if(i.Character.isWhiteSpace(r))++this.index;else if(i.Character.isLineTerminator(r))++this.index,13===r&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,e=!0;else if(47===r)if(47===(r=this.source.charCodeAt(this.index+1))){this.index+=2;var n=this.skipSingleLineComment(2);this.trackComment&&(t=t.concat(n)),e=!0}else{if(42!==r)break;this.index+=2,n=this.skipMultiLineComment(),this.trackComment&&(t=t.concat(n))}else if(e&&45===r){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,n=this.skipSingleLineComment(3),this.trackComment&&(t=t.concat(n))}else{if(60!==r||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,n=this.skipSingleLineComment(4),this.trackComment&&(t=t.concat(n))}}return t},t.prototype.isFutureReservedWord=function(t){switch(t){case"enum":case"export":case"import":case"super":return!0;default:return!1}},t.prototype.isStrictModeReservedWord=function(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},t.prototype.isRestrictedWord=function(t){return"eval"===t||"arguments"===t},t.prototype.isKeyword=function(t){switch(t.length){case 2:return"if"===t||"in"===t||"do"===t;case 3:return"var"===t||"for"===t||"new"===t||"try"===t||"let"===t;case 4:return"this"===t||"else"===t||"case"===t||"void"===t||"with"===t||"enum"===t;case 5:return"while"===t||"break"===t||"catch"===t||"throw"===t||"const"===t||"yield"===t||"class"===t||"super"===t;case 6:return"return"===t||"typeof"===t||"delete"===t||"switch"===t||"export"===t||"import"===t;case 7:return"default"===t||"finally"===t||"extends"===t;case 8:return"function"===t||"continue"===t||"debugger"===t;case 10:return"instanceof"===t;default:return!1}},t.prototype.codePointAt=function(t){var e=this.source.charCodeAt(t);if(e>=55296&&e<=56319){var r=this.source.charCodeAt(t+1);r>=56320&&r<=57343&&(e=1024*(e-55296)+r-56320+65536)}return e},t.prototype.scanHexEscape=function(t){for(var e="u"===t?4:2,r=0,n=0;n<e;++n){if(this.eof()||!i.Character.isHexDigit(this.source.charCodeAt(this.index)))return null;r=16*r+s(this.source[this.index++])}return String.fromCharCode(r)},t.prototype.scanUnicodeCodePointEscape=function(){var t=this.source[this.index],e=0;for("}"===t&&this.throwUnexpectedToken();!this.eof()&&(t=this.source[this.index++],i.Character.isHexDigit(t.charCodeAt(0)));)e=16*e+s(t);return(e>1114111||"}"!==t)&&this.throwUnexpectedToken(),i.Character.fromCodePoint(e)},t.prototype.getIdentifier=function(){for(var t=this.index++;!this.eof();){var e=this.source.charCodeAt(this.index);if(92===e)return this.index=t,this.getComplexIdentifier();if(e>=55296&&e<57343)return this.index=t,this.getComplexIdentifier();if(!i.Character.isIdentifierPart(e))break;++this.index}return this.source.slice(t,this.index)},t.prototype.getComplexIdentifier=function(){var t,e=this.codePointAt(this.index),r=i.Character.fromCodePoint(e);for(this.index+=r.length,92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,t=this.scanUnicodeCodePointEscape()):null!==(t=this.scanHexEscape("u"))&&"\\"!==t&&i.Character.isIdentifierStart(t.charCodeAt(0))||this.throwUnexpectedToken(),r=t);!this.eof()&&(e=this.codePointAt(this.index),i.Character.isIdentifierPart(e));)r+=t=i.Character.fromCodePoint(e),this.index+=t.length,92===e&&(r=r.substr(0,r.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,t=this.scanUnicodeCodePointEscape()):null!==(t=this.scanHexEscape("u"))&&"\\"!==t&&i.Character.isIdentifierPart(t.charCodeAt(0))||this.throwUnexpectedToken(),r+=t);return r},t.prototype.octalToDecimal=function(t){var e="0"!==t,r=a(t);return!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(e=!0,r=8*r+a(this.source[this.index++]),"0123".indexOf(t)>=0&&!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(r=8*r+a(this.source[this.index++]))),{code:r,octal:e}},t.prototype.scanIdentifier=function(){var t,e=this.index,r=92===this.source.charCodeAt(e)?this.getComplexIdentifier():this.getIdentifier();if(3!=(t=1===r.length?3:this.isKeyword(r)?4:"null"===r?5:"true"===r||"false"===r?1:3)&&e+r.length!==this.index){var n=this.index;this.index=e,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=n}return{type:t,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},t.prototype.scanPunctuator=function(){var t=this.index,e=this.source[this.index];switch(e){case"(":case"{":"{"===e&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,e="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(e=this.source.substr(this.index,4))?this.index+=4:"==="===(e=e.substr(0,3))||"!=="===e||">>>"===e||"<<="===e||">>="===e||"**="===e?this.index+=3:"&&"===(e=e.substr(0,2))||"||"===e||"=="===e||"!="===e||"+="===e||"-="===e||"*="===e||"/="===e||"++"===e||"--"===e||"<<"===e||">>"===e||"&="===e||"|="===e||"^="===e||"%="===e||"<="===e||">="===e||"=>"===e||"**"===e?this.index+=2:(e=this.source[this.index],"<>=!+-*%&|^/".indexOf(e)>=0&&++this.index)}return this.index===t&&this.throwUnexpectedToken(),{type:7,value:e,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanHexLiteral=function(t){for(var e="";!this.eof()&&i.Character.isHexDigit(this.source.charCodeAt(this.index));)e+=this.source[this.index++];return 0===e.length&&this.throwUnexpectedToken(),i.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+e,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanBinaryLiteral=function(t){for(var e,r="";!this.eof()&&("0"===(e=this.source[this.index])||"1"===e);)r+=this.source[this.index++];return 0===r.length&&this.throwUnexpectedToken(),this.eof()||(e=this.source.charCodeAt(this.index),(i.Character.isIdentifierStart(e)||i.Character.isDecimalDigit(e))&&this.throwUnexpectedToken()),{type:6,value:parseInt(r,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanOctalLiteral=function(t,e){var r="",n=!1;for(i.Character.isOctalDigit(t.charCodeAt(0))?(n=!0,r="0"+this.source[this.index++]):++this.index;!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];return n||0!==r.length||this.throwUnexpectedToken(),(i.Character.isIdentifierStart(this.source.charCodeAt(this.index))||i.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(r,8),octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},t.prototype.isImplicitOctalLiteral=function(){for(var t=this.index+1;t<this.length;++t){var e=this.source[t];if("8"===e||"9"===e)return!1;if(!i.Character.isOctalDigit(e.charCodeAt(0)))return!0}return!0},t.prototype.scanNumericLiteral=function(){var t=this.index,e=this.source[t];n.assert(i.Character.isDecimalDigit(e.charCodeAt(0))||"."===e,"Numeric literal must start with a decimal digit or a decimal point");var r="";if("."!==e){if(r=this.source[this.index++],e=this.source[this.index],"0"===r){if("x"===e||"X"===e)return++this.index,this.scanHexLiteral(t);if("b"===e||"B"===e)return++this.index,this.scanBinaryLiteral(t);if("o"===e||"O"===e)return this.scanOctalLiteral(e,t);if(e&&i.Character.isOctalDigit(e.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(e,t)}for(;i.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];e=this.source[this.index]}if("."===e){for(r+=this.source[this.index++];i.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];e=this.source[this.index]}if("e"===e||"E"===e)if(r+=this.source[this.index++],"+"!==(e=this.source[this.index])&&"-"!==e||(r+=this.source[this.index++]),i.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;i.Character.isDecimalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];else this.throwUnexpectedToken();return i.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(r),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanStringLiteral=function(){var t=this.index,e=this.source[t];n.assert("'"===e||'"'===e,"String literal must starts with a quote"),++this.index;for(var r=!1,s="";!this.eof();){var a=this.source[this.index++];if(a===e){e="";break}if("\\"===a)if((a=this.source[this.index++])&&i.Character.isLineTerminator(a.charCodeAt(0)))++this.lineNumber,"\r"===a&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(a){case"u":if("{"===this.source[this.index])++this.index,s+=this.scanUnicodeCodePointEscape();else{var u=this.scanHexEscape(a);null===u&&this.throwUnexpectedToken(),s+=u}break;case"x":var l=this.scanHexEscape(a);null===l&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),s+=l;break;case"n":s+="\n";break;case"r":s+="\r";break;case"t":s+="\t";break;case"b":s+="\b";break;case"f":s+="\f";break;case"v":s+="\v";break;case"8":case"9":s+=a,this.tolerateUnexpectedToken();break;default:if(a&&i.Character.isOctalDigit(a.charCodeAt(0))){var h=this.octalToDecimal(a);r=h.octal||r,s+=String.fromCharCode(h.code)}else s+=a}else{if(i.Character.isLineTerminator(a.charCodeAt(0)))break;s+=a}}return""!==e&&(this.index=t,this.throwUnexpectedToken()),{type:8,value:s,octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanTemplate=function(){var t="",e=!1,r=this.index,n="`"===this.source[r],s=!1,a=2;for(++this.index;!this.eof();){var u=this.source[this.index++];if("`"===u){a=1,s=!0,e=!0;break}if("$"===u){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,e=!0;break}t+=u}else if("\\"===u)if(u=this.source[this.index++],i.Character.isLineTerminator(u.charCodeAt(0)))++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(u){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"u":if("{"===this.source[this.index])++this.index,t+=this.scanUnicodeCodePointEscape();else{var l=this.index,h=this.scanHexEscape(u);null!==h?t+=h:(this.index=l,t+=u)}break;case"x":var c=this.scanHexEscape(u);null===c&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),t+=c;break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:"0"===u?(i.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral),t+="\0"):i.Character.isOctalDigit(u.charCodeAt(0))?this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral):t+=u}else i.Character.isLineTerminator(u.charCodeAt(0))?(++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,t+="\n"):t+=u}return e||this.throwUnexpectedToken(),n||this.curlyStack.pop(),{type:10,value:this.source.slice(r+1,this.index-a),cooked:t,head:n,tail:s,lineNumber:this.lineNumber,lineStart:this.lineStart,start:r,end:this.index}},t.prototype.testRegExp=function(t,e){var r=t,n=this;e.indexOf("u")>=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(t,e,r){var i=parseInt(e||r,16);return i>1114111&&n.throwUnexpectedToken(o.Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(r)}catch(t){this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(t,e)}catch(t){return null}},t.prototype.scanRegExpBody=function(){var t=this.source[this.index];n.assert("/"===t,"Regular expression literal must start with a slash");for(var e=this.source[this.index++],r=!1,s=!1;!this.eof();)if(e+=t=this.source[this.index++],"\\"===t)t=this.source[this.index++],i.Character.isLineTerminator(t.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),e+=t;else if(i.Character.isLineTerminator(t.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(r)"]"===t&&(r=!1);else{if("/"===t){s=!0;break}"["===t&&(r=!0)}return s||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),e.substr(1,e.length-2)},t.prototype.scanRegExpFlags=function(){for(var t="";!this.eof();){var e=this.source[this.index];if(!i.Character.isIdentifierPart(e.charCodeAt(0)))break;if(++this.index,"\\"!==e||this.eof())t+=e;else if("u"===(e=this.source[this.index])){++this.index;var r=this.index,n=this.scanHexEscape("u");if(null!==n)for(t+=n;r<this.index;++r)this.source[r];else this.index=r,t+="u";this.tolerateUnexpectedToken()}else this.tolerateUnexpectedToken()}return t},t.prototype.scanRegExp=function(){var t=this.index,e=this.scanRegExpBody(),r=this.scanRegExpFlags();return{type:9,value:"",pattern:e,flags:r,regex:this.testRegExp(e,r),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var t=this.source.charCodeAt(this.index);return i.Character.isIdentifierStart(t)?this.scanIdentifier():40===t||41===t||59===t?this.scanPunctuator():39===t||34===t?this.scanStringLiteral():46===t?i.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():i.Character.isDecimalDigit(t)?this.scanNumericLiteral():96===t||125===t&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():t>=55296&&t<57343&&i.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},t}();e.Scanner=u},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="<end>",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(10),i=r(12),o=r(13),s=function(){function t(){this.values=[],this.curly=this.paren=-1}return t.prototype.beforeFunctionExpression=function(t){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(t)>=0},t.prototype.isRegexStart=function(){var t=this.values[this.values.length-1],e=null!==t;switch(t){case"this":case"]":e=!1;break;case")":var r=this.values[this.paren-1];e="if"===r||"while"===r||"for"===r||"with"===r;break;case"}":if(e=!1,"function"===this.values[this.curly-3])e=!!(n=this.values[this.curly-4])&&!this.beforeFunctionExpression(n);else if("function"===this.values[this.curly-4]){var n;e=!(n=this.values[this.curly-5])||!this.beforeFunctionExpression(n)}}return e},t.prototype.push=function(t){7===t.type||4===t.type?("{"===t.value?this.curly=this.values.length:"("===t.value&&(this.paren=this.values.length),this.values.push(t.value)):this.values.push(null)},t}(),a=function(){function t(t,e){this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=!!e&&"boolean"==typeof e.tolerant&&e.tolerant,this.scanner=new i.Scanner(t,this.errorHandler),this.scanner.trackComment=!!e&&"boolean"==typeof e.comment&&e.comment,this.trackRange=!!e&&"boolean"==typeof e.range&&e.range,this.trackLoc=!!e&&"boolean"==typeof e.loc&&e.loc,this.buffer=[],this.reader=new s}return t.prototype.errors=function(){return this.errorHandler.errors},t.prototype.getNextToken=function(){if(0===this.buffer.length){var t=this.scanner.scanComments();if(this.scanner.trackComment)for(var e=0;e<t.length;++e){var r=t[e],n=this.scanner.source.slice(r.slice[0],r.slice[1]),i={type:r.multiLine?"BlockComment":"LineComment",value:n};this.trackRange&&(i.range=r.range),this.trackLoc&&(i.loc=r.loc),this.buffer.push(i)}if(!this.scanner.eof()){var s=void 0;this.trackLoc&&(s={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var a="/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(a);var u={type:o.TokenName[a.type],value:this.scanner.source.slice(a.start,a.end)};if(this.trackRange&&(u.range=[a.start,a.end]),this.trackLoc&&(s.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=s),9===a.type){var l=a.pattern,h=a.flags;u.regex={pattern:l,flags:h}}this.buffer.push(u)}}return this.buffer.shift()},t}();e.Tokenizer=a}])},t.exports=e()},5418(t,e,r){"use strict";var n=r(8467);t.exports=new n("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(t){return void 0===t},represent:function(){return""}})},5430(t,e,r){"use strict";var n=r(6065).hp;function i(t,e){return function(){return t.apply(e,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,{iterator:a,toStringTag:u}=Symbol,l=(h=Object.create(null),t=>{const e=o.call(t);return h[e]||(h[e]=e.slice(8,-1).toLowerCase())});var h;const c=t=>(t=t.toLowerCase(),e=>l(e)===t),p=t=>e=>typeof e===t,{isArray:f}=Array,d=p("undefined");function m(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&v(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const y=c("ArrayBuffer"),g=p("string"),v=p("function"),x=p("number"),b=t=>null!==t&&"object"==typeof t,E=t=>{if("object"!==l(t))return!1;const e=s(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||u in t||a in t)},C=c("Date"),S=c("File"),w=c("Blob"),A=c("FileList"),D=c("URLSearchParams"),[k,_,T,F]=["ReadableStream","Request","Response","Headers"].map(c);function I(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,i;if("object"!=typeof t&&(t=[t]),f(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(m(t))return;const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(n=0;n<o;n++)s=i[n],e.call(null,t[s],s,t)}}function O(t,e){if(m(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n,i=r.length;for(;i-- >0;)if(n=r[i],e===n.toLowerCase())return n;return null}const N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r.g,B=t=>!d(t)&&t!==N,R=(P="undefined"!=typeof Uint8Array&&s(Uint8Array),t=>P&&t instanceof P);var P;const L=c("HTMLFormElement"),M=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),U=c("RegExp"),j=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};I(r,(r,i)=>{let o;!1!==(o=e(r,i,t))&&(n[i]=o||r)}),Object.defineProperties(t,n)},z=c("AsyncFunction"),J=(V="function"==typeof setImmediate,X=v(N.postMessage),V?setImmediate:X?(G=`axios@${Math.random()}`,W=[],N.addEventListener("message",({source:t,data:e})=>{t===N&&e===G&&W.length&&W.shift()()},!1),t=>{W.push(t),N.postMessage(G,"*")}):t=>setTimeout(t));var V,X,G,W;const H="undefined"!=typeof queueMicrotask?queueMicrotask.bind(N):"undefined"!=typeof process&&process.nextTick||J;var K={isArray:f,isArrayBuffer:y,isBuffer:m,isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||v(t.append)&&("formdata"===(e=l(t))||"object"===e&&v(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&y(t.buffer),e},isString:g,isNumber:x,isBoolean:t=>!0===t||!1===t,isObject:b,isPlainObject:E,isEmptyObject:t=>{if(!b(t)||m(t))return!1;try{return 0===Object.keys(t).length&&Object.getPrototypeOf(t)===Object.prototype}catch(t){return!1}},isReadableStream:k,isRequest:_,isResponse:T,isHeaders:F,isUndefined:d,isDate:C,isFile:S,isBlob:w,isRegExp:U,isFunction:v,isStream:t=>b(t)&&v(t.pipe),isURLSearchParams:D,isTypedArray:R,isFileList:A,forEach:I,merge:function t(){const{caseless:e,skipUndefined:r}=B(this)&&this||{},n={},i=(i,o)=>{const s=e&&O(n,o)||o;E(n[s])&&E(i)?n[s]=t(n[s],i):E(i)?n[s]=t({},i):f(i)?n[s]=i.slice():r&&d(i)||(n[s]=i)};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&I(arguments[t],i);return n},extend:(t,e,r,{allOwnKeys:n}={})=>(I(e,(e,n)=>{r&&v(e)?t[n]=i(e,r):t[n]=e},{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let i,o,a;const u={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)a=i[o],n&&!n(a,t,e)||u[a]||(e[a]=t[a],u[a]=!0);t=!1!==r&&s(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:l,kindOfTest:c,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(f(t))return t;let e=t.length;if(!x(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[a]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:L,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:j,freezeMethods:t=>{j(t,(e,r)=>{if(v(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];v(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach(t=>{r[t]=!0})};return f(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:O,global:N,isContextDefined:B,isSpecCompliantForm:function(t){return!!(t&&v(t.append)&&"FormData"===t[u]&&t[a])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(b(t)){if(e.indexOf(t)>=0)return;if(m(t))return t;if(!("toJSON"in t)){e[n]=t;const i=f(t)?[]:{};return I(t,(t,e)=>{const o=r(t,n+1);!d(o)&&(i[e]=o)}),e[n]=void 0,i}}return t};return r(t,0)},isAsyncFn:z,isThenable:t=>t&&(b(t)||v(t))&&v(t.then)&&v(t.catch),setImmediate:J,asap:H,isIterable:t=>null!=t&&v(t[a])};function q(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}K.inherits(q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const Y=q.prototype,$={};function Q(t){return K.isPlainObject(t)||K.isArray(t)}function Z(t){return K.endsWith(t,"[]")?t.slice(0,-2):t}function tt(t,e,r){return t?t.concat(e).map(function(t,e){return t=Z(t),!r&&e?"["+t+"]":t}).join(r?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{$[t]={value:t}}),Object.defineProperties(q,$),Object.defineProperty(Y,"isAxiosError",{value:!0}),q.from=(t,e,r,n,i,o)=>{const s=Object.create(Y);K.toFlatObject(t,s,function(t){return t!==Error.prototype},t=>"isAxiosError"!==t);const a=t&&t.message?t.message:"Error",u=null==e&&t?t.code:e;return q.call(s,a,u,r,n,i),t&&null==s.cause&&Object.defineProperty(s,"cause",{value:t,configurable:!0}),s.name=t&&t.name||"Error",o&&Object.assign(s,o),s};const et=K.toFlatObject(K,{},null,function(t){return/^is[A-Z]/.test(t)});function rt(t,e,r){if(!K.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const i=(r=K.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!K.isUndefined(e[t])})).metaTokens,o=r.visitor||h,s=r.dots,a=r.indexes,u=(r.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(e);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(K.isDate(t))return t.toISOString();if(K.isBoolean(t))return t.toString();if(!u&&K.isBlob(t))throw new q("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(t)||K.isTypedArray(t)?u&&"function"==typeof Blob?new Blob([t]):n.from(t):t}function h(t,r,n){let o=t;if(t&&!n&&"object"==typeof t)if(K.endsWith(r,"{}"))r=i?r:r.slice(0,-2),t=JSON.stringify(t);else if(K.isArray(t)&&function(t){return K.isArray(t)&&!t.some(Q)}(t)||(K.isFileList(t)||K.endsWith(r,"[]"))&&(o=K.toArray(t)))return r=Z(r),o.forEach(function(t,n){!K.isUndefined(t)&&null!==t&&e.append(!0===a?tt([r],n,s):null===a?r:r+"[]",l(t))}),!1;return!!Q(t)||(e.append(tt(n,r,s),l(t)),!1)}const c=[],p=Object.assign(et,{defaultVisitor:h,convertValue:l,isVisitable:Q});if(!K.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!K.isUndefined(r)){if(-1!==c.indexOf(r))throw Error("Circular reference detected in "+n.join("."));c.push(r),K.forEach(r,function(r,i){!0===(!(K.isUndefined(r)||null===r)&&o.call(e,r,K.isString(i)?i.trim():i,n,p))&&t(r,n?n.concat(i):[i])}),c.pop()}}(t),e}function nt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function it(t,e){this._pairs=[],t&&rt(t,this,e)}const ot=it.prototype;function st(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function at(t,e,r){if(!e)return t;const n=r&&r.encode||st;K.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(o=i?i(e,r):K.isURLSearchParams(e)?e.toString():new it(e,r).toString(n),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}ot.append=function(t,e){this._pairs.push([t,e])},ot.toString=function(t){const e=t?function(e){return t.call(this,e,nt)}:nt;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};var ut=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){K.forEach(this.handlers,function(e){null!==e&&t(e)})}},lt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ht={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:it,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ct="undefined"!=typeof window&&"undefined"!=typeof document,pt="object"==typeof navigator&&navigator||void 0,ft=ct&&(!pt||["ReactNative","NativeScript","NS"].indexOf(pt.product)<0),dt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,mt=ct&&window.location.href||"http://localhost";var yt={...Object.freeze({__proto__:null,hasBrowserEnv:ct,hasStandardBrowserWebWorkerEnv:dt,hasStandardBrowserEnv:ft,navigator:pt,origin:mt}),...ht};function gt(t){function e(t,r,n,i){let o=t[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=t.length;return o=!o&&K.isArray(n)?n.length:o,a?(K.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s):(n[o]&&K.isObject(n[o])||(n[o]=[]),e(t,r,n[o],i)&&K.isArray(n[o])&&(n[o]=function(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}(n[o])),!s)}if(K.isFormData(t)&&K.isFunction(t.entries)){const r={};return K.forEachEntry(t,(t,n)=>{e(function(t){return K.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0])}(t),n,r,0)}),r}return null}const vt={transitional:lt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,i=K.isObject(t);if(i&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return n?JSON.stringify(gt(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t)||K.isReadableStream(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return rt(t,new yt.classes.URLSearchParams,{visitor:function(t,e,r,n){return yt.isNode&&K.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...e})}(t,this.formSerializer).toString();if((o=K.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return rt(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),function(t){if(K.isString(t))try{return(0,JSON.parse)(t),K.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||vt.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(K.isResponse(t)||K.isReadableStream(t))return t;if(t&&K.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(t){if(r){if("SyntaxError"===t.name)throw q.from(t,q.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],t=>{vt.headers[t]={}});var xt=vt;const bt=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Et=Symbol("internals");function Ct(t){return t&&String(t).trim().toLowerCase()}function St(t){return!1===t||null==t?t:K.isArray(t)?t.map(St):String(t)}function wt(t,e,r,n,i){return K.isFunction(n)?n.call(this,e,r):(i&&(e=r),K.isString(e)?K.isString(n)?-1!==e.indexOf(n):K.isRegExp(n)?n.test(e):void 0:void 0)}class At{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function i(t,e,r){const i=Ct(e);if(!i)throw new Error("header name must be a non-empty string");const o=K.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||e]=St(t))}const o=(t,e)=>K.forEach(t,(t,r)=>i(t,r,e));if(K.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(K.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))o((t=>{const e={};let r,n,i;return t&&t.split("\n").forEach(function(t){i=t.indexOf(":"),r=t.substring(0,i).trim().toLowerCase(),n=t.substring(i+1).trim(),!r||e[r]&&bt[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e})(t),e);else if(K.isObject(t)&&K.isIterable(t)){let r,n,i={};for(const e of t){if(!K.isArray(e))throw TypeError("Object iterator must return a key-value pair");i[n=e[0]]=(r=i[n])?K.isArray(r)?[...r,e[1]]:[r,e[1]]:e[1]}o(i,e)}else null!=t&&i(e,t,r);return this}get(t,e){if(t=Ct(t)){const r=K.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(K.isFunction(e))return e.call(this,t,r);if(K.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ct(t)){const r=K.findKey(this,t);return!(!r||void 0===this[r]||e&&!wt(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function i(t){if(t=Ct(t)){const i=K.findKey(r,t);!i||e&&!wt(0,r[i],i,e)||(delete r[i],n=!0)}}return K.isArray(t)?t.forEach(i):i(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const i=e[r];t&&!wt(0,this[i],i,t,!0)||(delete this[i],n=!0)}return n}normalize(t){const e=this,r={};return K.forEach(this,(n,i)=>{const o=K.findKey(r,i);if(o)return e[o]=St(n),void delete e[i];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}(i):String(i).trim();s!==i&&delete e[i],e[s]=St(n),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return K.forEach(this,(r,n)=>{null!=r&&!1!==r&&(e[n]=t&&K.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(t=>r.set(t)),r}static accessor(t){const e=(this[Et]=this[Et]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=Ct(t);e[n]||(function(t,e){const r=K.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(t,r,i){return this[n].call(this,e,t,r,i)},configurable:!0})})}(r,t),e[n]=!0)}return K.isArray(t)?t.forEach(n):n(t),this}}At.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(At.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}}),K.freezeMethods(At);var Dt=At;function kt(t,e){const r=this||xt,n=e||r,i=Dt.from(n.headers);let o=n.data;return K.forEach(t,function(t){o=t.call(r,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function _t(t){return!(!t||!t.__CANCEL__)}function Tt(t,e,r){q.call(this,null==t?"canceled":t,q.ERR_CANCELED,e,r),this.name="CanceledError"}function Ft(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new q("Request failed with status code "+r.status,[q.ERR_BAD_REQUEST,q.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}K.inherits(Tt,q,{__CANCEL__:!0});const It=(t,e,r=3)=>{let n=0;const i=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const u=Date.now(),l=n[s];i||(i=u),r[o]=a,n[o]=u;let h=s,c=0;for(;h!==o;)c+=r[h++],h%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),u-i<e)return;const p=l&&u-l;return p?Math.round(1e3*c/p):void 0}}(50,250);return function(r,o){let s,a,u=0,l=1e3/o;const h=(r,o=Date.now())=>{u=o,s=null,a&&(clearTimeout(a),a=null),(r=>{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,u=i(a);n=o,t({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&o<=s?(s-o)/u:void 0,event:r,lengthComputable:null!=s,[e?"download":"upload"]:!0})})(...r)};return[(...t)=>{const e=Date.now(),r=e-u;r>=l?h(t,e):(s=t,a||(a=setTimeout(()=>{a=null,h(s)},l-r)))},()=>s&&h(s)]}(0,r)},Ot=(t,e)=>{const r=null!=t;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Nt=t=>(...e)=>K.asap(()=>t(...e));var Bt=yt.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,yt.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0,Rt=yt.hasStandardBrowserEnv?{write(t,e,r,n,i,o,s){if("undefined"==typeof document)return;const a=[`${t}=${encodeURIComponent(e)}`];K.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),K.isString(n)&&a.push(`path=${n}`),K.isString(i)&&a.push(`domain=${i}`),!0===o&&a.push("secure"),K.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if("undefined"==typeof document)return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Pt(t,e,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);return t&&(n||0==r)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Lt=t=>t instanceof Dt?{...t}:t;function Mt(t,e){e=e||{};const r={};function n(t,e,r,n){return K.isPlainObject(t)&&K.isPlainObject(e)?K.merge.call({caseless:n},t,e):K.isPlainObject(e)?K.merge({},e):K.isArray(e)?e.slice():e}function i(t,e,r,i){return K.isUndefined(e)?K.isUndefined(t)?void 0:n(void 0,t,0,i):n(t,e,0,i)}function o(t,e){if(!K.isUndefined(e))return n(void 0,e)}function s(t,e){return K.isUndefined(e)?K.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function a(r,i,o){return o in e?n(r,i):o in t?n(void 0,r):void 0}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e,r)=>i(Lt(t),Lt(e),0,!0)};return K.forEach(Object.keys({...t,...e}),function(n){const o=u[n]||i,s=o(t[n],e[n],n);K.isUndefined(s)&&o!==a||(r[n]=s)}),r}var Ut=t=>{const e=Mt({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=e;if(e.headers=s=Dt.from(s),e.url=at(Pt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),K.isFormData(r))if(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(K.isFunction(r.getHeaders)){const t=r.getHeaders(),e=["content-type","content-length"];Object.entries(t).forEach(([t,r])=>{e.includes(t.toLowerCase())&&s.set(t,r)})}if(yt.hasStandardBrowserEnv&&(n&&K.isFunction(n)&&(n=n(e)),n||!1!==n&&Bt(e.url))){const t=i&&o&&Rt.read(o);t&&s.set(i,t)}return e},jt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise(function(e,r){const n=Ut(t);let i=n.data;const o=Dt.from(n.headers).normalize();let s,a,u,l,h,{responseType:c,onUploadProgress:p,onDownloadProgress:f}=n;function d(){l&&l(),h&&h(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function y(){if(!m)return;const n=Dt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Ft(function(t){e(t),d()},function(t){r(t),d()},{data:c&&"text"!==c&&"json"!==c?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:n,config:t,request:m}),m=null}m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(r(new q("Request aborted",q.ECONNABORTED,t,m)),m=null)},m.onerror=function(e){const n=new q(e&&e.message?e.message:"Network Error",q.ERR_NETWORK,t,m);n.event=e||null,r(n),m=null},m.ontimeout=function(){let e=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||lt;n.timeoutErrorMessage&&(e=n.timeoutErrorMessage),r(new q(e,i.clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,t,m)),m=null},void 0===i&&o.setContentType(null),"setRequestHeader"in m&&K.forEach(o.toJSON(),function(t,e){m.setRequestHeader(e,t)}),K.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),c&&"json"!==c&&(m.responseType=n.responseType),f&&([u,h]=It(f,!0),m.addEventListener("progress",u)),p&&m.upload&&([a,l]=It(p),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=e=>{m&&(r(!e||e.type?new Tt(null,t,m):e),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(n.url);g&&-1===yt.protocols.indexOf(g)?r(new q("Unsupported protocol "+g+":",q.ERR_BAD_REQUEST,t)):m.send(i||null)})},zt=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let r,n=new AbortController;const i=function(t){if(!r){r=!0,s();const e=t instanceof Error?t:this.reason;n.abort(e instanceof q?e:new Tt(e instanceof Error?e.message:e))}};let o=e&&setTimeout(()=>{o=null,i(new q(`timeout ${e} of ms exceeded`,q.ETIMEDOUT))},e);const s=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(t=>{t.unsubscribe?t.unsubscribe(i):t.removeEventListener("abort",i)}),t=null)};t.forEach(t=>t.addEventListener("abort",i));const{signal:a}=n;return a.unsubscribe=()=>K.asap(s),a}};const Jt=function*(t,e){let r=t.byteLength;if(!e||r<e)return void(yield t);let n,i=0;for(;i<r;)n=i+e,yield t.slice(i,n),i=n},Vt=(t,e,r,n)=>{const i=async function*(t,e){for await(const r of async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}}(t))yield*Jt(r,e)}(t,e);let o,s=0,a=t=>{o||(o=!0,n&&n(t))};return new ReadableStream({async pull(t){try{const{done:e,value:n}=await i.next();if(e)return a(),void t.close();let o=n.byteLength;if(r){let t=s+=o;r(t)}t.enqueue(new Uint8Array(n))}catch(t){throw a(t),t}},cancel:t=>(a(t),i.return())},{highWaterMark:2})},{isFunction:Xt}=K,Gt=(({Request:t,Response:e})=>({Request:t,Response:e}))(K.global),{ReadableStream:Wt,TextEncoder:Ht}=K.global,Kt=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},qt=t=>{t=K.merge.call({skipUndefined:!0},Gt,t);const{fetch:e,Request:r,Response:n}=t,i=e?Xt(e):"function"==typeof fetch,o=Xt(r),s=Xt(n);if(!i)return!1;const a=i&&Xt(Wt),u=i&&("function"==typeof Ht?(l=new Ht,t=>l.encode(t)):async t=>new Uint8Array(await new r(t).arrayBuffer()));var l;const h=o&&a&&Kt(()=>{let t=!1;const e=new r(yt.origin,{body:new Wt,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),c=s&&a&&Kt(()=>K.isReadableStream(new n("").body)),p={stream:c&&(t=>t.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!p[t]&&(p[t]=(e,r)=>{let n=e&&e[t];if(n)return n.call(e);throw new q(`Response type '${t}' is not supported`,q.ERR_NOT_SUPPORT,r)})});return async t=>{let{url:i,method:s,data:a,signal:l,cancelToken:f,timeout:d,onDownloadProgress:m,onUploadProgress:y,responseType:g,headers:v,withCredentials:x="same-origin",fetchOptions:b}=Ut(t),E=e||fetch;g=g?(g+"").toLowerCase():"text";let C=zt([l,f&&f.toAbortSignal()],d),S=null;const w=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let A;try{if(y&&h&&"get"!==s&&"head"!==s&&0!==(A=await(async(t,e)=>{const n=K.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(K.isBlob(t))return t.size;if(K.isSpecCompliantForm(t)){const e=new r(yt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return K.isArrayBufferView(t)||K.isArrayBuffer(t)?t.byteLength:(K.isURLSearchParams(t)&&(t+=""),K.isString(t)?(await u(t)).byteLength:void 0)})(e):n})(v,a))){let t,e=new r(i,{method:"POST",body:a,duplex:"half"});if(K.isFormData(a)&&(t=e.headers.get("content-type"))&&v.setContentType(t),e.body){const[t,r]=Ot(A,It(Nt(y)));a=Vt(e.body,65536,t,r)}}K.isString(x)||(x=x?"include":"omit");const e=o&&"credentials"in r.prototype,l={...b,signal:C,method:s.toUpperCase(),headers:v.normalize().toJSON(),body:a,duplex:"half",credentials:e?x:void 0};S=o&&new r(i,l);let f=await(o?E(S,b):E(i,l));const d=c&&("stream"===g||"response"===g);if(c&&(m||d&&w)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=f[e]});const e=K.toFiniteNumber(f.headers.get("content-length")),[r,i]=m&&Ot(e,It(Nt(m),!0))||[];f=new n(Vt(f.body,65536,r,()=>{i&&i(),w&&w()}),t)}g=g||"text";let D=await p[K.findKey(p,g)||"text"](f,t);return!d&&w&&w(),await new Promise((e,r)=>{Ft(e,r,{data:D,headers:Dt.from(f.headers),status:f.status,statusText:f.statusText,config:t,request:S})})}catch(e){if(w&&w(),e&&"TypeError"===e.name&&/Load failed|fetch/i.test(e.message))throw Object.assign(new q("Network Error",q.ERR_NETWORK,t,S),{cause:e.cause||e});throw q.from(e,e&&e.code,t,S)}}},Yt=new Map,$t=t=>{let e=t&&t.env||{};const{fetch:r,Request:n,Response:i}=e,o=[n,i,r];let s,a,u=o.length,l=Yt;for(;u--;)s=o[u],a=l.get(s),void 0===a&&l.set(s,a=u?new Map:qt(e)),l=a;return a};$t();const Qt={http:null,xhr:jt,fetch:{get:$t}};K.forEach(Qt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}});const Zt=t=>`- ${t}`,te=t=>K.isFunction(t)||null===t||!1===t;var ee=function(t,e){t=K.isArray(t)?t:[t];const{length:r}=t;let n,i;const o={};for(let s=0;s<r;s++){let r;if(n=t[s],i=n,!te(n)&&(i=Qt[(r=String(n)).toLowerCase()],void 0===i))throw new q(`Unknown adapter '${r}'`);if(i&&(K.isFunction(i)||(i=i.get(e))))break;o[r||"#"+s]=i}if(!i){const t=Object.entries(o).map(([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build"));throw new q("There is no suitable adapter to dispatch the request "+(r?t.length>1?"since :\n"+t.map(Zt).join("\n"):" "+Zt(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i};function re(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Tt(null,t)}function ne(t){return re(t),t.headers=Dt.from(t.headers),t.data=kt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ee(t.adapter||xt.adapter,t)(t).then(function(e){return re(t),e.data=kt.call(t,t.transformResponse,e),e.headers=Dt.from(e.headers),e},function(e){return _t(e)||(re(t),e&&e.response&&(e.response.data=kt.call(t,t.transformResponse,e.response),e.response.headers=Dt.from(e.response.headers))),Promise.reject(e)})}const ie="1.13.2",oe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{oe[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const se={};oe.transitional=function(t,e,r){function n(t,e){return"[Axios v"+ie+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,i,o)=>{if(!1===t)throw new q(n(i," has been removed"+(e?" in "+e:"")),q.ERR_DEPRECATED);return e&&!se[i]&&(se[i]=!0,console.warn(n(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,i,o)}},oe.spelling=function(t){return(e,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};var ae={assertOptions:function(t,e,r){if("object"!=typeof t)throw new q("options must be an object",q.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],s=e[o];if(s){const e=t[o],r=void 0===e||s(e,o,t);if(!0!==r)throw new q("option "+o+" must be "+r,q.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new q("Unknown option "+o,q.ERR_BAD_OPTION)}},validators:oe};const ue=ae.validators;class le{constructor(t){this.defaults=t||{},this.interceptors={request:new ut,response:new ut}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const r=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?r&&!String(t.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+r):t.stack=r}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Mt(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:i}=e;void 0!==r&&ae.assertOptions(r,{silentJSONParsing:ue.transitional(ue.boolean),forcedJSONParsing:ue.transitional(ue.boolean),clarifyTimeoutError:ue.transitional(ue.boolean)},!1),null!=n&&(K.isFunction(n)?e.paramsSerializer={serialize:n}:ae.assertOptions(n,{encode:ue.function,serialize:ue.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),ae.assertOptions(e,{baseUrl:ue.spelling("baseURL"),withXsrfToken:ue.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&K.merge(i.common,i[e.method]);i&&K.forEach(["delete","get","head","post","put","patch","common"],t=>{delete i[t]}),e.headers=Dt.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach(function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))});const u=[];let l;this.interceptors.response.forEach(function(t){u.push(t.fulfilled,t.rejected)});let h,c=0;if(!a){const t=[ne.bind(this),void 0];for(t.unshift(...s),t.push(...u),h=t.length,l=Promise.resolve(e);c<h;)l=l.then(t[c++],t[c++]);return l}h=s.length;let p=e;for(;c<h;){const t=s[c++],e=s[c++];try{p=t(p)}catch(t){e.call(this,t);break}}try{l=ne.call(this,p)}catch(t){return Promise.reject(t)}for(c=0,h=u.length;c<h;)l=l.then(u[c++],u[c++]);return l}getUri(t){return at(Pt((t=Mt(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}}K.forEach(["delete","get","head","options"],function(t){le.prototype[t]=function(e,r){return this.request(Mt(r||{},{method:t,url:e,data:(r||{}).data}))}}),K.forEach(["post","put","patch"],function(t){function e(e){return function(r,n,i){return this.request(Mt(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}le.prototype[t]=e(),le.prototype[t+"Form"]=e(!0)});var he=le;class ce{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(t){e=t});const r=this;this.promise.then(t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null}),this.promise.then=t=>{let e;const n=new Promise(t=>{r.subscribe(t),e=t}).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t(function(t,n,i){r.reason||(r.reason=new Tt(t,n,i),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new ce(function(e){t=e}),cancel:t}}}var pe=ce;const fe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(fe).forEach(([t,e])=>{fe[e]=t});var de=fe;const me=function t(e){const r=new he(e),n=i(he.prototype.request,r);return K.extend(n,he.prototype,r,{allOwnKeys:!0}),K.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Mt(e,r))},n}(xt);me.Axios=he,me.CanceledError=Tt,me.CancelToken=pe,me.isCancel=_t,me.VERSION=ie,me.toFormData=rt,me.AxiosError=q,me.Cancel=me.CanceledError,me.all=function(t){return Promise.all(t)},me.spread=function(t){return function(e){return t.apply(null,e)}},me.isAxiosError=function(t){return K.isObject(t)&&!0===t.isAxiosError},me.mergeConfig=Mt,me.AxiosHeaders=Dt,me.formToJSON=t=>gt(K.isHTMLForm(t)?new FormData(t):t),me.getAdapter=ee,me.HttpStatusCode=de,me.default=me,t.exports=me},5810(t){"use strict";t.exports=function(t,e){let r=e.engines[t]||e.engines[function(t){switch(t.toLowerCase()){case"js":case"javascript":return"javascript";case"coffee":case"coffeescript":case"cson":return"coffee";case"yaml":case"yml":return"yaml";default:return t}}(t)];if(void 0===r)throw new Error('gray-matter engine "'+t+'" is not registered');return"function"==typeof r&&(r={parse:r}),r}},6053(t,e,r){"use strict";const n=r(5810),i=r(1578);t.exports=function(t,e,r){const o=i(r),s=n(t,o);if("function"!=typeof s.parse)throw new TypeError('expected "'+t+'.parse" to be a function');return s.parse(e,o)}},6065(t,e,r){"use strict";var n=r(3252),i=r(4253);e.hp=a,e.IS=50;var o=2147483647;function s(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|f(t,e),n=s(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(z(t,ArrayBuffer)||t&&z(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r)).__proto__=a.prototype,n}(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return a.from(n,e,r);var i=function(t){if(a.isBuffer(t)){var e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||J(t.length)?s(0):c(t):"Buffer"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return l(t),s(t<0?0:0|p(t))}function c(t){for(var e=t.length<0?0:0|p(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function f(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||z(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return M(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(t).length;default:if(i)return n?-1:M(t).length;e=(""+e).toLowerCase(),i=!0}}function d(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return _(this,e,r);case"base64":return w(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var h=-1;for(o=r;o<a;o++)if(l(t,o)===l(e,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var c=!0,p=0;p<u;p++)if(l(t,o+p)!==l(e,p)){c=!1;break}if(c)return o}return-1}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(J(a))return s;t[r+s]=a}return s}function x(t,e,r,n){return j(M(e,t.length-r),t,r,n)}function b(t,e,r,n){return j(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return b(t,e,r,n)}function C(t,e,r,n){return j(U(e),t,r,n)}function S(t,e,r,n){return j(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function w(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,l=t[i],h=null,c=l>239?4:l>223?3:l>191?2:1;if(i+c<=r)switch(c){case 1:l<128&&(h=l);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(h=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return function(t){var e=t.length;if(e<=D)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=D));return r}(n)}a.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(t,e,r){return u(t,e,r)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},a.allocUnsafe=function(t){return h(t)},a.allocUnsafeSlow=function(t){return h(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if(z(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),z(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=a.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(z(o,Uint8Array)&&(o=a.from(o)),!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},a.byteLength=f,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},a.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):d.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},a.prototype.compare=function(t,e,r,n,i){if(z(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),u=Math.min(o,s),l=this.slice(n,i),h=t.slice(e,r),c=0;c<u;++c)if(l[c]!==h[c]){o=l[c],s=h[c];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},a.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return x(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return C(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function k(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function _(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function T(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=L(t[o]);return i}function F(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function I(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function N(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,o){return e=+e,r>>>=0,o||N(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function R(t,e,r,n,o){return e=+e,r>>>=0,o||N(t,0,r,8),i.write(t,e,r,n,52,8),r+8}a.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=a.prototype,n},a.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},a.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||I(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||I(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||I(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||I(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||O(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},a.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||O(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s|0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s|0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return R(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return R(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var o=i-1;o>=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=a.isBuffer(t)?t:a.from(t,n),u=s.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=s[o%u]}return this};var P=/[^+/0-9A-Za-z-_]/g;function L(t){return t<16?"0"+t.toString(16):t.toString(16)}function M(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function z(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}},6278(t){"use strict";function e(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},t.exports=e},6331(t,e,r){"use strict";const n=r(7926),i=r(5810),o=r(1578);function s(t){return"\n"!==t.slice(-1)?t+"\n":t}t.exports=function(t,e,r){if(null==e&&null==r)switch(n(t)){case"object":e=t.data,r={};break;case"string":return t;default:throw new TypeError("expected file to be a string or object")}const a=t.content,u=o(r);if(null==e){if(!u.data)return t;e=u.data}const l=t.language||u.language,h=i(l,u);if("function"!=typeof h.stringify)throw new TypeError('expected "'+l+'.stringify" to be a function');e=Object.assign({},t.data,e);const c=u.delimiters[0],p=u.delimiters[1],f=h.stringify(e,r).trim();let d="";return"{}"!==f&&(d=s(c)+s(f)+s(p)),"string"==typeof t.excerpt&&""!==t.excerpt&&-1===a.indexOf(t.excerpt.trim())&&(d+=s(t.excerpt)+s(p)),d+s(a)}},6340(t,e,r){"use strict";var n=r(8467),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");t.exports=new n("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==i.exec(t)||null!==o.exec(t))},construct:function(t){var e,r,n,s,a,u,l,h,c=0,p=null;if(null===(e=i.exec(t))&&(e=o.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,s=+e[3],!e[4])return new Date(Date.UTC(r,n,s));if(a=+e[4],u=+e[5],l=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(p=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(p=-p)),h=new Date(Date.UTC(r,n,s,a,u,l,c)),p&&h.setTime(h.getTime()-p),h},instanceOf:Date,represent:function(t){return t.toISOString()}})},6668(t,e,r){"use strict";var n=r(7926),i=r(2046);function o(t,e){return t.slice(0,e.length)===e&&t.charAt(e.length+1)!==e.slice(-1)}function s(t){return t}t.exports=function(t,e){"function"==typeof e&&(e={parse:e});var r=function(t){if("object"!==n(t)&&(t={content:t}),"string"!=typeof t.content&&!((e=t.content)&&e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)))throw new TypeError("expected a buffer or string");var e;return t.content=t.content.toString(),t.sections=[],t}(t),a=i({},{section_delimiter:"---",parse:s},e),u=a.section_delimiter,l=r.content.split(/\r?\n/),h=null,c={key:"",data:"",content:""},p=[],f=[];function d(t){r.content=t,h=[],p=[]}function m(t){f.length&&(c.key=function(t,e){return t?t.slice(e.length).trim():""}(f[0],u),c.content=t,a.parse(c,h),h.push(c),c={key:"",data:"",content:""},p=[],f=[])}for(var y=0;y<l.length;y++){var g=l[y],v=f.length,x=g.trim();if(o(x,u)){if(3===x.length&&0!==y){if(0===v||2===v){p.push(g);continue}f.push(x),c.data=p.join("\n"),p=[];continue}null===h&&d(p.join("\n")),2===v&&m(p.join("\n")),f.push(x)}else p.push(g)}return null===h?d(p.join("\n")):m(p.join("\n")),r.sections=h,r}},6902(t,e,r){"use strict";var n=r(4366);function i(t,e,r,n,i){this.name=t,this.buffer=e,this.position=r,this.line=n,this.column=i}i.prototype.getSnippet=function(t,e){var r,i,o,s,a;if(!this.buffer)return null;for(t=t||4,e=e||75,r="",i=this.position;i>0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>e/2-1){r=" ... ",i+=5;break}for(o="",s=this.position;s<this.buffer.length&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(s));)if((s+=1)-this.position>e/2-1){o=" ... ",s-=5;break}return a=this.buffer.slice(i,s),n.repeat(" ",t)+r+a+o+"\n"+n.repeat(" ",t+this.position-i+r.length)+"^"},i.prototype.toString=function(t){var e,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),t||(e=this.getSnippet())&&(r+=":\n"+e),r},t.exports=i},7007(t,e,r){"use strict";var n=r(8467);t.exports=new n("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}})},7042(t,e,r){"use strict";const n=r(8591),i=r(6668),o=r(1578),s=r(6331),a=r(4675),u=r(3905),l=r(3344),h=r(6053),c=r(4391);function p(t,e){if(""===t)return{data:{},content:t,excerpt:"",orig:t};let r=l(t);const n=p.cache[r.content];if(!e){if(n)return r=Object.assign({},n),r.orig=n.orig,r;p.cache[r.content]=r}return function(t,e){const r=o(e),n=r.delimiters[0],s="\n"+r.delimiters[1];let u=t.content;r.language&&(t.language=r.language);const l=n.length;if(!c.startsWith(u,n,l))return a(t,r),t;if(u.charAt(l)===n.slice(-1))return t;u=u.slice(l);const f=u.length,d=p.language(u,r);d.name&&(t.language=d.name,u=u.slice(d.raw.length));let m=u.indexOf(s);-1===m&&(m=f),t.matter=u.slice(0,m);return""===t.matter.replace(/^\s*#[^\n]+/gm,"").trim()?(t.isEmpty=!0,t.empty=t.content,t.data={}):t.data=h(t.language,t.matter,r),m===f?t.content="":(t.content=u.slice(m+s.length),"\r"===t.content[0]&&(t.content=t.content.slice(1)),"\n"===t.content[0]&&(t.content=t.content.slice(1))),a(t,r),(!0===r.sections||"function"==typeof r.section)&&i(t,r.section),t}(r,e)}p.engines=u,p.stringify=function(t,e,r){return"string"==typeof t&&(t=p(t,r)),s(t,e,r)},p.read=function(t,e){const r=p(n.readFileSync(t,"utf8"),e);return r.path=t,r},p.test=function(t,e){return c.startsWith(t,o(e).delimiters[0])},p.language=function(t,e){const r=o(e).delimiters[0];p.test(t)&&(t=t.slice(r.length));const n=t.slice(0,t.search(/\r?\n/));return{raw:n,name:n?n.trim():""}},p.cache={},p.clearCache=function(){p.cache={}},t.exports=p},7388(t,e,r){"use strict";var n=r(4366),i=r(6278),o=r(8467);function s(t,e,r){var n=[];return t.include.forEach(function(t){r=s(t,e,r)}),t[e].forEach(function(t){r.forEach(function(e,r){e.tag===t.tag&&e.kind===t.kind&&n.push(r)}),r.push(t)}),r.filter(function(t,e){return-1===n.indexOf(e)})}function a(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&"scalar"!==t.loadKind)throw new i("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=s(this,"implicit",[]),this.compiledExplicit=s(this,"explicit",[]),this.compiledTypeMap=function(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{}};function n(t){r[t.kind][t.tag]=r.fallback[t.tag]=t}for(t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(n);return r}(this.compiledImplicit,this.compiledExplicit)}a.DEFAULT=null,a.create=function(){var t,e;switch(arguments.length){case 1:t=a.DEFAULT,e=arguments[0];break;case 2:t=arguments[0],e=arguments[1];break;default:throw new i("Wrong number of arguments for Schema.create function")}if(t=n.toArray(t),e=n.toArray(e),!t.every(function(t){return t instanceof a}))throw new i("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!e.every(function(t){return t instanceof o}))throw new i("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new a({include:t,explicit:e})},t.exports=a},7786(t,e,r){"use strict";var n=r(7388);t.exports=new n({explicit:[r(9499),r(7007),r(886)]})},7926(t){var e=Object.prototype.toString;function r(t){return"function"==typeof t.constructor?t.constructor.name:null}t.exports=function(t){if(void 0===t)return"undefined";if(null===t)return"null";var n=typeof t;if("boolean"===n)return"boolean";if("string"===n)return"string";if("number"===n)return"number";if("symbol"===n)return"symbol";if("function"===n)return function(t){return"GeneratorFunction"===r(t)}(t)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(t))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(t))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(t))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(t))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(t))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(t))return"regexp";switch(r(t)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(t))return"generator";switch(n=e.call(t)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return n.slice(8,-1).toLowerCase().replace(/\s/g,"")}},8092(t,e,r){"use strict";var n=r(4366),i=r(6278),o=r(6902),s=r(4496),a=r(9140),u=Object.prototype.hasOwnProperty,l=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h=/[\x85\u2028\u2029]/,c=/[,\[\]\{\}]/,p=/^(?:!|!!|![a-z\-]+!)$/i,f=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function d(t){return Object.prototype.toString.call(t)}function m(t){return 10===t||13===t}function y(t){return 9===t||32===t}function g(t){return 9===t||32===t||10===t||13===t}function v(t){return 44===t||91===t||93===t||123===t||125===t}function x(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function b(t){return 120===t?2:117===t?4:85===t?8:0}function E(t){return 48<=t&&t<=57?t-48:-1}function C(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function S(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function w(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}for(var A=new Array(256),D=new Array(256),k=0;k<256;k++)A[k]=C(k)?1:0,D[k]=C(k);function _(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||a,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function T(t,e){return new i(e,new o(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function F(t,e){throw T(t,e)}function I(t,e){t.onWarning&&t.onWarning.call(null,T(t,e))}var O={YAML:function(t,e,r){var n,i,o;null!==t.version&&F(t,"duplication of %YAML directive"),1!==r.length&&F(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&F(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),o=parseInt(n[2],10),1!==i&&F(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&I(t,"unsupported YAML version of the document")},TAG:function(t,e,r){var n,i;2!==r.length&&F(t,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],p.test(n)||F(t,"ill-formed tag handle (first argument) of the TAG directive"),u.call(t.tagMap,n)&&F(t,'there is a previously declared suffix for "'+n+'" tag handle'),f.test(i)||F(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[n]=i}};function N(t,e,r,n){var i,o,s,a;if(e<r){if(a=t.input.slice(e,r),n)for(i=0,o=a.length;i<o;i+=1)9===(s=a.charCodeAt(i))||32<=s&&s<=1114111||F(t,"expected valid JSON character");else l.test(a)&&F(t,"the stream contains non-printable characters");t.result+=a}}function B(t,e,r,i){var o,s,a,l;for(n.isObject(r)||F(t,"cannot merge mappings; the provided source object is unacceptable"),a=0,l=(o=Object.keys(r)).length;a<l;a+=1)s=o[a],u.call(e,s)||(w(e,s,r[s]),i[s]=!0)}function R(t,e,r,n,i,o,s,a){var l,h;if(Array.isArray(i))for(l=0,h=(i=Array.prototype.slice.call(i)).length;l<h;l+=1)Array.isArray(i[l])&&F(t,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===d(i[l])&&(i[l]="[object Object]");if("object"==typeof i&&"[object Object]"===d(i)&&(i="[object Object]"),i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(o))for(l=0,h=o.length;l<h;l+=1)B(t,e,o[l],r);else B(t,e,o,r);else t.json||u.call(r,i)||!u.call(e,i)||(t.line=s||t.line,t.position=a||t.position,F(t,"duplicated mapping key")),w(e,i,o),delete r[i];return e}function P(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):F(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function L(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);0!==i;){for(;y(i);)i=t.input.charCodeAt(++t.position);if(e&&35===i)do{i=t.input.charCodeAt(++t.position)}while(10!==i&&13!==i&&0!==i);if(!m(i))break;for(P(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;32===i;)t.lineIndent++,i=t.input.charCodeAt(++t.position)}return-1!==r&&0!==n&&t.lineIndent<r&&I(t,"deficient indentation"),n}function M(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!g(e)))}function U(t,e){1===e?t.result+=" ":e>1&&(t.result+=n.repeat("\n",e-1))}function j(t,e){var r,n,i=t.tag,o=t.anchor,s=[],a=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),n=t.input.charCodeAt(t.position);0!==n&&45===n&&g(t.input.charCodeAt(t.position+1));)if(a=!0,t.position++,L(t,!0,-1)&&t.lineIndent<=e)s.push(null),n=t.input.charCodeAt(t.position);else if(r=t.line,V(t,e,3,!1,!0),s.push(t.result),L(t,!0,-1),n=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==n)F(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!a&&(t.tag=i,t.anchor=o,t.kind="sequence",t.result=s,!0)}function z(t){var e,r,n,i,o=!1,s=!1;if(33!==(i=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&F(t,"duplication of a tag property"),60===(i=t.input.charCodeAt(++t.position))?(o=!0,i=t.input.charCodeAt(++t.position)):33===i?(s=!0,r="!!",i=t.input.charCodeAt(++t.position)):r="!",e=t.position,o){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&62!==i);t.position<t.length?(n=t.input.slice(e,t.position),i=t.input.charCodeAt(++t.position)):F(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!g(i);)33===i&&(s?F(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),p.test(r)||F(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),i=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),c.test(n)&&F(t,"tag suffix cannot contain flow indicator characters")}return n&&!f.test(n)&&F(t,"tag name cannot contain such characters: "+n),o?t.tag=n:u.call(t.tagMap,r)?t.tag=t.tagMap[r]+n:"!"===r?t.tag="!"+n:"!!"===r?t.tag="tag:yaml.org,2002:"+n:F(t,'undeclared tag handle "'+r+'"'),!0}function J(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&F(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!g(r)&&!v(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&F(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function V(t,e,r,i,o){var s,a,l,h,c,p,f,d,C=1,w=!1,k=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=a=l=4===r||3===r,i&&L(t,!0,-1)&&(w=!0,t.lineIndent>e?C=1:t.lineIndent===e?C=0:t.lineIndent<e&&(C=-1)),1===C)for(;z(t)||J(t);)L(t,!0,-1)?(w=!0,l=s,t.lineIndent>e?C=1:t.lineIndent===e?C=0:t.lineIndent<e&&(C=-1)):l=!1;if(l&&(l=w||o),1!==C&&4!==r||(f=1===r||2===r?e:e+1,d=t.position-t.lineStart,1===C?l&&(j(t,d)||function(t,e,r){var n,i,o,s,a,u=t.tag,l=t.anchor,h={},c={},p=null,f=null,d=null,m=!1,v=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=h),a=t.input.charCodeAt(t.position);0!==a;){if(n=t.input.charCodeAt(t.position+1),o=t.line,s=t.position,63!==a&&58!==a||!g(n)){if(!V(t,r,2,!1,!0))break;if(t.line===o){for(a=t.input.charCodeAt(t.position);y(a);)a=t.input.charCodeAt(++t.position);if(58===a)g(a=t.input.charCodeAt(++t.position))||F(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(R(t,h,c,p,f,null),p=f=d=null),v=!0,m=!1,i=!1,p=t.tag,f=t.result;else{if(!v)return t.tag=u,t.anchor=l,!0;F(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return t.tag=u,t.anchor=l,!0;F(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===a?(m&&(R(t,h,c,p,f,null),p=f=d=null),v=!0,m=!0,i=!0):m?(m=!1,i=!0):F(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,a=n;if((t.line===o||t.lineIndent>e)&&(V(t,e,4,!0,i)&&(m?f=t.result:d=t.result),m||(R(t,h,c,p,f,d,o,s),p=f=d=null),L(t,!0,-1),a=t.input.charCodeAt(t.position)),t.lineIndent>e&&0!==a)F(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&R(t,h,c,p,f,null),v&&(t.tag=u,t.anchor=l,t.kind="mapping",t.result=h),v}(t,d,f))||function(t,e){var r,n,i,o,s,a,u,l,h,c,p=!0,f=t.tag,d=t.anchor,m={};if(91===(c=t.input.charCodeAt(t.position)))i=93,a=!1,n=[];else{if(123!==c)return!1;i=125,a=!0,n={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=n),c=t.input.charCodeAt(++t.position);0!==c;){if(L(t,!0,e),(c=t.input.charCodeAt(t.position))===i)return t.position++,t.tag=f,t.anchor=d,t.kind=a?"mapping":"sequence",t.result=n,!0;p||F(t,"missed comma between flow collection entries"),h=null,o=s=!1,63===c&&g(t.input.charCodeAt(t.position+1))&&(o=s=!0,t.position++,L(t,!0,e)),r=t.line,V(t,e,1,!1,!0),l=t.tag,u=t.result,L(t,!0,e),c=t.input.charCodeAt(t.position),!s&&t.line!==r||58!==c||(o=!0,c=t.input.charCodeAt(++t.position),L(t,!0,e),V(t,e,1,!1,!0),h=t.result),a?R(t,n,m,l,u,h):o?n.push(R(t,null,m,l,u,h)):n.push(u),L(t,!0,e),44===(c=t.input.charCodeAt(t.position))?(p=!0,c=t.input.charCodeAt(++t.position)):p=!1}F(t,"unexpected end of the stream within a flow collection")}(t,f)?k=!0:(a&&function(t,e){var r,i,o,s,a=1,u=!1,l=!1,h=e,c=0,p=!1;if(124===(s=t.input.charCodeAt(t.position)))i=!1;else{if(62!==s)return!1;i=!0}for(t.kind="scalar",t.result="";0!==s;)if(43===(s=t.input.charCodeAt(++t.position))||45===s)1===a?a=43===s?3:2:F(t,"repeat of a chomping mode identifier");else{if(!((o=E(s))>=0))break;0===o?F(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?F(t,"repeat of an indentation width identifier"):(h=e+o-1,l=!0)}if(y(s)){do{s=t.input.charCodeAt(++t.position)}while(y(s));if(35===s)do{s=t.input.charCodeAt(++t.position)}while(!m(s)&&0!==s)}for(;0!==s;){for(P(t),t.lineIndent=0,s=t.input.charCodeAt(t.position);(!l||t.lineIndent<h)&&32===s;)t.lineIndent++,s=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>h&&(h=t.lineIndent),m(s))c++;else{if(t.lineIndent<h){3===a?t.result+=n.repeat("\n",u?1+c:c):1===a&&u&&(t.result+="\n");break}for(i?y(s)?(p=!0,t.result+=n.repeat("\n",u?1+c:c)):p?(p=!1,t.result+=n.repeat("\n",c+1)):0===c?u&&(t.result+=" "):t.result+=n.repeat("\n",c):t.result+=n.repeat("\n",u?1+c:c),u=!0,l=!0,c=0,r=t.position;!m(s)&&0!==s;)s=t.input.charCodeAt(++t.position);N(t,r,t.position,!1)}}return!0}(t,f)||function(t,e){var r,n,i;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(N(t,n,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;n=t.position,t.position++,i=t.position}else m(r)?(N(t,n,i,!0),U(t,L(t,!1,e)),n=i=t.position):t.position===t.lineStart&&M(t)?F(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);F(t,"unexpected end of the stream within a single quoted scalar")}(t,f)||function(t,e){var r,n,i,o,s,a;if(34!==(a=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(a=t.input.charCodeAt(t.position));){if(34===a)return N(t,r,t.position,!0),t.position++,!0;if(92===a){if(N(t,r,t.position,!0),m(a=t.input.charCodeAt(++t.position)))L(t,!1,e);else if(a<256&&A[a])t.result+=D[a],t.position++;else if((s=b(a))>0){for(i=s,o=0;i>0;i--)(s=x(a=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+s:F(t,"expected hexadecimal character");t.result+=S(o),t.position++}else F(t,"unknown escape sequence");r=n=t.position}else m(a)?(N(t,r,n,!0),U(t,L(t,!1,e)),r=n=t.position):t.position===t.lineStart&&M(t)?F(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}F(t,"unexpected end of the stream within a double quoted scalar")}(t,f)?k=!0:function(t){var e,r,n;if(42!==(n=t.input.charCodeAt(t.position)))return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!g(n)&&!v(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&F(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),u.call(t.anchorMap,r)||F(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],L(t,!0,-1),!0}(t)?(k=!0,null===t.tag&&null===t.anchor||F(t,"alias node should not have any properties")):function(t,e,r){var n,i,o,s,a,u,l,h,c=t.kind,p=t.result;if(g(h=t.input.charCodeAt(t.position))||v(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(g(n=t.input.charCodeAt(t.position+1))||r&&v(n)))return!1;for(t.kind="scalar",t.result="",i=o=t.position,s=!1;0!==h;){if(58===h){if(g(n=t.input.charCodeAt(t.position+1))||r&&v(n))break}else if(35===h){if(g(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&M(t)||r&&v(h))break;if(m(h)){if(a=t.line,u=t.lineStart,l=t.lineIndent,L(t,!1,-1),t.lineIndent>=e){s=!0,h=t.input.charCodeAt(t.position);continue}t.position=o,t.line=a,t.lineStart=u,t.lineIndent=l;break}}s&&(N(t,i,o,!1),U(t,t.line-a),i=o=t.position,s=!1),y(h)||(o=t.position+1),h=t.input.charCodeAt(++t.position)}return N(t,i,o,!1),!!t.result||(t.kind=c,t.result=p,!1)}(t,f,1===r)&&(k=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===C&&(k=l&&j(t,d))),null!==t.tag&&"!"!==t.tag)if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&F(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),h=0,c=t.implicitTypes.length;h<c;h+=1)if((p=t.implicitTypes[h]).resolve(t.result)){t.result=p.construct(t.result),t.tag=p.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else u.call(t.typeMap[t.kind||"fallback"],t.tag)?(p=t.typeMap[t.kind||"fallback"][t.tag],null!==t.result&&p.kind!==t.kind&&F(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+p.kind+'", not "'+t.kind+'"'),p.resolve(t.result)?(t.result=p.construct(t.result),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):F(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):F(t,"unknown tag !<"+t.tag+">");return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||k}function X(t){var e,r,n,i,o=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};0!==(i=t.input.charCodeAt(t.position))&&(L(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(s=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!g(i);)i=t.input.charCodeAt(++t.position);for(n=[],(r=t.input.slice(e,t.position)).length<1&&F(t,"directive name must not be less than one character in length");0!==i;){for(;y(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!m(i));break}if(m(i))break;for(e=t.position;0!==i&&!g(i);)i=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==i&&P(t),u.call(O,r)?O[r](t,r,n):I(t,'unknown document directive "'+r+'"')}L(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,L(t,!0,-1)):s&&F(t,"directives end mark is expected"),V(t,t.lineIndent-1,4,!1,!0),L(t,!0,-1),t.checkLineBreaks&&h.test(t.input.slice(o,t.position))&&I(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&M(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,L(t,!0,-1)):t.position<t.length-1&&F(t,"end of the stream or a document separator is expected")}function G(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new _(t,e),n=t.indexOf("\0");for(-1!==n&&(r.position=n,F(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)X(r);return r.documents}function W(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var n=G(t,r);if("function"!=typeof e)return n;for(var i=0,o=n.length;i<o;i+=1)e(n[i])}function H(t,e){var r=G(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new i("expected a single document in the stream, but found more")}}t.exports.loadAll=W,t.exports.load=H,t.exports.safeLoadAll=function(t,e,r){return"object"==typeof e&&null!==e&&void 0===r&&(r=e,e=null),W(t,e,n.extend({schema:s},r))},t.exports.safeLoad=function(t,e){return H(t,n.extend({schema:s},e))}},8178(t,e,r){"use strict";var n=r(4366),i=r(8467),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=/^[-+]?[0-9]+e/;t.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!o.test(t)||"_"===t[t.length-1])},construct:function(t){var e,r,n,i;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,i=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(t){i.unshift(parseFloat(t,10))}),e=0,n=1,i.forEach(function(t){e+=t*n,n*=60}),r*e):r*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||n.isNegativeZero(t))},represent:function(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(t))return"-0.0";return r=t.toString(10),s.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"})},8237(t,e,r){"use strict";var n=r(8467),i=Object.prototype.toString;t.exports=new n("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,r,n,o,s,a=t;for(s=new Array(a.length),e=0,r=a.length;e<r;e+=1){if(n=a[e],"[object Object]"!==i.call(n))return!1;if(1!==(o=Object.keys(n)).length)return!1;s[e]=[o[0],n[o[0]]]}return!0},construct:function(t){if(null===t)return[];var e,r,n,i,o,s=t;for(o=new Array(s.length),e=0,r=s.length;e<r;e+=1)n=s[e],i=Object.keys(n),o[e]=[i[0],n[i[0]]];return o}})},8268(t){"use strict";t.exports=function(t){return"string"==typeof t&&"\ufeff"===t.charAt(0)?t.slice(1):t}},8456(t,e,r){"use strict";var n;try{n=r(4914)}catch(t){"undefined"!=typeof window&&(n=window.esprima)}var i=r(8467);t.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(t){if(null===t)return!1;try{var e="("+t+")",r=n.parse(e,{range:!0});return"Program"===r.type&&1===r.body.length&&"ExpressionStatement"===r.body[0].type&&("ArrowFunctionExpression"===r.body[0].expression.type||"FunctionExpression"===r.body[0].expression.type)}catch(t){return!1}},construct:function(t){var e,r="("+t+")",i=n.parse(r,{range:!0}),o=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"ArrowFunctionExpression"!==i.body[0].expression.type&&"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(t){o.push(t.name)}),e=i.body[0].expression.body.range,"BlockStatement"===i.body[0].expression.body.type?new Function(o,r.slice(e[0]+1,e[1]-1)):new Function(o,"return "+r.slice(e[0],e[1]))},predicate:function(t){return"[object Function]"===Object.prototype.toString.call(t)},represent:function(t){return t.toString()}})},8467(t,e,r){"use strict";var n=r(6278),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];t.exports=function(t,e){var r,s;if(e=e||{},Object.keys(e).forEach(function(e){if(-1===i.indexOf(e))throw new n('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=(r=e.styleAliases||null,s={},null!==r&&Object.keys(r).forEach(function(t){r[t].forEach(function(e){s[String(e)]=t})}),s),-1===o.indexOf(this.kind))throw new n('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}},8591(){},9140(t,e,r){"use strict";var n=r(7388);t.exports=n.DEFAULT=new n({include:[r(4496)],explicit:[r(5418),r(3177),r(8456)]})},9392(t,e,r){"use strict";var n=r(8467);t.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}})},9449(t,e,r){"use strict";var n=r(856);t.exports=n},9452(t,e,r){"use strict";var n=r(7388);t.exports=new n({include:[r(1045)]})},9499(t,e,r){"use strict";var n=r(8467);t.exports=new n("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}})}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.d(__webpack_exports__,{aq:()=>x,YJ:()=>k});class t{constructor(e=null){if(this.TYPE="Entity",this.uuid=t.counter++,(e=e||{}).metadata)throw new Error("See where metadata is being passed")}debugValue(){return{type:this.TYPE}}children(){return[]}get childCount(){return this.children().length}addChild(t,e=-1){return e<0?this.children().push(t):this.children().splice(e,0,t),this}childAt(t){return this.children()[t]}indexOfChild(t){let e=0;for(const r of this.children()){if(r==t)return e;e++}return-1}removeChildAt(t){const e=this.children(),r=e[t];return e.splice(t,1),r}setChildAt(t,e){return this.children()[t]=e,this}toString(){return`Entity(id = ${this.uuid})`}equals(t,e=!1){return this.TYPE==t.TYPE}clone(){const t=this.newInstance();return this.copyTo(t),t}copyTo(t){}newInstance(){return new this.constructor}}t.counter=0;class e extends t{constructor(){super(...arguments),this.TYPE="TimedEntity"}equals(t){return super.equals(t)&&this.duration.equals(t.duration)}}function r(t,e){if(!t)throw new Error(e)}__webpack_require__(5430).default;const n=Math.pow(2,32);Math.pow(2,64);class i{constructor(t,e,r){this.uuid=i.counter++,this._spawnedFrom=null,this.sourceState=null,this.cancelled=!1,this.timeStamp=-1,this.children=[],this.name=t,this.source=e,this.payload=r}get spawnedFrom(){return this._spawnedFrom}setSpawnedFrom(t){this._spawnedFrom=t,this._rootEvent=null==t?this:t.rootEvent}spawn(t,e,r){const n=new i(t,e,r);return n.setSpawnedFrom(this),this.children.push(n),n}get rootEvent(){return this._rootEvent}}i.counter=0;class o{constructor(){this.stateData=null,this.id=o.counter++}get name(){return this.constructor.name}enter(t){this.stateData=t}handle(t){}}o.counter=0;class s{constructor(){this._eventHub=new a}get eventHub(){return this._eventHub}set eventHub(t){const e=this._eventHub;this._eventHub=t,this.eventHubChanged(e)}eventHubChanged(t){console.log("WARNING - EventHub Change Listener not implemented: ",this.constructor.name)}}class a{constructor(){this._handlers={},this._events=[],this._inBatchMode=!1}on(t,e){return this._addHandler(t,this._handlers,e)}removeOn(t,e){return this._removeHandler(t,this._handlers,e)}_ensurestrings(t){return"string"==typeof t&&(t=t.split(",")),t.map(function(t){return t.trim()})}_addHandler(t,e,r){return this._ensurestrings(t).forEach(function(t){e[t]=e[t]||[],e[t].push(r)}),this}_removeHandler(t,e,r){return this._ensurestrings(t).forEach(function(t){const n=e[t]||[];for(let t=0;t<n.length;t++)if(n[t]==r){n.splice(t,1);break}}),this}emit(t,e,r){const n=new i(t,e,r);return this._inBatchMode?(this._events.push(n),!0):this.dispatchEvent(n)}dispatchEvent(t){const e=this._handlers[t.name]||[];for(const r of e)if(r(t),t.cancelled)return!1;return!0}startBatchMode(){return this._inBatchMode||(this._inBatchMode=!0),this}cancelBatch(){this._inBatchMode=!1,this._events=[]}commitBatch(){this._inBatchMode=!1,this.emit(a.BATCH_EVENTS,this,this._events),this._events=[]}}a.BATCH_EVENTS="BatchEvents";class u{constructor(...t){this._firstChild=null,this._lastChild=null,this._size=0;for(const e of t)this.pushBack(e)}toJSON(){return Array.from(this.values())}forEach(t){let e=this._firstChild,r=0;for(;null!=e&&0!=t(e);)r++,e=e.nextSibling;return r}equals(t,e){if(this.size!=t.size)return!1;let r=this.first,n=t.first;for(;null!=r&&null!=n;r=r.nextSibling,n=n.nextSibling)if(!e(r,n))return!1;return null==r&&null==n}get isEmpty(){return 0==this._size}get size(){return this._size}get first(){return this._firstChild}get last(){return this._lastChild}*reversedValues(){let t=this._lastChild;for(;null!=t;)yield t,t=t.prevSibling}*values(){let t=this._firstChild;for(;null!=t;)yield t,t=t.nextSibling}add(t,e=null){if(null!=t.nextSibling||null!=t.prevSibling)throw new Error("New node already added to a list. Remove it first");if(t.nextSibling=t.prevSibling=null,this._size++,null==this._firstChild||null==this._lastChild)this._firstChild=this._lastChild=t;else if(null==e)t.prevSibling=this._lastChild,t.nextSibling=null,this._lastChild.nextSibling=t,this._lastChild=t;else if(e==this._firstChild)t.nextSibling=e,t.prevSibling=null,this._firstChild.prevSibling=t,this._firstChild=t;else{const r=e.prevSibling;t.nextSibling=e,e.prevSibling=t,t.prevSibling=r,null!=r&&(r.nextSibling=t)}return this}pushFront(t){return this.add(t,this._firstChild)}pushBack(t){return this.add(t)}remove(t){const e=t.nextSibling,r=t.prevSibling;return null==e?(this._lastChild=r,null==r&&(this._firstChild=null)):e.prevSibling=r,null==r?(this._firstChild=e,null==e&&(this._lastChild=null)):r.nextSibling=e,this._size--,t.prevSibling=t.nextSibling=null,this}popBack(){if(null==this._lastChild)throw new Error("No children");const t=this._lastChild;return this.remove(t),t}popFront(){if(null==this._firstChild)throw new Error("No children");const t=this._firstChild;return this.remove(t),t}}class l{}function h(t,e){for(t=Math.abs(t),e=Math.abs(e);e>0;){const r=e;e=t%e,t=r}return t}l.IS_EXPLORER=()=>navigator&&navigator.userAgent.indexOf("MSIE")>-1,l.IS_FIREFOX=()=>navigator&&navigator.userAgent.indexOf("Firefox")>-1,l.IS_OPERA=()=>navigator&&navigator.userAgent.toLowerCase().indexOf("op")>-1,l.UAHasChrome=()=>navigator&&navigator.userAgent.indexOf("Chrome")>-1,l.UAHasSafari=()=>navigator&&navigator.userAgent.indexOf("Safari")>-1,l.IS_SAFARI=()=>navigator&&l.UAHasSafari()&&(!l.UAHasChrome()||!l.UAHasSafari()),l.IS_CHROME=()=>navigator&&l.UAHasChrome()&&(!l.UAHasChrome()||!l.IS_OPERA());class c{constructor(t=0,e=1,r=!1){if(isNaN(t)||isNaN(e))throw new Error(`Invalid numerator(${t}) or denminator(${e})`);if(r){const r=h(t,e);t/=r,e/=r}this.num=t,this.den=e}static parse(t,e=!1){const r=t.trim().split("/").map(t=>t.trim());let n=1,i=1;if(1==r.length)n=parseInt(r[0]);else{if(2!=r.length)throw new Error("Invalid fraction string: "+t);r[0].length>0&&(n=parseInt(r[0])),r[1].length>0&&(i=parseInt(r[1]))}if(isNaN(n)||isNaN(i))throw new Error("Invalid fraction string: "+t);return new c(n,i,e)}get isWhole(){return this.num%this.den==0}get isZero(){return 0==this.num}get isInfinity(){return 0==this.den}get isOne(){return this.num==this.den}get ceil(){return this.num%this.den==0?this.num/this.den:1+Math.floor(this.num/this.den)}get floor(){return this.num%this.den==0?this.num/this.den:Math.floor(this.num/this.den)}plus(t,e=!1){return new c(this.num*t.den+this.den*t.num,this.den*t.den,e)}plusNum(t,e=!1){return new c(this.num+this.den*t,this.den,e)}minus(t,e=!1){return new c(this.num*t.den-this.den*t.num,this.den*t.den,e)}minusNum(t,e=!1){return new c(this.num-this.den*t,this.den,e)}times(t,e=!1){return new c(this.num*t.num,this.den*t.den,e)}timesNum(t,e=!1){return new c(this.num*t,this.den,e)}divby(t,e=!1){return new c(this.num*t.den,this.den*t.num,e)}divbyNum(t,e=!1){return new c(this.num,this.den*t,e)}numDivby(t,e=!1){return new c(this.den*t,this.num,e)}mod(t){const e=this.divby(t),r=Math.floor(e.num/e.den);return this.minus(t.timesNum(r))}modNum(t){const e=this.divbyNum(t),r=Math.floor(e.num/e.den);return this.minusNum(t*r)}get inverse(){return new c(this.den,this.num)}get factorized(){const t=h(this.num,this.den);return new c(this.num/t,this.den/t)}equals(t){return this.num*t.den==this.den*t.num}equalsNum(t){return this.num==this.den*t}cmp(t){return this.num*t.den-this.den*t.num}cmpNum(t){return this.num-this.den*t}isLT(t){return this.cmp(t)<0}isLTE(t){return this.cmp(t)<=0}isLTNum(t){return this.cmpNum(t)<0}isLTENum(t){return this.cmpNum(t)<=0}isGT(t){return this.cmp(t)>0}isGTE(t){return this.cmp(t)>=0}isGTNum(t){return this.cmpNum(t)>0}isGTENum(t){return this.cmpNum(t)>=0}toString(){return this.num+"/"+this.den}static max(t,e){return t.cmp(e)>0?t:e}static min(t,e){return t.cmp(e)<0?t:e}}c.ZERO=new c,c.ONE=new c(1,1),c.INFINITY=new c(1,0);const p=(t=0,e=1,r=!1)=>new c(t,e,r),f=c.ZERO;c.ONE;class d{constructor(t,e=0,r=0,n=0){this.cycle=t,this.barIndex=e,this.beatIndex=r,this.instance=n}get next(){const t=this.cycle.bars[this.barIndex],e=[[this.barIndex,this.beatIndex,this.instance],t.beatLengths[this.beatIndex]];return this.instance++,(!t.beatCounts[this.beatIndex]||this.instance>=t.beatCounts[this.beatIndex])&&(this.instance=0,this.beatIndex++,this.beatIndex>=t.beatLengths.length&&(this.beatIndex=0,this.barIndex++,this.barIndex>=this.cycle.bars.length&&(this.barIndex=0))),e}get prev(){const t=this.cycle.bars[this.barIndex],e=[[this.barIndex,this.beatIndex,this.instance],t.beatLengths[this.beatIndex]];return this.instance--,this.instance<0&&(this.beatIndex--,this.beatIndex<0&&(this.barIndex--,this.barIndex<0&&(this.barIndex=this.cycle.bars.length-1),this.beatIndex=this.cycle.bars[this.barIndex].beatCount-1),this.instance=(this.cycle.bars[this.barIndex].beatCounts[this.beatIndex]||1)-1),e}}class m extends e{constructor(t=null){super(t=t||{}),this.TYPE="Bar",this.beatLengths=[],this.beatCounts=[],this.name=t.name||"";for(const e of t.beatLengths||[])"number"==typeof e?this.beatLengths.push(p(e)):this.beatLengths.push(e);for(const e of t.beatCounts||[])this.beatCounts.push(e);for(;this.beatCounts.length<this.beatLengths.length;)this.beatCounts.push(1)}debugValue(){return Object.assign(Object.assign({},super.debugValue()),{name,beatLengths:this.beatLengths})}equals(t){if(!super.equals(t))return!1;if(this.beatLengths.length!=t.beatLengths.length)return!1;if(this.beatCounts.length!=t.beatCounts.length)return!1;for(let e=0;e<this.beatLengths.length;e++)if(!this.beatLengths[e].equals(t.beatLengths[e]))return!1;for(let e=0;e<this.beatCounts.length;e++)if(this.beatCounts[e]!=t.beatCounts[e])return!1;return!0}copyTo(t){super.copyTo(t),t.name=this.name,t.beatLengths=[...this.beatLengths],t.beatCounts=[...this.beatCounts]}instanceCount(t){return t>this.beatCounts.length?1:this.beatCounts[t]}get beatCount(){return this.beatLengths.length}get totalBeatCount(){let t=0;for(let e=0;e<this.beatLengths.length;e++)t+=this.beatCounts[e]||1;return t}get duration(){let t=f;for(let e=0;e<this.beatLengths.length;e++)t=t.plus(this.beatLengths[e].timesNum(this.beatCounts[e]||1));return t}}class y extends e{constructor(t=null){super(t=t||{}),this.TYPE="Cycle",this.name=t.name||"",this.bars=t.bars||[]}debugValue(){return Object.assign(Object.assign({},super.debugValue()),{name,bars:this.bars.map(t=>t.debugValue())})}children(){return this.bars}equals(t){if(!super.equals(t))return!1;if(this.bars.length!=t.bars.length)return!1;for(let e=0;e<this.bars.length;e++)if(!this.bars[e].equals(t.bars[e]))return!1;return!0}getAtIndex(t){let e=0;for(;t<0;)t+=this.totalBeatCount,e--;t>=this.totalBeatCount&&(e=Math.floor(t/this.totalBeatCount)),t%=this.totalBeatCount;let r=f;for(let n=0;n<this.bars.length;n++){const i=this.bars[n];if(t>=i.totalBeatCount)t-=i.totalBeatCount,r=r.plus(i.duration);else for(let o=0;o<i.beatCount;o++){const s=i.beatLengths[o],a=i.beatCounts[o]||1;if(!(t>=a)){const i=t;return[e,[n,o,i],r.plus(s.timesNum(i))]}t-=a,r=r.plus(s.timesNum(a))}}throw new Error("Should not be here!")}getPosition(t){const e=this.duration;let n=0;if(t.isLT(f))for(;t.isLT(f);)n--,t=t.plus(e);else if(t.isGTE(e)){const i=t.mod(e);r((t=t.minus(i).divby(e)).isWhole),n=t.floor,t=i}let i=0;for(let e=0;e<this.bars.length;e++){const r=this.bars[e],o=r.duration;if(t.isGTE(o))t=t.minus(o);else for(let o=0;o<r.beatCount;o++){const s=r.beatLengths[o],a=r.beatCounts[o]||1;for(let r=0;r<a;r++,i++){if(!t.isGTE(s))return[n,[e,o,r],t,i];t=t.minus(s)}}i+=r.totalBeatCount}throw new Error("Should not be here!")}*iterateBeats(t=0,e=0,r=0){let n=t,i=e,o=r;for(;;){const t=this.bars[n];yield[[n,i,o],t.beatLengths[i]],o++,(!t.beatCounts[i]||o>=t.beatCounts[i])&&(o=0,i++,i>=t.beatLengths.length&&(i=0,n++,n>=this.bars.length&&(n=0)))}}copyTo(t){super.copyTo(t),t.name=this.name,t.bars=this.bars.map(t=>t.clone())}get beatCount(){let t=0;for(const e of this.bars)t+=e.beatCount;return t}get totalBeatCount(){let t=0;for(const e of this.bars)t+=e.totalBeatCount;return t}get duration(){return this.bars.reduce((t,e)=>t.plus(e.duration),f)}}y.DEFAULT=new y({name:"Adi Thalam",bars:[new m({name:"Laghu",beatLengths:[1,1,1,1]}),new m({name:"Dhrutam",beatLengths:[1,1]}),new m({name:"Dhrutam",beatLengths:[1,1]})]});const g=c.ZERO,v=c.ONE;var x,b;(b=x||(x={})).NOTE="Note",b.LITERAL="Literal",b.SYLLABLE="Syllable",b.SPACE="Space",b.GROUP="Group",b.LABEL="Label",b.REST="Rest",b.MARKER="Marker";class E extends e{constructor(t=v){super(),this.TYPE="Atom",this.nextSibling=null,this.prevSibling=null,this.parentGroup=null,this.isContinuation=!1,this._duration=t||v}debugValue(){const t=super.debugValue();return this.duration.isOne||(t.duration=this.duration.factorized.toString()),this.isContinuation&&(t.isContinuation=!0),(this.markersBefore||[]).length>0&&(t.mbef=this.markersBefore.map(t=>t.debugValue())),(this.markersAfter||[]).length>0&&(t.maft=this.markersAfter.map(t=>t.debugValue())),t}copyTo(t){super.copyTo(t),t._duration=new c(this.duration.num,this.duration.den)}get duration(){return this._duration}set duration(t){this._duration=t}}class C extends E{constructor(){super(...arguments),this.TYPE="LeafAtom",this.beforeRest=!1}splitAt(t){if(this.duration.cmp(t)>0){const e=this.createSpilloverSpace(this.duration.minus(t));return e.isContinuation=!0,this.duration=t,e}return null}createSpilloverSpace(t){return new w(t)}debugValue(){return this.beforeRest?Object.assign(Object.assign({},super.debugValue()),{beforeRest:!0}):super.debugValue()}}class S extends t{constructor(t,e=!0){super(),this.text=t,this.isBefore=e,this.TYPE="Marker"}debugValue(){return Object.assign(Object.assign({},super.debugValue()),{text:this.text,before:this.isBefore})}toString(){return`Marker(${this.text}-${this.isBefore})`}}class w extends C{constructor(t=v,e=!1){super(t),this.TYPE="Space",this.isSilent=!1,this.isSilent=e}debugValue(){return Object.assign(Object.assign({},super.debugValue()),{isSilent:this.isSilent})}toString(){return`Space(${this.duration}-${this.isSilent})`}copyTo(t){super.copyTo(t),t.isSilent=this.isSilent}equals(t){return super.equals(t)&&this.isSilent==t.isSilent}createSpilloverSpace(t){const e=super.createSpilloverSpace(t);return e.isSilent=this.isSilent,e}}class A extends C{constructor(t,e=v){super(e),this.value=t,this.TYPE="Literal",this.embelishments=[]}debugValue(){const t=Object.assign(Object.assign({},super.debugValue()),{value:this.value});return this.embelishments.length>0&&(t.embs=this.embelishments.map(t=>"debugValue"in t?t.debugValue():t)),t}toString(){return`Lit(${this.duration}-${this.value})`}equals(t){return super.equals(t)&&this.value==t.value}copyTo(t){super.copyTo(t),t.value=this.value}}class D extends A{constructor(t,e=v,r=0,n=0){super(t,e),this.TYPE="Note",this.octave=0,this.shift=0,this.octave=r,this.shift=n}static fromLit(t){if(t.TYPE==x.NOTE)return t;const e=new D(t.value,t.duration);return e.embelishments=t.embelishments,e.beforeRest=t.beforeRest,e}debugValue(){const t=Object.assign({},super.debugValue());return 0!=this.octave&&(t.octave=this.octave),0!=this.shift&&(t.shift=this.shift),t}toString(){return`Note(${this.duration}-${this.value}-${this.octave})`}equals(t){return super.equals(t)&&this.octave==t.octave&&this.shift==t.shift}copyTo(t){super.copyTo(t),t.octave=this.octave,t.shift=this.shift}}class k extends E{constructor(...t){super(0==t.length?g:v),this.TYPE="Group",this.durationIsMultiplier=!1,this.atoms=new u,this.addAtoms(!1,...t)}equals(t,e=!1){return!!super.equals(t)&&this.atoms.equals(t.atoms,(t,e)=>t.equals(e))}copyTo(t){super.copyTo(t),t.durationIsMultiplier=this.durationIsMultiplier,this.atoms.forEach(e=>t.atoms.add(e.clone()))}get duration(){return this.durationIsMultiplier?this.totalChildDuration.divby(this._duration):this._duration}setDurationAsMultiplier(t=!0){return this.durationIsMultiplier=t,this}setDuration(t,e=!1){return this._duration=t,this.durationIsMultiplier=e,this}debugValue(){const t=Object.assign(Object.assign({},super.debugValue()),{atoms:Array.from(this.atoms.values(),t=>t.debugValue())});return this.durationIsMultiplier&&(t.durationIsMultiplier=!0),t}splitAt(t){if(this.duration.isLTE(t)||t.isLTE(g))return null;const e=new k;this.durationIsMultiplier&&(e.durationIsMultiplier=!0,e._duration=this._duration);let r=this.duration;const n=this.totalChildDuration,i=this.durationIsMultiplier?v.divby(this._duration):this._duration.divby(n,!0);for(;r.isGT(t)&&this.atoms.last;){const n=this.atoms.last,o=n.duration.times(i),s=r.minus(o);if(!s.isGTE(t)){const r=t.minus(s,!0).divby(i,!0),o=n.splitAt(r);if(null==o)throw new Error("Spill over cannot be null here");if(this.durationIsMultiplier){if(this._duration.isZero)throw new Error("How can this be?")}else this._duration=t;return o.isContinuation=!0,e.insertAtomsAt(e.atoms.first,!0,o),e}if(this.removeAtoms(!0,n),e.insertAtomsAt(e.atoms.first,!0,n),s.equals(t))return e;r=s}return e}get totalChildDuration(){let t=g;return this.atoms.forEach(e=>t=t.plus(e.duration)),t}insertAtomsAt(t,e=!1,...r){const n=(e=e&&!this.durationIsMultiplier)?this.totalChildDuration:v;for(const e of r){if(null!=e.parentGroup){if(e.parentGroup!=this)throw new Error("Atom belongs to another parent. Remove it first");e.parentGroup.removeAtoms(!1,e)}if(e.TYPE==x.REST){const t=this.atoms.last;t&&t.TYPE!=x.GROUP&&t.TYPE!=x.LABEL&&(t.beforeRest=!0)}else e.parentGroup=this,this.atoms.add(e,t)}if(e)if(this._duration.isZero){if(this.durationIsMultiplier)throw new Error("How can this be?");this._duration=this.totalChildDuration}else{const t=this.totalChildDuration.divby(n);this._duration=this._duration.times(t,!0)}return this}addAtoms(t=!1,...e){return this.insertAtomsAt(null,t,...e)}removeAtoms(t=!1,...e){const r=(t=t&&!this.durationIsMultiplier)?this.totalChildDuration:v;for(const t of e)if(t.parentGroup==this)this.atoms.remove(t),t.parentGroup=null;else if(null!=t.parentGroup)throw new Error("Atom cannot be removed as it does not belong to this group");if(t)if(this._duration.isZero){if(this.durationIsMultiplier)throw new Error("How can this be?");this._duration=this.totalChildDuration}else{const t=this.totalChildDuration.divby(r);this._duration=this._duration.times(t,!0)}return this}}const _=c.ZERO;class T{constructor(t){this.uuid=T.counter++,t=t||{},this.beatDuration=t.beatDuration||1,"cycle"in t&&(this.cycle=t.cycle),this.cycle&&!this.cycle.duration.isZero||(this.cycle=y.DEFAULT),this._rowStartOffsets=[],this._rowEndOffsets=[],this._rowDurations=[],this._totalLayoutDuration=_,this._totalBeats=0,this._beatLayouts=[],this.lineBreaks=t.lineBreaks||t.layout||[]}equals(t){return this.beatDuration==t.beatDuration&&this.cycle.equals(t.cycle)&&this.lineBreaksEqual(t._lineBreaks)}lineBreaksEqual(t){return this._lineBreaks.length==t.length&&this._lineBreaks.every((e,r)=>e==t[r])}debugValue(){var t;return{cycle:null===(t=this.cycle)||void 0===t?void 0:t.debugValue(),beatDuration:this.beatDuration,lineBreaks:this._lineBreaks}}getBeatLocation(t){const e=t.index%this.totalBeats;let r=0;for(let n=0;n<this._lineBreaks.length;n++){if(e<r+this._lineBreaks[n]){let i=_;if(e>r){const n=new d(this.cycle,t.barIndex,t.beatIndex,t.instance);let[,o]=n.prev;for(let t=r;t<e;t++)[,o]=n.prev,i=i.plus(o.timesNum(this.beatDuration))}return[n,e-r,i]}r+=this._lineBreaks[n]}throw new Error("Invalid beat index: "+t.index)}get lineBreaks(){return this._lineBreaks&&0!=this._lineBreaks.length||(this.lineBreaks=[this.cycle.beatCount]),this._lineBreaks}set lineBreaks(t){this._lineBreaks=t,this.refreshLayout()}get beatLayouts(){return(!this._beatLayouts||this._beatLayouts.length<this.lineBreaks.length)&&this.refreshLayout(),this._beatLayouts}get totalBeats(){return this.beatLayouts,this._totalBeats}get totalLayoutDuration(){return this.beatLayouts,this._totalLayoutDuration}refreshLayout(){const t=this.cycle.iterateBeats(),e=this.beatDuration;this._beatLayouts=this.lineBreaks.map((r,n)=>{const i=[];for(let n=0;n<r;n++){const r=t.next().value;r[1]=r[1].timesNum(e),i.push(r)}return i}),this._totalBeats=this.lineBreaks.reduce((t,e)=>t+e,0),this._rowDurations=this._beatLayouts.map(t=>t.reduce((t,e)=>t.plus(e[1]),_)),this._rowDurations.forEach((t,e)=>{this._rowStartOffsets[e]=0==e?_:this._rowStartOffsets[e-1].plus(t)}),this._rowEndOffsets=this._rowDurations.map((t,e)=>this._rowStartOffsets[e].plus(t)),this._totalLayoutDuration=this._rowDurations.reduce((t,e)=>t.plus(e),_)}}T.counter=0;class F extends s{constructor(){super(...arguments),this.uuid=F.idCounter++,this.lastUpdatedAt=0,this.rows=[],this.rowAligns=new Map,this.colAligns=new Map}debugValue(){return{rows:this.rows.map(t=>t.debugValue()),lastUpdatedAt:this.lastUpdatedAt}}get firstRow(){for(const t of this.rows)if(t.numCells>0)return t.rowIndex;return-1}get firstCol(){let t=-1;for(const e of this.rows){const r=e.firstCol;r>=0&&(t<0||r<t)&&(t=r)}return t}cellsInRow(t){const e=[],r=this.rows[t];if(r)for(const t of r.cells)(null==t?void 0:t.value)&&e.push(t);return e}cellsInCol(t){const e=[];for(const r of this.rows){const n=r.cellAt(t);(null==n?void 0:n.value)&&e.push(n)}return e}addRowAlign(t){this.rowAligns.set(t.uuid,t)}addColAlign(t){this.colAligns.set(t.uuid,t)}addRows(t=-1,e=1){t<0&&(t=this.rows.length);let r=this.rows[t]||null;const n=this.rows[t-1]||null;for(let i=e-1;i>=0;i--){const e=new N(this,t+i);this.rows.splice(t,0,e),null!=r&&e.defaultRowAlign.addSuccessor(r.defaultRowAlign),0==i&&t>0&&n.defaultRowAlign.addSuccessor(e.defaultRowAlign),r=e}for(let r=t+e;r<this.rows.length;r++)this.rows[r].rowIndex+=e;return this}getRow(t){return t>=this.rows.length&&this.addRows(-1,1+t-this.rows.length),this.rows[t]}setValue(t,e,r,n){var i,o;const s=this.getRow(t);if(n||(n=(t,e)=>new O(t,e)),null==r){const t=s.clearCellAt(e);return null!=t&&(null===(i=this.eventHub)||void 0===i||i.emit(I.CLEARED,this,{loc:t.location})),t}{const t=s.cellAt(e,n),i=t.value;return null===(o=this.eventHub)||void 0===o||o.emit(I.UPDATED,this,{loc:t.location,cell:t,oldValue:t.value}),t.value=r,i}}eventHubChanged(){console.log("Event Hub Changed for GridModel")}}var I;F.idCounter=0,function(t){t.ADDED="CellAdded",t.CLEARED="CellCleared",t.REMOVED="CellRemoved",t.UPDATED="CellUpdated",t.MOVED="CellMoved"}(I||(I={}));class O{constructor(t,e,r=null){this.gridRow=t,this.colIndex=e,this.value=r,this.uuid=O.idCounter++,this.rowAlign=t.defaultRowAlign}get rowAlign(){return this._rowAlign}set rowAlign(t){t.addCell(this),this._rowAlign=t}get colAlign(){return this._colAlign}set colAlign(t){t.addCell(this),this._colAlign=t}get location(){return this.gridRow.rowIndex+":"+this.colIndex}get grid(){return this.gridRow.grid}get rowIndex(){return this.gridRow.rowIndex}debugValue(){const t={r:this.gridRow.rowIndex,c:this.colIndex,value:this.value,y:this.rowAlign.coordOffset,h:this.rowAlign.maxLength};return this.colAlign&&(t.x=this.colAlign.coordOffset,t.w=this.colAlign.maxLength),t}}O.idCounter=0;class N{constructor(t,e){this.grid=t,this.rowIndex=e,this.cells=[],this.defaultRowAlign=new R,this.grid.addRowAlign(this.defaultRowAlign)}get firstCol(){var t;for(let e=0;e<this.cells.length;e++)if(null===(t=this.cells[e])||void 0===t?void 0:t.value)return e;return-1}get numCols(){return this.cells.length}get numCells(){let t=0;for(const e of this.cells)null!=e&&null!=e.value&&t++;return t}cellAt(t,e){let r=this.cells[t]||null;return!r&&e&&(this.cells[t]=r=e(this,t),r.gridRow=this,r.colIndex=t,r.rowAlign&&this.grid.addRowAlign(r.rowAlign),r.colAlign&&this.grid.addColAlign(r.colAlign)),r}clearCellAt(t){const e=this.cells[t]||null;return e&&(this.cells[t]=null),e}debugValue(){return{r:this.rowIndex,cells:this.cells.filter(t=>t).map(t=>null==t?void 0:t.debugValue())}}}class B{constructor(){this.uuid=B.idCounter++,this.needsLayout=!1,this._coordOffset=0,this._maxLength=0,this.paddingBefore=5,this.paddingAfter=5,this.cells=[],this.prevLines=[],this.nextLines=[]}get coordOffset(){return this._coordOffset}get maxLength(){return this._maxLength+this.paddingBefore+this.paddingAfter}setMaxLength(t){this._maxLength=t}setPadding(t,e){t>=0&&(this.paddingBefore=t),e>=0&&(this.paddingAfter=e)}addCell(t){return this.beforeAddingCell(t)&&this.cells.push(t),this}removeCell(t){if(this.beforeRemovingCell(t))for(let e=0;e<this.cells.length;e++)if(this.cells[e].uuid==t.uuid){this.cells.splice(e,1);break}return this}addSuccessor(t){for(const e of this.nextLines)if(e==t)return;this.nextLines.push(t),t.prevLines.push(this)}}B.idCounter=0;class R extends B{setOffset(t){this._coordOffset=t;for(const e of this.cells)if(e.value){const r=this.getCellView(e);this._maxLength<=0&&this.evalMaxLength(),r.setBounds(null,t,null,this.maxLength,!0)}}evalMaxLength(t=[]){this._maxLength=0;for(const t of this.cells)if(t.value){const e=this.getCellView(t);this._maxLength=Math.max(e.minSize.height,this._maxLength)}return this._maxLength}beforeAddingCell(t){return t.rowAlign&&t.rowAlign!=this&&t.rowAlign.removeCell(t),t.rowAlign!=this}beforeRemovingCell(t){return t.rowAlign==this}}c.ZERO;const P=c.ONE;class L{constructor(t,e,r,n,i,o,s,a,u){this.index=t,this.role=e,this.offset=r,this.duration=n,this.barIndex=i,this.beatIndex=o,this.instance=s,this.prevBeat=a,this.nextBeat=u,this.uuid=L.idCounter++,this.atomIsPlaceholder=!1}debugValue(){return{index:this.index,role:this.role.name,offset:this.offset.toString(),duration:this.duration.toString(),barIndex:this.barIndex,beatIndex:this.beatIndex,instance:this.instance,atom:this.atom.debugValue()}}get endOffset(){return this.offset.plus(this.duration)}get filled(){return this.remaining.isZero}get remaining(){return this.atom?this.duration.minus(this.atom.duration,!0):this.duration}add(t){return!(this.remaining.cmp(t.duration)<0||(this.atom?(this.atomIsPlaceholder||(this.atomIsPlaceholder=!0,this.atom=new k(this.atom).setDuration(P,!0)),this.atom.addAtoms(!0,t)):this.atom=t,0))}get preMarkers(){const t=[];let e=this.atom;for(;null!=e;){for(const r of e.markersBefore||[])t.push(r);e=e.TYPE==x.GROUP?e.atoms.first:null}return t}get postMarkers(){const t=[];let e=this.atom;for(;null!=e;)t.splice(0,0,...e.markersAfter||[]),e=e.TYPE==x.GROUP?e.atoms.last:null;return t}}L.idCounter=0;var M=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},U=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},j=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function z(t,e,n){var i=[],o={};return t.forEach(function(t){var s,a;if(!(e(t)in o))for(var u=t,l={},h=[[t,[]]];h.length>0;){for(var c=[],p=0;p<h.length;p++){var f=M(h[p],2),d=f[0],m=f[1];r(null!=d);var y=n(d),g=U([],M(m),!1);try{for(var v=(s=void 0,j(y)),x=v.next();!x.done;x=v.next()){var b=M(x.value,2),E=b[0],C=b[1];E==u?(g.push([C,E]),g.forEach(function(t,e){var r=M(t,2),n=(r[0],r[1]);return o[n]=!0}),i.push([u,g]),g=g.slice(0,g.length-1)):e(E)in l||(l[e(E)]=!0,c.push([E,U(U([],M(g),!1),[[C,E]],!1)]))}}catch(t){s={error:t}}finally{try{x&&!x.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}}h=c}}),i}var J,V,X=(J=function(t,e){return J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},J(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}J(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),G=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},W=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},H=function(t){return t.key},K=(function(){function t(t){this.root=new K,this.keyFunc=t}t.prototype.add=function(t,e){void 0===e&&(e=0);for(var r=this.root,n=e;n<t.length;n++){var i=this.keyFunc(t[n]);if(r.children.has(i))r=r.children.get(i);else{var o=new K;o.value=t[n],o.parent=r,r.children.set(i,o),r=o}}return r.isLeaf=!0,r},Object.defineProperty(t.prototype,"debugValue",{get:function(){return this.root.debugValue},enumerable:!1,configurable:!0})}(),function(){function t(){this.isLeaf=!1,this.value=null,this.parent=null,this.children=new Map}return Object.defineProperty(t.prototype,"debugValue",{get:function(){var t,e,r={value:this.value,children:{}};this.isLeaf&&(r.isLeaf=!0);try{for(var n=G(this.children.entries()),i=n.next();!i.done;i=n.next()){var o=W(i.value,2),s=o[0],a=o[1];r.children[s]=a.debugValue}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},enumerable:!1,configurable:!0}),t}()),q=function(){function t(t){void 0===t&&(t=H),this._entries=[],this._entriesByKey={},this.keyFunc=t}return t.prototype.clear=function(){this._entries=[],this._entriesByKey={}},t.prototype.remove=function(t){var e=[];this._entriesByKey={};for(var r=!1,n=0;n<this._entries.length;n++){var i=this._entries[n];t(i)?r=!0:(i.id=e.length,e.push(i),this._entriesByKey[this.keyFunc(i)]=i)}return this._entries=e,r},Object.defineProperty(t.prototype,"entries",{get:function(){return this._entries},enumerable:!1,configurable:!0}),t.prototype.get=function(t){return r(t>=0&&t<this._entries.length),this._entries[t]},t.prototype.getByKey=function(t){return this._entriesByKey[t]||null},t.prototype.ensure=function(t,e){if(void 0===e&&(e=!1),this.has(t)){if(e)throw new Error("Entry ".concat(this.keyFunc(t)," already exists"));return this._entriesByKey[this.keyFunc(t)]}return this._entriesByKey[this.keyFunc(t)]=t,t.id=this._entries.length,this._entries.push(t),t},t.prototype.has=function(t){return this.keyFunc(t)in this._entriesByKey},Object.defineProperty(t.prototype,"size",{get:function(){return this._entries.length},enumerable:!1,configurable:!0}),t}(),Y=function(){function t(t,e){void 0===e&&(e=!0),this.entries=new Set,this.hasNull=!1,this.grammar=t,this.enforceSymbolType=e}return Object.defineProperty(t.prototype,"debugString",{get:function(){return"<"+this.labels().sort().join(", ")+">"},enumerable:!1,configurable:!0}),t.prototype.labels=function(t){var e,n;void 0===t&&(t=!1);var i=[];try{for(var o=G(this.entries),s=o.next();!s.done;s=o.next()){var a=s.value,u=this.grammar.getSymById(a);r(null!=u),t&&u.isAuxiliary||i.push(u.label)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return this.hasNull&&i.push(""),i},t.prototype.addFrom=function(t,e){return void 0===e&&(e=!0),t.addTo(this,e)},t.prototype.addTo=function(t,e){var r,n;void 0===e&&(e=!0);var i=t.entries.size;try{for(var o=G(this.entries),s=o.next();!s.done;s=o.next()){var a=s.value;t.entries.add(a)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return e&&(t.hasNull=this.hasNull||t.hasNull),t.entries.size-i},t.prototype.has=function(t){return this.entries.has(t.id)},t.prototype.add=function(t){return r(null==this.enforceSymbolType||this.enforceSymbolType==t.isTerminal,"Terminal types being enforced: ".concat(this.enforceSymbolType)),this.entries.add(t.id),this},t.prototype.delete=function(t){return this.entries.delete(t.id)},Object.defineProperty(t.prototype,"size",{get:function(){return this.entries.size+(this.hasNull?1:0)},enumerable:!1,configurable:!0}),t}(),$=function(){function t(t){this.grammar=t,this.refresh()}return Object.defineProperty(t.prototype,"nonterms",{get:function(){var t=this,e=[];return this.entries.forEach(function(n){var i=t.grammar.getSymById(n);r(null!=i&&!i.isTerminal),e.push(i)}),e},enumerable:!1,configurable:!0}),t.prototype.refresh=function(){var t=this;this.entries=new Set,this.visited={};var e=0;do{e=this.entries.size,this.grammar.allNonTerminals.forEach(function(e){return t.visit(e)})}while(e!=this.entries.size)},t.prototype.visit=function(t){var e,r;try{for(var n=G(this.grammar.rulesForNT(t)),i=n.next();!i.done;i=n.next()){var o=i.value;if(this.isStrNullable(o.rhs)){this.add(t);break}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.isNullable=function(t){return!t.isTerminal&&this.entries.has(t.id)},t.prototype.isStrNullable=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=null),null==r&&(r=t.length-1);for(var n=e;n<=r;n++)if(!this.isNullable(t.syms[n]))return!1;return!0},t.prototype.add=function(t){r(!t.isTerminal),this.entries.add(t.id)},t}(),Q=function(){function t(t){this.entries={},this._count=0,this.grammar=t}return t.prototype.refresh=function(){this.entries={},this._count=0},t.prototype.forEachTerm=function(t,e){var n=this,i=this.entriesFor(t);i.entries.forEach(function(t){var i=n.grammar.getSymById(t);r(null!=i&&i.isTerminal),e(i)}),i.hasNull&&e(null)},Object.defineProperty(t.prototype,"debugValue",{get:function(){var t={};for(var e in this.entries)t[this.grammar.getSymById(e).label]=this.entries[e].debugString;return t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){var t=0;for(var e in this.entries)t+=this.entries[e].size;return t},enumerable:!1,configurable:!0}),t.prototype.entriesFor=function(t){if(t.id in this.entries)return this.entries[t.id];var e=new Y(this.grammar);return this.entries[t.id]=e,e},t.prototype.addNull=function(t){var e=this.entriesFor(t);return!e.hasNull&&(e.hasNull=!0,!0)},t.prototype.add=function(t,e,n){void 0===n&&(n=!0),t.isTerminal&&r(!1,"Should not be here");var i=this.entriesFor(t);if(e.isTerminal){if(i.has(e))return!1;i.add(e),this._count++}else{var o=this.entriesFor(e),s=this.entriesFor(t),a=o.addTo(s,n);this._count+=a}return!0},t}(),Z=function(t){function e(e,r){var n=t.call(this,e)||this;return r||(r=new $(e)),n.nullables=r,n.refresh(),n}return X(e,t),e.prototype.forEachTermIn=function(t,e,r){void 0===e&&(e=0);for(var n=t.syms,i={},o=!0,s=e;o&&s<n.length;s++){var a=n[s];if(a.isTerminal)r(a),o=!1;else{var u=a;this.forEachTerm(u,function(t){null==t||t.id in i||(i[t.id]=!0,r(t))}),this.nullables.isNullable(a)||(o=!1)}}o&&r(null)},e.prototype.refresh=function(){var e=this;t.prototype.refresh.call(this);var r=0;do{r=this.count,this.grammar.forEachRule(null,function(t){e.processRule(t)})}while(r!=this.count)},e.prototype.processRule=function(t){var e,r,n=this.nullables,i=!0;try{for(var o=G(t.rhs.syms),s=o.next();!s.done;s=o.next()){var a=s.value;if(this.add(t.nt,a,!1),a.isTerminal||!n.isNullable(a)){i=!1;break}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}i&&this.addNull(t.nt)},e}(Q),tt=function(t){function e(e,r){var n=t.call(this,e)||this;return n.firstSets=r||new Z(e),n.refresh(),n}return X(e,t),Object.defineProperty(e.prototype,"nullables",{get:function(){return this.firstSets.nullables},enumerable:!1,configurable:!0}),e.prototype.refresh=function(){var e=this;t.prototype.refresh.call(this);var n=this.grammar;r(null!=n.startSymbol,"Select start symbol of the grammar"),this.add(n.startSymbol,n.Eof);var i=0;do{i=this.count,this.grammar.forEachRule(null,function(t){return e.processRule(t)})}while(i!=this.count)},e.prototype.processRule=function(t){for(var e=this,r=t.rhs.syms,n=this.firstSets,i=this.firstSets.nullables,o=function(i){var o=r[i];if(o.isTerminal)return"continue";n.forEachTermIn(t.rhs,i+1,function(t){null!=t&&e.add(o,t)})},s=0;s<r.length;s++)o(s);for(s=r.length-1;s>=0;s--)if(!r[s].isTerminal){for(var a=!0,u=s+1;u<r.length;u++){var l=r[u];if(l.isTerminal||!i.isNullable(l)){a=!1;break}}a&&this.add(r[s],t.nt)}},e}(Q),et=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rt=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},nt=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},it=function(){function t(e,r,n,i){void 0===i&&(i=null),this.grammar=e,this.label=r,this.isTerminal=n,this.isAuxiliary=!1,this.auxType=null,this.precedence=1,this.assocLeft=!0,this.creationId=-1,this.isTerminal=n,this.label=r,this.id=null==i?t.idCounter--:i}return t.prototype.compareTo=function(t){return this.label.localeCompare(t.label)},t.prototype.equals=function(t){return this.label==t.label},t.prototype.toString=function(){return this.label},t.idCounter=-1,t}(),ot=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.syms=t||[]}return t.prototype.append=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var i=et(r),o=i.next();!o.done;o=i.next()){var s=o.value;this.syms.push(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return this},t.prototype.extend=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var i=et(r),o=i.next();!o.done;o=i.next()){var s=o.value;this.append.apply(this,nt([],rt(s.syms),!1))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return this},t.prototype.copy=function(){return new(t.bind.apply(t,nt([void 0],rt(this.syms),!1)))},t.prototype.add=function(t){this.syms.push(t)},t.prototype.isTerminal=function(t){return this.syms[t].isTerminal},Object.defineProperty(t.prototype,"length",{get:function(){return this.syms.length},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this.syms.map(function(t){return t.toString()}).join(" ")},t.prototype.slice=function(e,r){return new(t.bind.apply(t,nt([void 0],rt(this.syms.slice(e,r)),!1)))},t.prototype.splice=function(t,e){for(var r,n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return(r=this.syms).splice.apply(r,nt([t,e],rt(n),!1)),this},t.prototype.compareTo=function(t){for(var e=0;e<this.syms.length&&e<t.syms.length;e++){var r=this.syms[e].compareTo(t.syms[e]);if(0!=r)return r}return this.syms.length-t.syms.length},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.containsAt=function(t,e){for(var r=0;r<e.length&&t+r<this.syms.length;r++)if(!this.syms[t+r].equals(e.syms[r]))return!1;return r==e.length},Object.defineProperty(t.prototype,"debugString",{get:function(){return this.syms.map(function(t){return t.label}).join(" ")},enumerable:!1,configurable:!0}),t}(),st=function(){function t(t){this.value=t}return Object.defineProperty(t.prototype,"isFunction",{get:function(){return"string"==typeof this.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChildPosition",{get:function(){return"number"==typeof this.value},enumerable:!1,configurable:!0}),t}(),at=function(){function t(t,e,r){if(void 0===r&&(r=null),this.nt=t,this.rhs=e,this.action=r,t.isTerminal)throw new Error("Cannot add rules to a terminal")}return Object.defineProperty(t.prototype,"debugString",{get:function(){return"".concat(this.nt.label," -> ").concat(this.rhs.debugString)},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.compareTo=function(t){r(!isNaN(this.id));var e=this.nt.compareTo(t.nt);return 0==e&&this.rhs.compareTo(t.rhs),e},t}(),ut=function(){function t(t){this.startSymbol=null,this.modified=!0,this.symbolSet=new q(function(t){return t.label}),this.allRules=[],this._rulesForNT=null,this._followSets=null,this._hasNull=!1,this.auxNTCount=0,t=t||{},this.auxNTPrefix=t.auxNTPrefix||"$",this.Null=this.newTerm(""),this.Eof=this.newTerm("$end")}return t.make=function(e){var r=new t;return e(r),r},t.prototype.rulesForNT=function(t){var e,n;if(r(!t.isTerminal),null==this._rulesForNT){this._rulesForNT={};try{for(var i=et(this.allRules),o=i.next();!o.done;o=i.next()){var s=o.value;s.nt.label in this._rulesForNT||(this._rulesForNT[s.nt.label]=[]),this._rulesForNT[s.nt.label].push(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}}return t.label in this._rulesForNT||(this._rulesForNT[t.label]=[]),this._rulesForNT[t.label]},Object.defineProperty(t.prototype,"nullables",{get:function(){return this.firstSets.nullables},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstSets",{get:function(){return this.followSets.firstSets},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"followSets",{get:function(){return(this.modified||null==this._followSets)&&this.refresh(),r(null!=this._followSets),this._followSets},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"augStartRule",{get:function(){return this._AugStartRule},enumerable:!1,configurable:!0}),t.prototype.augmentStartSymbol=function(t){void 0===t&&(t="$accept"),r(null==this._AugStartRule,"Ensure this grammar has not yet been augmented."),r(null!=this.startSymbol,"Start symbol not yet set");var e=this.newNT(t);return this._AugStartRule=new at(e,new ot(this.startSymbol)),this.addRule(this._AugStartRule,0),this},t.prototype.refresh=function(){return this.symbolSet.entries.forEach(function(t,e){return t.id=e}),this._rulesForNT=null,this.allRules.forEach(function(t,e){t.id=e}),this._followSets=new tt(this),this.modified=!1,this},t.prototype.addTerminals=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var i=et(r),o=i.next();!o.done;o=i.next()){var s=o.value;this.newTerm(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}},Object.defineProperty(t.prototype,"terminals",{get:function(){return this.symbolSet.entries.filter(function(t){return t.isTerminal})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allNonTerminals",{get:function(){return this.symbolSet.entries.filter(function(t){return!t.isTerminal})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nonTerminals",{get:function(){return this.symbolSet.entries.filter(function(t){return!t.isTerminal&&!t.isAuxiliary})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"auxNonTerminals",{get:function(){return this.symbolSet.entries.filter(function(t){return t.isAuxiliary})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allSymbols",{get:function(){return this.symbolSet.entries},enumerable:!1,configurable:!0}),t.prototype.forEachNT=function(t){var e,r;try{for(var n=et(this.symbolSet.entries),i=n.next();!i.done;i=n.next()){var o=i.value;if(!o.isTerminal&&0==t(o))return}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.forEachRule=function(t,e){for(var r=null==t?this.allRules:this.rulesForNT(t)||[],n=0;n<r.length;n++)if(0==e(r[n],n))return!1;return!0},t.prototype.getRule=function(t,e){return"string"==typeof t&&(t=this.getSym(t)),r(null!=t),this.rulesForNT(t)[e]},t.prototype.findRule=function(t,e){return this.rulesForNT(t).findIndex(function(r){return r.nt==t&&r.rhs.equals(e)})},t.prototype.add=function(t,e,r){void 0===r&&(r=null);var n=null;return"string"==typeof t?null==(n=this.getSym(t))&&(n=this.newNT(t)):n=this.ensureSym(t),this.addRule(new at(n,e,r))},t.prototype.addRule=function(t,e){if(void 0===e&&(e=-1),this.findRule(t.nt,t.rhs)>=0)throw new Error("Duplicate rule: "+t.debugString);return t.id=this.allRules.length,0==t.rhs.length&&(this._hasNull=!0),e<0?this.allRules.push(t):this.allRules.splice(e,0,t),this._rulesForNT=null,this.modified=!0,t},t.prototype.removeRules=function(t){return this.allRules=this.allRules.filter(function(e){return!t(e)}),this._rulesForNT=null,this.modified=!0,!0},t.prototype.removeSymbols=function(t){var e=!1,r=[];return this.allRules.forEach(function(n){if(!t(n.nt))if(0==n.rhs.length)r.push(n);else{var i=new(ot.bind.apply(ot,nt([void 0],rt(n.rhs.syms.filter(function(e){return!t(e)})),!1)));e=e||n.rhs.length!=i.length,i.length>0&&r.push(new at(n.nt,i))}}),this.allRules=r,e=this.symbolSet.remove(t)||e,this.modified=this.modified||e,e},t.prototype.getSymById=function(t){return this.symbolSet.get(t)},t.prototype.getSym=function(t){return this.symbolSet.getByKey(t)},t.prototype.ensureSym=function(t,e){void 0===e&&(e=!1);var n=this.symbolSet.ensure(t,e);return t==n?n.creationId<0&&(n.creationId=this.symbolSet.size):r(!e,"Should have already thrown error"),n},t.prototype.T=function(t,e){void 0===e&&(e=!1);var r=this.getSym(t);if(null!=r){if(e)throw new Error("Terminal ".concat(t," is already exists"));if(!r.isTerminal)throw new Error("Symbol (".concat(t,") already exists as a non-terminal"))}else r=new it(this,t,!0),r=this.ensureSym(r,!0);return r},t.prototype.NT=function(t,e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=this.getSym(t);if(null!=n){if(r)throw new Error("Non-terminal ".concat(t," is already exists"));if(n.isTerminal)throw new Error("Symbol (".concat(t,") already exists as a terminal"))}else(n=new it(this,t,!1)).isAuxiliary=e,n=this.ensureSym(n,!0),e||null!=this.startSymbol||(this.startSymbol=n);return n},t.prototype.newTerm=function(t){return this.T(t,!0)},t.prototype.newNT=function(t,e){return void 0===e&&(e=!1),this.NT(t,e,!0)},t.prototype.isTerminal=function(t){var e=this.getSym(t);return null!=e&&e.isTerminal},t.prototype.isNT=function(t){var e=this.getSym(t);return null!=e&&!e.isTerminal&&!e.isAuxiliary},t.prototype.isAuxNT=function(t){var e=this.getSym(t);return null!=e&&!e.isTerminal&&e.isAuxiliary},t.prototype.seq=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];if(1==r.length)return this.normalizeRule(r[0]);var i=new ot;try{for(var o=et(r),s=o.next();!s.done;s=o.next())for(var a=s.value,u=this.normalizeRule(a),l=0;l<u.length;l++)i.add(u.syms[l])}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return i},t.prototype.anyof=function(){for(var t=this,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return 1==e.length?this.normalizeRule(e[0]):new ot(this.ensureAuxNT.apply(this,nt([],rt(e.map(function(e){return t.normalizeRule(e)})),!1)))},t.prototype.opt=function(t){var e=this.anyof(t,new ot),n=e.syms[0];return r(1==e.syms.length&&n.isAuxiliary,"NT must be an auxiliary symbol"),n.auxType="opt",e},t.prototype.atleast0=function(t,e){var r=this;void 0===e&&(e=!0);var n=this.normalizeRule(t),i=this.findAuxNT(function(e){var i=r.rulesForNT(e);if(2!=i.length)return!1;var o=0;if(0==i[0].rhs.length)o=1;else{if(0!=i[1].rhs.length)return!1;o=0}var s=i[o].rhs;return s.length==1+t.length&&(s.syms[0].equals(e)?s.containsAt(1,n):!!s.syms[s.length-1].equals(e)&&s.containsAt(0,n))});return null==i&&((i=this.newAuxNT()).auxType=e?"atleast0:left":"atleast0",this.add(i,new ot),e?this.add(i,new ot(i).extend(n)):this.add(i,n.copy().append(i))),new ot(i)},t.prototype.atleast1=function(t,e){var r=this;void 0===e&&(e=!0);var n=this.normalizeRule(t),i=this.findAuxNT(function(e){var i=r.rulesForNT(e);if(2!=i.length)return!1;var o=0;if(i[0].rhs.equals(n))o=1;else{if(!i[1].rhs.equals(n))return!1;o=0}var s=i[o].rhs;return s.length==1+t.length&&(s.syms[0].equals(e)?s.containsAt(1,n):!!s.syms[s.length-1].equals(e)&&s.containsAt(0,n))});return null==i&&((i=this.newAuxNT()).auxType=e?"atleast1:left":"atleast1",this.add(i,n),e?this.add(i,new ot(i).extend(n)):this.add(i,n.copy().append(i))),new ot(i)},t.prototype.normalizeRule=function(t){if("string"==typeof t){var e=this.getSym(t);if(null==e)throw new Error("Invalid symbol: '".concat(t,"'"));return new ot(e)}return t},t.prototype.newAuxNTName=function(){return this.auxNTPrefix+this.auxNTCount++},t.prototype.newAuxNT=function(t){return void 0===t&&(t=""),""==t&&(t=this.newAuxNTName()),this.newNT(t,!0)},t.prototype.ensureAuxNT=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=this.findAuxNTByRules.apply(this,nt([],rt(r),!1));if(null==i){(i=this.newAuxNT()).auxType="anyof";try{for(var o=et(r),s=o.next();!s.done;s=o.next()){var a=s.value;this.add(i,a)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}}return i},t.prototype.findAuxNT=function(t){var e,r;try{for(var n=et(this.symbolSet.entries),i=n.next();!i.done;i=n.next()){var o=i.value;if(o.isAuxiliary&&t(o))return o}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return null},t.prototype.findAuxNTByRules=function(){for(var t=this,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this.findAuxNT(function(r){var n=t.rulesForNT(r);if(n.length!=e.length)return!1;for(var i=0;i<n.length;i++)if(!n[i].rhs.equals(e[i]))return!1;return!0})},t.prototype.print=function(t){void 0===t&&(t=null);var e=(t=t||{}).ruleSep||"->",r=t.includeSemiColon||!1,n=t.lambdaSymbol||"",i=[];return this.forEachRule(null,function(t,o){var s="".concat(t.nt.label," ").concat(e," ");t.rhs.length>0?s+=t.rhs.debugString:s+=n,r&&(s+=" ;"),i.push(s)}),i},Object.defineProperty(t.prototype,"debugValue",{get:function(){var t=[];return this.forEachRule(null,function(e,r){t.push("".concat(e.nt.label," -> ").concat(e.rhs.debugString))}),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"terminalDerivingSymbols",{get:function(){for(var t,e,r,n,i=new Y(this,null),o=-1,s=!0;0!=o;){o=0;try{for(var a=(t=void 0,et(this.allRules)),u=a.next();!u.done;u=a.next()){var l=u.value;s=!0;try{for(var h=(r=void 0,et(l.rhs.syms)),c=h.next();!c.done;c=h.next()){var p=c.value;i.has(p)||(p.isTerminal?(i.add(p),o++):s=!1)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}s&&!i.has(l.nt)&&(i.add(l.nt),o++)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}}return i},enumerable:!1,configurable:!0}),t.prototype.reachableSymbols=function(t){var e,n,i,o,s,a;void 0===t&&(t=null),null==t&&(t=this._AugStartRule?this._AugStartRule.nt:this.startSymbol),r(null!=t,"Start symbol does not exist");for(var u=new Y(this,!1).add(t),l=[t];l.length>0;){var h=[];try{for(var c=(e=void 0,et(l)),p=c.next();!p.done;p=c.next()){var f=p.value;try{for(var d=(i=void 0,et(this.rulesForNT(f))),m=d.next();!m.done;m=d.next()){var y=m.value;try{for(var g=(s=void 0,et(y.rhs.syms)),v=g.next();!v.done;v=g.next()){var x=v.value;x.isTerminal||u.has(x)||(h.push(x),u.add(x))}}catch(t){s={error:t}}finally{try{v&&!v.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}}}catch(t){i={error:t}}finally{try{m&&!m.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}}catch(t){e={error:t}}finally{try{p&&!p.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}l=h}return u},Object.defineProperty(t.prototype,"cycles",{get:function(){var t=this;return z(this.allNonTerminals,function(t){return t.label},function(e){var r=[];return t.forEachRule(e,function(n,i){n.rhs.syms.forEach(function(o,s){o.isTerminal||t.nullables.isStrNullable(n.rhs,0,s-1)&&t.nullables.isStrNullable(n.rhs,s+1)&&r.push([o,[e,i]])})}),r})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftRecursion",{get:function(){var t=this;return z(this.allNonTerminals,function(t){return t.id},function(e){var r=[];return t.forEachRule(e,function(e,n){e.rhs.syms.forEach(function(e,i){if(!e.isTerminal)return r.push([e,n]),t.nullables.isNullable(e)})}),r})},enumerable:!1,configurable:!0}),t}(),lt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){t[t.WORD_CHAR=0]="WORD_CHAR",t[t.DIGITS=1]="DIGITS",t[t.SPACES=2]="SPACES"}(V||(V={}));var ht,ct,pt="0".charCodeAt(0),ft="9".charCodeAt(0),dt="a".charCodeAt(0),mt="z".charCodeAt(0),yt="A".charCodeAt(0),gt="Z".charCodeAt(0),vt="_".charCodeAt(0),xt=function(){function t(){}return t.prototype.matches=function(t,e){var r=this.match(t);return e?!r:r},t}(),bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.match=function(t){if(t>=8192&&t<=8202)return!0;for(var e=0;e<14;e++)if(" \f\n\r\t\v  \u2028\u2029   \ufeff".charCodeAt(e)==t)return!0;return!1},e.prototype.reString=function(t){return t?"\\S":"\\s"},e}(xt),Et=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.match=function(t){return t>=pt&&t<=ft},e.prototype.reString=function(t){return t?"\\D":"\\d"},e}(xt),Ct=[new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),e.prototype.match=function(t){return t==vt||t>=pt&&t<=ft||t>=dt&&t<=mt||t>=yt&&t<=gt},e.prototype.reString=function(t){return t?"\\W":"\\w"},e}(xt)),new Et,new bt];!function(t){t[t.gc=0]="gc",t[t.General_Category=0]="General_Category",t[t.sc=1]="sc",t[t.Script=1]="Script",t[t.scx=2]="scx",t[t.Script_Extension=2]="Script_Extension",t[t.Any=3]="Any",t[t.ASCII=4]="ASCII",t[t.AHex=5]="AHex",t[t.ASCII_Hex_Digit=5]="ASCII_Hex_Digit",t[t.Alpha=6]="Alpha",t[t.Alphabetic=6]="Alphabetic",t[t.Bidi_M=7]="Bidi_M",t[t.Bidi_Mirrored=7]="Bidi_Mirrored",t[t.Bidi_C=8]="Bidi_C",t[t.Bidi_Control=8]="Bidi_Control",t[t.CI=9]="CI",t[t.Case_Ignorable=9]="Case_Ignorable",t[t.Cased=10]="Cased",t[t.CWCF=11]="CWCF",t[t.Changes_When_Casefolded=11]="Changes_When_Casefolded",t[t.CWCM=12]="CWCM",t[t.Changes_When_Casemapped=12]="Changes_When_Casemapped",t[t.CWL=13]="CWL",t[t.Changes_When_Lowercased=13]="Changes_When_Lowercased",t[t.CWKCF=14]="CWKCF",t[t.Changes_When_NFKC_Casefolded=14]="Changes_When_NFKC_Casefolded",t[t.CWT=15]="CWT",t[t.Changes_When_Titlecased=15]="Changes_When_Titlecased",t[t.CWU=16]="CWU",t[t.Changes_When_Uppercased=16]="Changes_When_Uppercased",t[t.Dash=17]="Dash",t[t.DI=18]="DI",t[t.Default_Ignorable_Code_Point=18]="Default_Ignorable_Code_Point",t[t.Dep=19]="Dep",t[t.Deprecated=19]="Deprecated",t[t.Dia=20]="Dia",t[t.Diacritic=20]="Diacritic",t[t.Emoji=21]="Emoji",t[t.Emoji_Component=22]="Emoji_Component",t[t.Emoji_Modifier=23]="Emoji_Modifier",t[t.Emoji_Modifier_Base=24]="Emoji_Modifier_Base",t[t.Emoji_Presentation=25]="Emoji_Presentation",t[t.Ext=26]="Ext",t[t.Extender=26]="Extender",t[t.Gr_Base=27]="Gr_Base",t[t.Grapheme_Base=27]="Grapheme_Base",t[t.Gr_Ext=28]="Gr_Ext",t[t.Grapheme_Extend=28]="Grapheme_Extend",t[t.Hex=29]="Hex",t[t.Hex_Digit=29]="Hex_Digit",t[t.IDSB=30]="IDSB",t[t.IDS_Binary_Operator=30]="IDS_Binary_Operator",t[t.IDST=31]="IDST",t[t.IDS_Trinary_Operator=31]="IDS_Trinary_Operator",t[t.IDC=32]="IDC",t[t.ID_Continue=32]="ID_Continue",t[t.IDS=33]="IDS",t[t.ID_Start=33]="ID_Start",t[t.Ideo=34]="Ideo",t[t.Ideographic=34]="Ideographic",t[t.Join_C=35]="Join_C",t[t.Join_Control=35]="Join_Control",t[t.LOE=36]="LOE",t[t.Logical_Order_Exception=36]="Logical_Order_Exception",t[t.Lower=37]="Lower",t[t.Lowercase=37]="Lowercase",t[t.Math=38]="Math",t[t.NChar=39]="NChar",t[t.Noncharacter_Code_Point=39]="Noncharacter_Code_Point",t[t.Pat_Syn=40]="Pat_Syn",t[t.Pattern_Syntax=40]="Pattern_Syntax",t[t.Pat_WS=41]="Pat_WS",t[t.Pattern_White_Space=41]="Pattern_White_Space",t[t.QMark=42]="QMark",t[t.Quotation_Mark=42]="Quotation_Mark",t[t.Radical=43]="Radical",t[t.RI=44]="RI",t[t.Regional_Indicator=44]="Regional_Indicator",t[t.STerm=45]="STerm",t[t.Sentence_Terminal=45]="Sentence_Terminal",t[t.SD=46]="SD",t[t.Soft_Dotted=46]="Soft_Dotted",t[t.Term=47]="Term",t[t.Terminal_Punctuation=47]="Terminal_Punctuation",t[t.UIdeo=48]="UIdeo",t[t.Unified_Ideograph=48]="Unified_Ideograph",t[t.Upper=49]="Upper",t[t.Uppercase=49]="Uppercase",t[t.VS=50]="VS",t[t.Variation_Selector=50]="Variation_Selector",t[t.space=51]="space",t[t.White_Space=51]="White_Space",t[t.XIDC=52]="XIDC",t[t.XID_Continue=52]="XID_Continue",t[t.XIDS=53]="XIDS",t[t.XID_Start=53]="XID_Start"}(ht||(ht={})),function(t){t[t.LC=0]="LC",t[t.Cased_Letter=0]="Cased_Letter",t[t.Pe=1]="Pe",t[t.Close_Punctuation=1]="Close_Punctuation",t[t.Pc=2]="Pc",t[t.Connector_Punctuation=2]="Connector_Punctuation",t[t.Cc=3]="Cc",t[t.cntrl=3]="cntrl",t[t.Control=3]="Control",t[t.Sc=4]="Sc",t[t.Currency_Symbol=4]="Currency_Symbol",t[t.Pd=5]="Pd",t[t.Dash_Punctuation=5]="Dash_Punctuation",t[t.Nd=6]="Nd",t[t.digit=6]="digit",t[t.Decimal_Number=6]="Decimal_Number",t[t.Me=7]="Me",t[t.Enclosing_Mark=7]="Enclosing_Mark",t[t.Pf=8]="Pf",t[t.Final_Punctuation=8]="Final_Punctuation",t[t.Cf=9]="Cf",t[t.Format=9]="Format",t[t.Pi=10]="Pi",t[t.Initial_Punctuation=10]="Initial_Punctuation",t[t.L=11]="L",t[t.Letter=11]="Letter",t[t.Nl=12]="Nl",t[t.Letter_Number=12]="Letter_Number",t[t.Zl=13]="Zl",t[t.Line_Separator=13]="Line_Separator",t[t.Ll=14]="Ll",t[t.Lowercase_Letter=14]="Lowercase_Letter",t[t.M=15]="M",t[t.Combining_Mark=15]="Combining_Mark",t[t.Mark=16]="Mark",t[t.Sm=17]="Sm",t[t.Math_Symbol=17]="Math_Symbol",t[t.Lm=18]="Lm",t[t.Modifier_Letter=18]="Modifier_Letter",t[t.Sk=19]="Sk",t[t.Modifier_Symbol=19]="Modifier_Symbol",t[t.Mn=20]="Mn",t[t.Nonspacing_Mark=20]="Nonspacing_Mark",t[t.N=21]="N",t[t.Number=21]="Number",t[t.Ps=22]="Ps",t[t.Open_Punctuation=22]="Open_Punctuation",t[t.C=23]="C",t[t.Other=23]="Other",t[t.Lo=24]="Lo",t[t.Other_Letter=24]="Other_Letter",t[t.No=25]="No",t[t.Other_Number=25]="Other_Number",t[t.Po=26]="Po",t[t.Other_Punctuation=26]="Other_Punctuation",t[t.So=27]="So",t[t.Other_Symbol=27]="Other_Symbol",t[t.Zp=28]="Zp",t[t.Paragraph_Separator=28]="Paragraph_Separator",t[t.Co=29]="Co",t[t.Private_Use=29]="Private_Use",t[t.P=30]="P",t[t.punct=30]="punct",t[t.Punctuation=30]="Punctuation",t[t.Z=31]="Z",t[t.Separator=31]="Separator",t[t.Zs=32]="Zs",t[t.Space_Separator=32]="Space_Separator",t[t.Mc=33]="Mc",t[t.Spacing_Mark=33]="Spacing_Mark",t[t.Cs=34]="Cs",t[t.Surrogate=34]="Surrogate",t[t.S=35]="S",t[t.Symbol=35]="Symbol",t[t.Lt=36]="Lt",t[t.Titlecase_Letter=36]="Titlecase_Letter",t[t.Cn=37]="Cn",t[t.Unassigned=37]="Unassigned",t[t.Lu=38]="Lu",t[t.Uppercase_Letter=38]="Uppercase_Letter"}(ct||(ct={}));var St,wt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),At=function(){return At=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},At.apply(this,arguments)},Dt=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kt=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},_t=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};!function(t){t[t.START_OF_INPUT=0]="START_OF_INPUT",t[t.END_OF_INPUT=1]="END_OF_INPUT",t[t.START_OF_WORD=2]="START_OF_WORD",t[t.END_OF_WORD=3]="END_OF_WORD",t[t.UNION=4]="UNION",t[t.CAT=5]="CAT",t[t.VAR=6]="VAR",t[t.BACK_NAMED_REF=7]="BACK_NAMED_REF",t[t.BACK_NUM_REF=8]="BACK_NUM_REF",t[t.QUANT=9]="QUANT",t[t.LOOK_AHEAD=10]="LOOK_AHEAD",t[t.LOOK_BACK=11]="LOOK_BACK",t[t.CHAR=12]="CHAR"}(St||(St={}));var Tt,Ft=function(){function t(){this.parent=null,this.reString=null,this.groupIndex=-1,this.groupName=null,this.groupIsSilent=!1,this.ignoreCase=null,this.dotAll=null,this.multiline=null}return t.prototype.setOptions=function(t){return"dotAll"in t&&(this.dotAll=t.dotAll),"ignoreCase"in t&&(this.ignoreCase=t.ignoreCase),"groupIndex"in t&&(this.groupIndex=t.groupIndex),"multiline"in t&&(this.multiline=t.multiline),this},t.prototype.debugValue=function(){var t={};return this.dotAll&&(t.dotAll=!0),this.ignoreCase&&(t.ignoreCase=!0),this.multiline&&(t.multiline=!0),this.groupIndex>=0&&(t.groupIndex=this.groupIndex),t},Object.defineProperty(t.prototype,"isVariable",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toString",{get:function(){return null==this.reString&&(this.reString=this.evalREString()),this.reString},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"modifiers",{get:function(){var t="";return this.dotAll&&(t+="d"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.groupIndex>=0&&(t+="g:"+this.groupIndex),0==t.length?t:"<"+t+">"},enumerable:!1,configurable:!0}),t}(),It=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=St.START_OF_INPUT,e}return wt(e,t),e.prototype.debugValue=function(){return"^"},e.prototype.reverse=function(){return this},e.prototype.evalREString=function(){return"^"},e}(Ft),Ot=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=St.END_OF_INPUT,e}return wt(e,t),e.prototype.debugValue=function(){return"$"},e.prototype.evalREString=function(){return"$"},e.prototype.reverse=function(){return this},e}(Ft),Nt=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=St.START_OF_WORD,e}wt(e,t),e.prototype.debugValue=function(){return"\\b"},e.prototype.reverse=function(){return this},e.prototype.evalREString=function(){return"\\b"}}(Ft),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=St.END_OF_WORD,e}wt(e,t),e.prototype.debugValue=function(){return"\\b"},e.prototype.reverse=function(){return this},e.prototype.evalREString=function(){return"\\b"}}(Ft),function(t){function e(e,r,n){void 0===n&&(n=!1);var i=t.call(this)||this;return i.expr=e,i.cond=r,i.negate=n,i}return wt(e,t),e}(Ft)),Bt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=St.LOOK_AHEAD,e}return wt(e,t),e.prototype.evalREString=function(){return"".concat(this.expr.toString,"(?").concat(this.negate?"!":"=").concat(this.cond.toString,")")},e.prototype.debugValue=function(){return["LookAhead",At(At({},t.prototype.debugValue.call(this)),{negate:this.negate,expr:this.expr.debugValue(),cond:this.cond.debugValue()})]},e.prototype.reverse=function(){return new Rt(this.expr.reverse(),this.cond.reverse(),this.negate)},e}(Nt),Rt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=St.LOOK_BACK,e}return wt(e,t),e.prototype.evalREString=function(){return"(?<".concat(this.negate?"!":"=").concat(this.cond.toString,")").concat(this.expr.toString)},e.prototype.debugValue=function(){return["LookBack",At(At({},t.prototype.debugValue.call(this)),{negate:this.negate,expr:this.expr.debugValue(),cond:this.cond.debugValue()})]},e.prototype.reverse=function(){return new Bt(this.expr.reverse(),this.cond.reverse(),this.negate)},e}(Nt),Pt=function(t){function e(e,r,n,i){void 0===r&&(r=1),void 0===n&&(n=1),void 0===i&&(i=!0);var o=t.call(this)||this;return o.expr=e,o.minCount=r,o.maxCount=n,o.greedy=i,o.tag=St.QUANT,o}return wt(e,t),Object.defineProperty(e.prototype,"isUnlimited",{get:function(){return this.maxCount<0||this.maxCount==n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isVariable",{get:function(){return this.minCount!=this.maxCount||!this.expr.isVariable},enumerable:!1,configurable:!0}),e.prototype.reverse=function(){return new e(this.expr.reverse(),this.minCount,this.maxCount,this.greedy)},e.prototype.evalREString=function(){var t="*";return 1==this.minCount&&this.isUnlimited?t="+":0==this.minCount&&this.isUnlimited?t="*":0==this.minCount&&1==this.maxCount?t="?":1==this.minCount&&1==this.maxCount||(t=this.minCount==this.maxCount?"{".concat(this.minCount,"}"):"{".concat(this.minCount,",").concat(this.isUnlimited?"":this.maxCount,"}")),"".concat(this.expr.toString).concat(t)},e.prototype.debugValue=function(){var e="*";return 1==this.minCount&&this.isUnlimited?e=this.greedy?"+?":"+":0==this.minCount&&this.isUnlimited?e=this.greedy?"*?":"*":0==this.minCount&&1==this.maxCount?e=this.greedy?"??":"?":1==this.minCount&&1==this.maxCount||(e=this.minCount==this.maxCount?"{".concat(this.minCount,"}")+(this.greedy?"?":""):"{".concat(this.minCount,",").concat(this.maxCount,"}")+(this.greedy?"?":"")),[e,t.prototype.debugValue.call(this),this.expr.debugValue()]},e}(Ft),Lt=function(t){function e(){for(var e,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=t.call(this)||this;o.tag=St.CAT,o.children=[];try{for(var s=Dt(n),a=s.next();!a.done;a=s.next()){var u=a.value;o.add(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return o}return wt(e,t),Object.defineProperty(e.prototype,"isVariable",{get:function(){var t,e;try{for(var r=Dt(this.children),n=r.next();!n.done;n=r.next())if(n.value.isVariable)return!0}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return!1},enumerable:!1,configurable:!0}),e.prototype.evalREString=function(){var t=this.children.map(function(t){return t.toString}).join("");return this.children.length>1?"("+t+")":t},e.prototype.reverse=function(){var t=this.children.map(function(t){return t.reverse()});return t.reverse(),new(e.bind.apply(e,_t([void 0],kt(t),!1)))},e.prototype.add=function(t){var e,r;if(t.tag!=St.CAT||t.groupIndex>=0)this.children.push(t);else try{for(var n=Dt(t.children),i=n.next();!i.done;i=n.next()){var o=i.value;this.add(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},e.prototype.debugValue=function(){return["Cat",At({},t.prototype.debugValue.call(this)),this.children.map(function(t){return t.debugValue()})]},e}(Ft),Mt=function(t){function e(){for(var e,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=t.call(this)||this;o.tag=St.UNION,o.options=[];try{for(var s=Dt(n),a=s.next();!a.done;a=s.next()){var u=a.value;o.add(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return o}return wt(e,t),Object.defineProperty(e.prototype,"isVariable",{get:function(){var t,e;try{for(var r=Dt(this.options),n=r.next();!n.done;n=r.next())if(n.value.isVariable)return!0}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return!1},enumerable:!1,configurable:!0}),e.prototype.evalREString=function(){var t=this.options.map(function(t){return t.toString}).join("|");return this.options.length>1?"("+t+")":t},e.prototype.reverse=function(){var t=this.options.map(function(t){return t.reverse()});return new(e.bind.apply(e,_t([void 0],kt(t),!1)))},e.prototype.add=function(t){var e,r;if(t.tag!=St.UNION||t.groupIndex>=0)this.options.push(t);else try{for(var n=Dt(t.options),i=n.next();!i.done;i=n.next()){var o=i.value;this.add(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},e.prototype.debugValue=function(){return["Union",At({},t.prototype.debugValue.call(this)),this.options.map(function(t){return t.debugValue()})]},e}(Ft);!function(t){t[t.AnyChar=1]="AnyChar",t[t.SingleChar=2]="SingleChar",t[t.CharRange=3]="CharRange",t[t.PropertyEscape=4]="PropertyEscape",t[t.CharClass=5]="CharClass",t[t.Union=6]="Union",t[t.Intersection=7]="Intersection"}(Tt||(Tt={}));var Ut=function(t){function e(e,r){void 0===r&&(r=!1);var n=t.call(this)||this;return n.op=e,n.neg=r,n.tag=St.CHAR,n}return wt(e,t),e.prototype.match=function(t){var e=this.matchChar(t);return e&&!this.neg||this.neg&&!e},e.prototype.reverse=function(){return this},e.prototype.debugValue=function(){return this.toString+this.modifiers},e}(Ft),jt=function(t){function e(e,r,n){void 0===r&&(r=!1),void 0===n&&(n=[]);var i=t.call(this,e,r)||this;return i.op=e,i.neg=r,i.args=n,i}return wt(e,t),e.Any=function(t){return void 0===t&&(t=!1),new e(Tt.AnyChar,t)},e.Class=function(t,r){return void 0===r&&(r=!1),new e(Tt.CharClass,r,[t])},e.Single=function(t,r){return void 0===r&&(r=!1),"string"==typeof t&&(t=t.charCodeAt(0)),new e(Tt.SingleChar,r,[t])},e.PropertyEscape=function(t,r,n){return void 0===n&&(n=!1),"string"==typeof t&&(t=function(t){if(!((t=t.trim())in ht))throw new SyntaxError("Invalid property name: "+t);return ht[t]}(t)),"string"==typeof r&&(r=function(t){if(!((t=t.trim())in ct))throw new SyntaxError("Invalid property value: "+t);return ct[t]}(r)),new e(Tt.PropertyEscape,n,[t,r])},e.prototype.matchChar=function(t){var e=this.args;switch(this.op){case Tt.SingleChar:return t==this.args[0];case Tt.CharClass:return Ct[e[0]].matches(t,!1);case Tt.PropertyEscape:throw new Error("Property Escape Matching - TBD");default:throw new Error("Custom Chars - TBD i: "+this.op)}return!1},e.prototype.compareTo=function(t){if(this.op!=t.op)return this.op-t.op;for(var e=0;e<this.args.length&&e<t.args.length;e++)if(this.args[e]!=t.args[e])return this.args[e]-t.args[e];return this.args.length-t.args.length},e.prototype.evalREString=function(){return this.op==Tt.AnyChar?".":this.op==Tt.SingleChar?(t=this.args[0],String.fromCharCode(t).replace("\n","\\n").replace("\0","\\0").replace("\r","\\r").replace("\t","\\t").replace("\f","\\f").replace("\b","\\b")):this.op==Tt.CharClass?Ct[this.args[0]].reString(this.neg):this.op==Tt.PropertyEscape?this.neg?"\\P{":"\\p{}":"Custom "+this.args.join(" ");var t},e}(Ut),zt=function(t){function e(e,r,n){void 0===r&&(r=!1),void 0===n&&(n=[]);var i=t.call(this,e,r)||this;return i.op=e,i.neg=r,i.chars=n,i}return wt(e,t),e.prototype.compareTo=function(t){if(this.op!=t.op)return this.op-t.op;for(var e=0;e<this.chars.length&&e<t.chars.length;e++){var r=this.chars[e].compareTo(t.chars[e]);if(0!=r)return r}return this.chars.length-t.chars.length},e.prototype.matchChar=function(t){var e=this.chars;switch(this.op){case Tt.CharRange:return t>=e[0].args[0]&&t<=e[1].args[0];case Tt.Union:for(var r=0;r<e.length;r++)if(e[r].match(t))return!0;return!1;case Tt.Intersection:for(r=0;r<e.length;r++)if(!e[r].match(t))return!1;return!0;default:throw new Error("Custom CharGroup - TBD i: "+this.op)}return!1},e.prototype.evalREString=function(){var t=this.chars.map(function(t){return t.debugValue()}).join("");return this.op==Tt.CharRange?"".concat(this.chars[0].toString,"-").concat(this.chars[1].toString):this.op==Tt.Union||this.op==Tt.Intersection?t.length>1?(this.neg?"[^":"[")+t+"]":t:"Custom "+this.chars.join(" ")},e.Range=function(t,r,n){return void 0===n&&(n=!1),new e(Tt.CharRange,n,[t,r])},e.Union=function(t,r){return void 0===t&&(t=!1),new e(Tt.Union,t,r)},e.Intersection=function(t,r){return void 0===t&&(t=!1),new e(Tt.Intersection,t,r)},e}(Ut),Jt=function(t){function e(e,r){void 0===r&&(r=!1);var n=t.call(this)||this;return n.name=e,n.reversed=r,n.tag=St.VAR,n}return wt(e,t),e.prototype.reverse=function(){return new e(this.name,!this.reversed)},e.prototype.evalREString=function(){return"<"+this.name+">"},e.prototype.debugValue=function(){return["V:"+this.name,At({},t.prototype.debugValue.call(this))]},e}(Ft),Vt=function(t){function e(e,r){void 0===r&&(r=!1);var n=t.call(this)||this;return n.name=e,n.reversed=r,n.tag=St.BACK_NAMED_REF,n}return wt(e,t),e.prototype.reverse=function(){return new e(this.name,!this.reversed)},e.prototype.evalREString=function(){return"\\k<"+this.name+">"},e.prototype.debugValue=function(){return At(At({},t.prototype.debugValue),{BackRef:this.name})},e}(Ft),Xt=function(t){function e(e,r){void 0===r&&(r=!1);var n=t.call(this)||this;return n.num=e,n.reversed=r,n.tag=St.BACK_NUM_REF,n}return wt(e,t),e.prototype.reverse=function(){return new e(this.num,!this.reversed)},e.prototype.evalREString=function(){return"\\"+this.num},e.prototype.debugValue=function(){return"\\"+this.num},e}(Ft),Gt=function(){function t(t,e){this.expr=t,this.skip=!1,e=e||{},this.tag=e.tag||null,0==e.priority?this.priority=0:this.priority=e.priority||10,0==e.matchIndex?this.matchIndex=0:this.matchIndex=e.matchIndex||-1,this.skip=e.skip||!1,this.activeStates=e.activeStates||null}return t.prototype.stateCanActivate=function(t){return null==this.activeStates||0==this.activeStates.size||this.activeStates.has("*")||this.activeStates.has(t)},Object.defineProperty(t.prototype,"needsSpecificStates",{get:function(){return null!=this.activeStates&&this.activeStates.size>0&&!this.activeStates.has("*")},enumerable:!1,configurable:!0}),t}(),Wt=function(){return Wt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Wt.apply(this,arguments)},Ht=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Kt=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};function qt(t){return"\r"==t||"\n"==t||"\u2028"==t||"\u2029"==t}var Yt,$t=function(t,e,r,n){void 0===t&&(t=10),void 0===e&&(e=-1),void 0===r&&(r=-1),void 0===n&&(n=-1),this.priority=t,this.matchIndex=e,this.start=r,this.end=n,this.groups=[],this.positions=[]};!function(t){t[t.Any=0]="Any",t[t.AnyNonNL=1]="AnyNonNL",t[t.Char=2]="Char",t[t.CIChar=3]="CIChar",t[t.Match=4]="Match",t[t.Noop=5]="Noop",t[t.Save=6]="Save",t[t.Split=7]="Split",t[t.Jump=8]="Jump",t[t.Begin=9]="Begin",t[t.RBegin=10]="RBegin",t[t.End=11]="End",t[t.StartingChar=12]="StartingChar",t[t.EndingChar=13]="EndingChar",t[t.MLStartingChar=14]="MLStartingChar",t[t.MLEndingChar=15]="MLEndingChar",t[t.StartOfWord=16]="StartOfWord",t[t.EndOfWord=17]="EndOfWord",t[t.GroupStart=18]="GroupStart",t[t.GroupEnd=19]="GroupEnd",t[t.EnsureState=20]="EnsureState"}(Yt||(Yt={}));var Qt=function(){function t(t,e){void 0===t&&(t="INITIAL"),void 0===e&&(e=!0),this.startCondition=t,this.scIsInclusive=e,this.instrs=[],this.stateMapping=new Map,this.registerState("INITIAL"),this.registerState(t)}return Object.defineProperty(t.prototype,"length",{get:function(){return this.instrs.length},enumerable:!1,configurable:!0}),t.prototype.registerState=function(t){return this.stateMapping.has(t)||this.stateMapping.set(t,this.stateMapping.size),this.stateMapping.get(t)||-1},t.prototype.add=function(t,e){var r;void 0===e&&(e=null);for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o=(r=new Zt(t,e)).add.apply(r,Kt([],Ht(n),!1));return o.offset=this.instrs.length,this.instrs.push(o),o},t.with=function(e){var r=new t;return e(r),r},t.prototype.debugValue=function(t){return void 0===t&&(t=re),t?this.instrs.map(function(e,r){return e.comment.trim().length>0?"L".concat(r,": ").concat(t(e)," # ").concat(e.comment):"L".concat(r,": ").concat(t(e))}):this.instrs.map(function(t,e){return"L".concat(e,": ").concat(t.debugValue)})},t}(),Zt=function(){function t(t,e){void 0===e&&(e=null),this.opcode=t,this.char=e,this.offset=0,this.comment="",this.args=[],this.char=e}return t.prototype.add=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(t=this.args).push.apply(t,Kt([],Ht(e),!1)),this},Object.defineProperty(t.prototype,"debugValue",{get:function(){var t=this.comment.trim();return t.length>0&&(t=" # "+t),"".concat(this.opcode," ").concat(this.args.join(" ")," ").concat(this.char||""," ").concat(t)},enumerable:!1,configurable:!0}),t}(),te=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.offset=t,this.gen=e,this.parentId=-1,this.id=0,this.priority=0,this.groups=[],this.positions=[],this.registers={}}return t.prototype.regIncr=function(t){if(!(t in this.registers))throw new Error("Register at offset ".concat(t," is invalid"));this.registers[t]++},t.prototype.regAcquire=function(t){if(t in this.registers)throw new Error("Register at offset ".concat(t," already acquired. Release it first"));this.registers[t]=0},t.prototype.regRelease=function(t){if(!(t in this.registers))throw new Error("Register at offset ".concat(t," is invalid"));delete this.registers[t]},t.prototype.regValue=function(t){if(!(t in this.registers))throw new Error("Register at offset ".concat(t," is invalid"));return this.registers[t]},t}(),ee=function(){function t(t,e,r,n,i){void 0===e&&(e=0),void 0===r&&(r=-1),void 0===n&&(n=!0),void 0===i&&(i={}),this.prog=t,this.start=e,this.end=r,this.forward=n,this.threadCounter=0,this.currThreads=[],this.nextThreads=[],this.startPos=0,this.currState=0,this.gen=0,this.genForOffset={},r<0&&(r=t.length-1),this.end=r}return t.prototype.savePosition=function(t,e,r){for(;t.positions.length<=e;)t.positions.push(-1);t.positions[e]=r},t.prototype.jumpBy=function(t,e){return void 0===e&&(e=1),this.jumpTo(t,t.offset+e)},t.prototype.jumpTo=function(t,e){var r=new te(e,this.gen);return r.id=t.id,r.parentId=t.parentId,r.priority=t.priority,r.positions=t.positions,r.groups=t.groups,r.registers=t.registers,r},t.prototype.forkTo=function(t,e){var r=new te(e,this.gen);return r.id=++this.threadCounter,r.parentId=t.id,r.priority=t.priority,r.positions=Kt([],Ht(t.positions),!1),r.groups=Kt([],Ht(t.groups),!1),r.registers=Wt({},t.registers),r},t.prototype.startGroup=function(t,e,r){var n=this.forkTo(t,t.offset+1);return n.groups.push([e,r]),n},t.prototype.endGroup=function(t,e,r){var n=this.forkTo(t,t.offset+1);return n.groups.push([-e,r]),n},t.prototype.addThread=function(t,e,r,n){var i,o;if(void 0===n&&(n=0),!(t.offset<this.start||t.offset>this.end||this.genForOffset[t.offset-this.start]==this.gen)){this.genForOffset[t.offset-this.start]=this.gen;var s,a,u,l=this.prog.instrs[t.offset],h=l.opcode;switch(h){case Yt.Jump:u=this.jumpTo(t,l.args[0]),this.addThread(u,e,r,n);break;case Yt.Split:for(var c=0;c<l.args.length;c++){var p=l.args[c],f=0==c?this.jumpTo(t,p):this.forkTo(t,p);this.addThread(f,e,r,n)}break;case Yt.Save:u=this.jumpTo(t,t.offset+1),this.savePosition(u,l.args[0],r.index+n),this.tracer&&this.tracer.threadQueued(t,r.index+n),this.addThread(u,e,r,n);break;case Yt.GroupStart:u=this.startGroup(t,l.args[0],r.index+n),this.tracer&&this.tracer.threadQueued(t,r.index+n),this.addThread(u,e,r,n);break;case Yt.GroupEnd:u=this.endGroup(t,l.args[0],r.index+n),this.tracer&&this.tracer.threadQueued(t,r.index+n),this.addThread(u,e,r,n);break;case Yt.StartingChar:case Yt.MLStartingChar:a=this.prevCh(r),(0==r.index||h==Yt.MLStartingChar&&qt(a))&&this.addThread(this.jumpBy(t,1),e,r,n);break;case Yt.EndingChar:case Yt.MLEndingChar:(""==(s=this.nextCh(r))||h==Yt.MLEndingChar&&qt(s))&&this.addThread(this.jumpBy(t,1),e,r,n);break;case Yt.StartOfWord:case Yt.EndOfWord:break;case Yt.RBegin:var d=Ht(l.args,3),m=d[0],y=d[1],g=d[2],v=2*(1+m),x=t.positions[v],b=Ht(this.recurseMatch(r,x-1,l.offset+1,g,!1,1==y),2),E=b[0];b[1],E&&this.addThread(this.jumpTo(t,g+1),e,r,n);break;case Yt.Begin:var C=Ht(l.args,3),S=C[0],w=C[1],A=C[2];if(1==S)this.tracer&&this.tracer.threadQueued(t,r.index),e.push(t);else{var D=Ht(this.recurseMatch(r,r.index+1,l.offset+1,A,!0,1==w),2);E=D[0],D[1],E&&this.addThread(this.jumpTo(t,A+1),e,r,n)}break;case Yt.EnsureState:var k=l.args;try{for(var _=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(k),T=_.next();!T.done;T=_.next()){var F=T.value;if(this.currState==F){this.addThread(this.jumpBy(t,1),e,r,n);break}}}catch(t){i={error:t}}finally{try{T&&!T.done&&(o=_.return)&&o.call(_)}finally{if(i)throw i.error}}break;default:this.tracer&&this.tracer.threadQueued(t,r.index),e.push(t)}}},t.prototype.matchCurrPos=function(t,e,r){return void 0===r&&(r=!1),r?e.match(t.currChCodeLower)||e.match(t.currChCodeUpper):e.match(t.currChCode)},t.prototype.hasMore=function(t){return this.forward?t.hasMore:t.index>=0},t.prototype.nextCh=function(t){var e=t.index+(this.forward?1:-1);return t.charAt(e)},t.prototype.prevCh=function(t){return t.charAt(t.index-(this.forward?1:-1))},t.prototype.match=function(t){if(this.end<this.start)return null;this.startMatching(t);for(var e=null;this.currThreads.length>0;)e=this.stepChar(t,e);return null!=e&&(t.index=e.end),e},t.prototype.recurseMatch=function(e,r,n,i,o,s){void 0===o&&(o=!0),void 0===s&&(s=!1);var a=e.index;if(!e.canAdvance(o?1:-1))return[s,-1];e.index=r;var u=new t(this.prog,n,i,o).match(e),l=e.index;return e.index=a,[null!=u&&!s||null==u&&s,l]},t.prototype.startMatching=function(t){this.currThreads=[],this.nextThreads=[],this.gen++,this.addThread(new te(this.start,this.gen),this.currThreads,t),this.startPos=t.index},t.prototype.stepChar=function(t,e){void 0===e&&(e=null),this.gen++;for(var r=0;r<this.currThreads.length;r++){var n=this.currThreads[r],i=this.stepThread(t,n);if(null!=i&&(null==e||i.priority>e.priority||i.priority==e.priority&&i.end>e.end)){e=i;break}}return this.hasMore(t)&&t.advance(this.forward?1:-1),this.currThreads=this.nextThreads,this.nextThreads=[],e},t.prototype.stepThread=function(t,e){this.tracer&&this.tracer.threadStepped(e,t.index,this.gen);var n=null,i=this.prog.instrs[e.offset],o=i.opcode,s=(i.args,this.forward?1:-1),a=!1;switch(o){case Yt.RBegin:throw new Error("Invalid state. Reverse matches must be handled in addThread");case Yt.Begin:var u=Ht(i.args,3),l=u[0],h=u[1],c=u[2];r(1==l,"Plain lookahead cannot be here");var p=Ht(this.recurseMatch(t,t.index,i.offset+1,c,!0,1==h),2),f=p[0];p[1],f&&this.addThread(this.jumpTo(e,c+1),this.nextThreads,t);break;case Yt.End:var d=new $t(-1,-1,this.startPos,t.index);return d.groups=e.groups,d.positions=e.positions,d;case Yt.Match:if(t.index>this.startPos){var m=i.args[0],y=i.args[1];(n=new $t).start=this.startPos,n.end=t.index,n.priority=m,n.matchIndex=y,n.groups=e.groups,n.positions=e.positions}break;case Yt.Char:case Yt.CIChar:this.hasMore(t)&&(a=this.matchCurrPos(t,i.char,o==Yt.CIChar));break;case Yt.AnyNonNL:case Yt.Any:this.hasMore(t)&&(a=o==Yt.Any||!qt(t.currCh))}return a&&this.addThread(this.jumpBy(e,1),this.nextThreads,t,s),n},t}();function re(t){switch(t.opcode){case Yt.Match:return"Match ".concat(t.args[0]," ").concat(t.args[1]);case Yt.Char:case Yt.CIChar:return"".concat(Yt[t.opcode].toString()," ")+"".concat(t.char.debugValue());case Yt.Any:return".";case Yt.AnyNonNL:return"NL.";case Yt.StartingChar:return"^";case Yt.MLStartingChar:return"NL^";case Yt.EndingChar:return"$NL";case Yt.MLEndingChar:return"$NL_MultiLine";case Yt.Save:return"Save ".concat(t.args[0]);case Yt.GroupStart:return"GroupStart ".concat(t.args[0]);case Yt.GroupEnd:return"GroupEnd ".concat(t.args[0]);case Yt.Split:return"Split ".concat(t.args.join(", "));case Yt.Jump:return"Jump ".concat(t.args[0]);case Yt.Begin:return"Begin ".concat(t.args.join(" "));case Yt.RBegin:return"RBegin ".concat(t.args.join(" "));case Yt.End:return"End ".concat(t.args.join(" "));case Yt.EnsureState:return"EnsureState ".concat(t.args.join(" "));default:throw new Error("Invalid Opcode: "+t.opcode)}}var ne=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ie=function(){function t(t,e){void 0===e&&(e=null),this.regexResolver=t,this.listener=e,this.emitGroups=!1,this.emitPosition=!0}return t.prototype.compile=function(t){var e=this,r=new Qt,n=t.length<=1?new Zt(Yt.Split):r.add(Yt.Split,null);return t.forEach(function(t,i){n.add(r.instrs.length);var o=null!=t.expr.ignoreCase&&t.expr.ignoreCase,s=null==t.expr.dotAll||t.expr.dotAll,a=null==t.expr.multiline||t.expr.multiline;if(t.needsSpecificStates&&null!=t.activeStates){var u=r.add(Yt.EnsureState,null);t.activeStates.forEach(function(t){var e=r.registerState(t);u.add(e)})}e.compileExpr(t.expr,r,o,s,a),r.add(Yt.Match,null).add(t.priority,t.matchIndex>=0?t.matchIndex:i)}),r},t.prototype.compileExpr=function(t,e,r,n,i){var o=e.length,s=e.length;if(t.groupIndex>=0&&(this.emitPosition&&e.add(Yt.Save).add(2*(1+t.groupIndex)),this.emitGroups&&e.add(Yt.GroupStart).add(1+t.groupIndex)),t.tag==St.CHAR)this.compileChar(t,e,r,n,i);else if(t.tag==St.START_OF_INPUT){var a=null==t.multiline?i:t.multiline;e.add(a?Yt.MLStartingChar:Yt.StartingChar)}else if(t.tag==St.END_OF_INPUT)a=null==t.multiline?i:t.multiline,e.add(a?Yt.MLEndingChar:Yt.EndingChar);else if(t.tag==St.START_OF_WORD)e.add(Yt.StartOfWord);else if(t.tag==St.END_OF_WORD)e.add(Yt.EndOfWord);else if(t.tag==St.CAT)this.compileCat(t,e,r,n,i);else if(t.tag==St.UNION)this.compileUnion(t,e,r,n,i);else if(t.tag==St.QUANT)this.compileQuant(t,e,r,n,i);else if(t.tag==St.VAR)this.compileVar(t,e,r,n,i);else if(t.tag==St.BACK_NAMED_REF)this.compileBackNamedRef(t,e,r,n,i);else if(t.tag==St.BACK_NUM_REF)this.compileBackNumRef(t,e,r,n,i);else if(t.tag==St.LOOK_AHEAD)this.compileLookAhead(t,e,r,n,i);else{if(t.tag!=St.LOOK_BACK)throw new Error("Regex Type not yet supported: "+t.tag);this.compileLookBack(t,e,r,n,i)}return t.groupIndex>=0&&(this.emitGroups&&e.add(Yt.GroupEnd).add(1+t.groupIndex),this.emitPosition&&e.add(Yt.Save).add(2*(1+t.groupIndex)+1)),this.listener&&e.length>s&&this.listener(t,e,s,e.length-s),e.length-o},t.prototype.compileChar=function(t,e,r,n,i){t.op==Tt.AnyChar?e.add(n?Yt.Any:Yt.AnyNonNL):e.add(r?Yt.CIChar:Yt.Char).char=t},t.prototype.compileCat=function(t,e,r,n,i){var o,s;try{for(var a=ne(t.children),u=a.next();!u.done;u=a.next()){var l=u.value;this.compileExpr(l,e,r,n,i)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(o)throw o.error}}},t.prototype.compileBackNumRef=function(t,e,r,n,i){throw new Error("BackNumRef Not Implemented")},t.prototype.compileBackNamedRef=function(t,e,r,n,i){throw new Error("BackNameRef Not Implemented")},t.prototype.compileVar=function(t,e,r,n,i){var o=t.name.trim(),s=this.regexResolver?this.regexResolver(o):null;if(null==s)throw new Error("Cannot find expression: ".concat(o));this.compileExpr(s,e,r,n,i)},t.prototype.compileUnion=function(t,e,r,n,i){for(var o,s,a=e.add(Yt.Split),u=[],l=0;l<t.options.length;l++)a.add(e.length),this.compileExpr(t.options[l],e,r,n,i),l<t.options.length-1&&u.push(e.add(Yt.Jump));try{for(var h=ne(u),c=h.next();!c.done;c=h.next())c.value.add(e.length)}catch(t){o={error:t}}finally{try{c&&!c.done&&(s=h.return)&&s.call(h)}finally{if(o)throw o.error}}},t.prototype.compileQuant=function(t,e,r,i,o){if(0==t.minCount&&t.maxCount==n)this.compileAtleast0(t.expr,e,t.greedy,r,i,o);else if(1==t.minCount&&t.maxCount==n)this.compileAtleast1(t.expr,e,t.greedy,r,i,o);else if(0==t.minCount&&1==t.maxCount)this.compileOptional(t.expr,e,t.greedy,r,i,o);else{for(var s=0;s<t.minCount;s++)this.compileExpr(t.expr,e,r,i,o);if(t.isUnlimited)this.compileAtleast0(t.expr,e,t.greedy,r,i,o);else for(s=t.minCount;s<t.maxCount;s++)this.compileOptional(t.expr,e,t.greedy,r,i,o)}},t.prototype.compileAtleast1=function(t,e,r,n,i,o){void 0===r&&(r=!0);var s=e.length;this.compileExpr(t,e,n,i,o);var a=e.add(Yt.Split),u=e.length;r?a.add(s,u):a.add(u,s)},t.prototype.compileAtleast0=function(t,e,r,n,i,o){var s=e.add(Yt.Split),a=s.offset,u=e.length;this.compileExpr(t,e,n,i,o),e.add(Yt.Jump).add(a);var l=e.length;r?s.add(u,l):s.add(l,u)},t.prototype.compileOptional=function(t,e,r,n,i,o){var s=e.add(Yt.Split),a=e.length;this.compileExpr(t,e,n,i,o);var u=e.length;r?s.add(a,u):s.add(u,a)},t.prototype.compileLookAhead=function(t,e,r,n,i){this.compileExpr(t.expr,e,r,n,i);var o=e.add(Yt.Begin).add(0,t.negate?1:0);this.compileExpr(t.cond,e,r,n,i);var s=e.add(Yt.End).add(o.offset);o.add(s.offset)},t.prototype.compileLookBack=function(t,e,n,i,o){this.compileExpr(t.expr,e,n,i,o),r(t.expr.groupIndex>=0,"LookBack Assertion requires expression to have a group Index");var s=e.add(Yt.RBegin).add(t.expr.groupIndex,t.negate?1:0);this.compileExpr(t.cond.reverse(),e,n,i,o);var a=e.add(Yt.End).add(s.offset);s.add(a.offset)},t}(),oe=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),se=function(t){function e(e,r,n,i,o){void 0===o&&(o=null);var s=this.constructor,a=t.call(this,e)||this;return a.offset=r,a.length=n,a.type=i,a.value=o,a.name="TokenizerError",Object.setPrototypeOf(a,s.prototype),a}return oe(e,t),e}(Error),ae=function(t){function e(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=t.call(this,"Found Token: ".concat((null==e?void 0:e.tag)||"EOF"," (").concat((null==e?void 0:e.value)||"","), Expected: ").concat(r.join(", ")))||this;return i.foundToken=e,i.name="UnexpectedTokenError",i.expectedTokens=r,i}return oe(e,t),e}(Error),ue=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),le=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},he=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},ce=function(t){function e(e,r){void 0===r&&(r=!0);var n=t.call(this,r)||this;return n.forward=r,n._rawInput=e,n.input=he([],le(e),!1),n}return ue(e,t),e.prototype.push=function(t){var e;this._rawInput+=t,(e=this.input).push.apply(e,he([],le(t),!1))},e.prototype.substring=function(t,e){return this._rawInput.substring(t,e)},e.prototype.hasIndex=function(t){return t>=0&&t<this.input.length},e.prototype.charAt=function(t){return t<0||t>=this.input.length?"":this.input[t]},e}(function(){function t(t){void 0===t&&(t=!0),this.forward=t,this.index=0}return t.prototype.advance=function(t){void 0===t&&(t=1);var e=this.forward?this.index+t:this.index-t;return this.index=e,!0},t.prototype.canAdvance=function(t){void 0===t&&(t=1);var e=this.forward?this.index+t:this.index-t;return this.hasIndex(e)},Object.defineProperty(t.prototype,"hasMore",{get:function(){var t=this.forward?this.index:this.index-1;return this.hasIndex(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currCh",{get:function(){return this.charAt(this.index)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"prevCh",{get:function(){return this.charAt(this.index-(this.forward?1:-1))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextCh",{get:function(){var t=this.index+(this.forward?1:-1);return this.charAt(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currChCode",{get:function(){return this.hasMore?this.currCh.charCodeAt(0):-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currChCodeLower",{get:function(){return this.hasMore?this.currCh.toLowerCase().charCodeAt(0):-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currChCodeUpper",{get:function(){return this.hasMore?this.currCh.toUpperCase().charCodeAt(0):-1},enumerable:!1,configurable:!0}),t.prototype.charCodeAt=function(t){return this.hasIndex(t)?this.charAt(t).charCodeAt(0):-1},t.prototype.charCodeAtLower=function(t){return this.hasIndex(t)?this.charAt(t).toLowerCase().charCodeAt(0):-1},t.prototype.charCodeAtUpper=function(t){return this.hasIndex(t)?this.charAt(t).toUpperCase().charCodeAt(0):-1},t}()),pe=function(){function t(){}return t.advanceAfter=function(e,r,n){void 0===n&&(n=!0);var i=t.advanceTo(e,r,n);return i>=0&&(i+=r.length,e.index=i),i},t.advanceTo=function(e,r,n){void 0===n&&(n=!0);for(var i=e.index;e.hasMore;){var o=e.index;if(t.matches(e,r)){var s=e.index;e.index=o;var a=0;if(n)for(var u=s-1;u>=0&&"\\"==e.charAt(u);u--)a++;if(a%2==0)return e.index}e.advance(1)}throw e.index=i,new Error("Unexpected end of input before (".concat(r,")"))},t.matches=function(t,e,r){void 0===r&&(r=!0);for(var n=t.index,i=0,o=!0;i<e.length;i++){if(e[i]!=t.currCh){o=!1;break}t.advance(1)}return r&&o||(t.index=n),o},t}(),fe=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},de=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},me=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},ye=function(){function t(e,r,n,i){this.tag=e,this.matchIndex=r,this.start=n,this.end=i,this.id=t.idCounter++,this.value=null,this.groups={},this.positions={}}return t.prototype.isOneOf=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var i=fe(r),o=i.next();!o.done;o=i.next()){var s=o.value;if(this.tag==s)return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return!1},t.idCounter=0,t}(),ge=function(){function t(t,e){this.nextToken=t,this.tokenizerContext=e,this.buffer=[]}return t.prototype.next=function(t){var e=this.peek(t);return null!=e&&this.consume(),e},t.prototype.peek=function(t,e){for(void 0===e&&(e=0);this.buffer.length<=e;){var r=this.nextToken(t,this.tokenizerContext);if(null==r)return null;this.buffer.push(r)}return this.buffer[e]},t.prototype.match=function(t,e,r,n,i){void 0===r&&(r=!1),void 0===n&&(n=!0);var o=this.peek(t);if(null!=o){if(!e(o)){if(r)throw new ae(o);return null}i&&null!=i&&i(o),n&&this.consume()}else if(r)throw new se("Unexpected end of input",-1,0,"UnexpectedEndOfInput");return o},t.prototype.consume=function(){this.buffer.splice(0,1)},t.prototype.consumeIf=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.match(t,function(t){return t.isOneOf.apply(t,me([],de(e),!1))})},t.prototype.expectToken=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.match(t,function(t){return t.isOneOf.apply(t,me([],de(e),!1))},!0,!0)},t.prototype.ensureToken=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.match(t,function(t){return t.isOneOf.apply(t,me([],de(e),!1))},!0,!1)},t.prototype.nextMatches=function(t){for(var e,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=this.peek(t);if(null==o)return null;try{for(var s=fe(n),a=s.next();!a.done;a=s.next()){var u=a.value;if(o.tag==u)return o}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return null},t}(),ve=function(){function t(){this.value=-1}return t.prototype.next=function(){return++this.value},Object.defineProperty(t.prototype,"current",{get:function(){return this.value},enumerable:!1,configurable:!0}),t}();function xe(t){return" "==t||"\t"==t||"\n"==t||"\r"==t}var be=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Ee=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},Ce=function(){function t(t,e){this.pattern=t,this.counter=new ve,this.unicode=(null==e?void 0:e.unicode)||!1}return t.prototype.reduceLeft=function(t){var e=1==t.length?t[0]:new(Lt.bind.apply(Lt,Ee([void 0],be(t),!1)));return t.splice(0),e},t.prototype.throwError=function(t){throw new SyntaxError("Error in JS RE '".concat(this.pattern,"': ").concat(t))},t.prototype.parse=function(t,e){void 0===t&&(t=0),void 0===e&&(e=-1);var r=this.pattern,n=[];for(e<0&&(e=r.length-1);t<=e;){var i=r[t];if("."==i)n.push(jt.Any()),t++;else if("\\"==i&&r[t+1]>="1"&&r[t+1]<="9"){t++;for(var o="";t<=e&&r[t]>="0"&&r[t]<="9";)o+=r[t++];var s=parseInt(o);s>this.counter.current+1&&this.throwError("Invalid reference: "+s),n.push(new Xt(s))}else if("\\"==i&&"k"==r[t+1]&&"<"==r[t+2]){for(var a=t+=3;a<=e&&">"!=r[a];)a++;a>e&&this.throwError("Expected '>' found EOI");var u=r.substring(t,a);""==u.trim()&&this.throwError("Expected name"),n.push(new Vt(u)),t=a+1}else if("["==i){for(var l=t+1;l<=e&&"]"!=r[l];)"\\"==r[l]&&l++,l++;l>e&&this.throwError("Expected ']' found EOI"),n.push(this.parseCharGroup(t+1,l-1)),t=l+1}else if("^"==i)n.push(new It),t++;else if("$"==i)n.push(new Ot),t++;else if("|"==i){if(t+1<=e){var h=this.reduceLeft(n),c=this.parse(t+1,e);return new Mt(h,c)}t=e+1}else if("("==i)t=this.parseGroup(n,t,e);else if(")"==i||"]"==i||"}"==i)this.throwError("Unmatched ".concat(i,". Try using \\").concat(i));else if("*"==r[t]||"?"==r[t]||"+"==r[t]||"{"==r[t])t=this.parseQuant(n,t,e);else{var p=be(this.parseChar(t,e),2),f=p[0],d=p[1];n.push(f),t+=d}}return n.length,1==n.length?n[0]:new(Lt.bind.apply(Lt,Ee([void 0],be(n),!1)))},t.prototype.parseGroup=function(t,e,r){for(var n=e+1,i=0,o=this.pattern;n<=r&&(")"!=o[n]||i>0);)"("==o[n]?i++:")"==o[n]&&i--,"\\"==o[n]&&n++,n++;var s;if(n>r&&this.throwError("Expected ')' found EOI"),"?"==o[++e])if(":"==o[++e])t.push(this.parse(e+1,n-1));else if("<"==o[e]&&"!"!=o[e+1]&&"="!=o[e+1]){for(var a=this.counter.next(),u="",l=e+1;l<=r&&">"!=o[l];)u+=o[l],l++;(s=this.parse(l+1,n-1)).groupIndex=a,u.length>0&&(s.groupName=u)}else{var h=!0;"<"==o[e]&&(e++,h=!1);var c="!"==o[e++],p=this.parse(e,n-1);if(!h){var f=this.parse(n+1,r);return f.groupIndex<0&&(f.groupIndex=this.counter.next(),f.groupIsSilent=!0),t.push(new Rt(f,p,c)),r+1}t.length;var d=new Bt(this.reduceLeft(t),p,c);t.push(d)}else a=this.counter.next(),c=!1,"^"==o[e]&&(c=!0,e++),(s=this.parse(e,n-1)).groupIndex>=0&&(s=new Lt(s)),s.groupIndex=a,t.push(s);return n+1},t.prototype.parseCharGroup=function(t,e){var r=[],n=t,i=!1,o=this.pattern;for("^"==o[n]&&(i=!0,n++);n<=e;){var s=be(this.parseChar(n,e),2),a=s[0];if((n+=s[1])<o.length&&"-"==o[n])if("]"==o[++n]||"["==o[n])r.push(a),r.push(jt.Single("-"));else if(n<=e){var u=be(this.parseChar(n,e),2),l=u[0],h=u[1];a.op==Tt.SingleChar&&l.op==Tt.SingleChar||this.throwError("Char range cannot start or end in a char class"),l.args[0]<a.args[0]&&this.throwError("End cannot be less than start"),r.push(zt.Range(a,l)),n+=h}else this.throwError("Unterminated char class");else r.push(a)}return zt.Union(i,r)},t.prototype.parseChar=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),"\\"==this.pattern[t]?this.parseEscapeChar(t,e):this.parseSingleChar(t,e)},t.prototype.parseSingleChar=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var r=this.pattern.charCodeAt(t);return[jt.Single(r),1]},t.prototype.parsePropertyEscape=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var r=this.pattern;r[t]+1!="{"&&this.throwError("Invalid property escape");for(var n=t+=2,i=-1;n<=e&&"}"!=r[n];)"="==r[n]&&(i=n),n++;n>e&&this.throwError("Invalid property escape");var o=r.substring(t,n),s="General_Category",a=o;if(i>=0){var u=o.split("=");2!=u.length&&this.throwError("Invalid property escape"),s=u[0].trim(),a=u[1].trim()}return[jt.PropertyEscape(s,a),2+n+1-t]},t.prototype.parseEscapeChar=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var n=this.pattern;r("\\"==n[t],"Expected '\\'"),++t>e&&this.throwError("Encounted unexpected end of input after \\");var i=n[t];if(this.unicode&&"p"==i||"P"==i)return this.parsePropertyEscape(t,e);switch(i){case"w":return[jt.Class(V.WORD_CHAR),2];case"W":return[jt.Class(V.WORD_CHAR,!0),2];case"d":return[jt.Class(V.DIGITS),2];case"D":return[jt.Class(V.DIGITS,!0),2];case"s":return[jt.Class(V.SPACES),2];case"S":return[jt.Class(V.SPACES,!0),2];case"0":return n[t+1]>="0"&&n[t+1]<="9"&&this.unicode&&this.throwError("Invalid decimal escape"),[jt.Single("\0"),2];case"r":return[jt.Single("\r"),2];case"n":return[jt.Single("\n"),2];case"f":return[jt.Single("\f"),2];case"b":return[jt.Single("\b"),2];case"v":return[jt.Single("\v"),2];case"t":return[jt.Single("\t"),2];case"c":(this.unicode||t>=e)&&this.throwError("Invalid char sequence at ".concat(t,", ").concat(e));var o=n.charCodeAt(t+1)%32;return[jt.Single(o),3];case"x":++t>=e&&this.throwError("Invalid hex sequence at ".concat(t,", ").concat(e));var s=n.substring(t,t+2),a=parseInt(s,16);return r(!isNaN(a),"Invalid hex sequence: '".concat(s,"'")),[jt.Single(a),4];case"u":++t>e-3&&this.throwError("Invalid unicode sequence at ".concat(t));var u=n.substring(t,t+4),l=parseInt(u,16);return isNaN(l)&&this.throwError("Invalid unicode sequence: '".concat(u,"'")),[jt.Single(l),6];case"^":case"$":case".":case"*":case"+":case"?":case"\\":case"'":case'"':case"(":case")":case"[":case"]":case"{":case"}":case"|":case"/":return[jt.Single(i),2];default:return this.unicode&&this.throwError("Invalid escape character: "+i),[jt.Single(i),2]}},t.prototype.parseQuant=function(t,e,r){var i=this.pattern,o=i[e-1],s=1,a=1;if("*"==i[e])s=0,a=n;else if("+"==i[e])s=Math.min(s,1),a=n;else if("?"==i[e])s=0,a=Math.max(a,1);else{if("{"!=i[e])throw new Error("Here?");var u=i.indexOf("}",e+1);(u<=e||u>r)&&this.throwError("Unexpected end of input while looking for '}'");var l=i.substring(e+1,u).trim(),h=l.split(",").map(function(t){return parseInt(t.trim())});if(e=u,1==h.length){if(isNaN(h[0])){if(l.trim().length>0)return t.push(new Jt(l.trim())),e+1;this.throwError("Invalid quantifier: /".concat(l,"/"))}s=a=h[0]}else 2==h.length?(s=isNaN(h[0])?0:h[0])>(a=isNaN(h[1])?n:h[1])&&this.throwError("Invalid Quant /".concat(l,"/: Min must be <= Max")):h.length>2&&this.throwError('Invalid quantifier spec: "{'.concat(l,'}"'))}t.length<=0&&this.throwError("Quantifier cannot appear before an expression");var c=t[t.length-1];c.tag!=St.QUANT||"*"!=o&&"?"!=o&&"+"!=o&&"}"!=o||this.throwError("Nothing to repeat"),!this.unicode||c.tag!=St.LOOK_AHEAD&&c.tag!=St.LOOK_BACK||this.throwError("Cannot have quantifier on assertion in unicode mode");var p=t[t.length-1]=new Pt(c);return p.minCount=s,p.maxCount=a,++e<=r&&"?"==i[e]&&p.greedy&&(e++,p.greedy=!1),e},t}(),Se=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},we=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};function Ae(t,e){for(var r=t.index,n=0;n<e.length;n++){if(t.currCh!=e.charAt(n))return t.index=r,!1;t.advance(1)}return!0}var De=function(){function t(){this.counter=new ve}return t.prototype.parse=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=0);for(var i=[];t.hasMore;){var o=t.currCh;if(Ae(t,"."))i.push(jt.Any());else if(Ae(t,"^"))(s=new It).multiline=!0,i.push(s);else if(Ae(t,"$")){var s;(s=new Ot).multiline=!0,i.push(s)}else{if(Ae(t,"|")){var a=this.reduceLeft(i),u=this.parse(t,e,n);return new Mt(a,u)}if("["==o)i.push(this.parseCharGroup(t));else if("*"==o||"?"==o||"+"==o||"{"==o)this.parseQuant(t,i);else if(e&&xe(o))t.advance(1);else if(e&&Ae(t,"/*")){for(;"*"!=t.currCh||"/"!=t.nextCh;)t.hasMore||this.throwError(t,"Unterminated comment"),t.advance(1);t.advance(2)}else{if(Ae(t,"{-}"))throw new Error("Intersection Not yet supported");if(Ae(t,"{+}"))throw new Error("Union Not yet supported");if(Ae(t,"("))if(Ae(t,"?"))if(Ae(t,"#")){for(;t.hasMore&&")"!=t.currCh;)t.advance(1);r(Ae(t,")"),"Expected ')'")}else{for(var l=!1,h=!1,c=e,p=!1;t.hasMore&&":"!=t.currCh;)"i"==t.currCh?l=!p:"s"==t.currCh?h=!p:"x"==t.currCh?c=!p:"-"==t.currCh&&(p=!0),t.advance(1);r(Ae(t,":"),"Expected ':'");var f=this.counter.next();(d=this.parse(t,c,n+1)).groupIndex>=0&&(d=new Lt(d)),d.dotAll=h,d.ignoreCase=l,d.groupIndex=f,i.push(d),r(Ae(t,")"),"Expected ')'")}else{var d;f=this.counter.next(),(d=this.parse(t,e,n+1)).groupIndex>=0&&(d=new Lt(d)),d.groupIndex=f,i.push(d),r(Ae(t,")"),"Expected ')'")}else{if(")"==o){0==n&&this.throwError(t,"Unmatched ".concat(o,". Try using \\").concat(o));break}if("]"==o||"}"==o)this.throwError(t,"Unmatched ".concat(o,". Try using \\").concat(o));else{if(Ae(t,"/"))return a=this.reduceLeft(i),u=this.parse(t,e,n),new Bt(a,u,!1);if(Ae(t,'"')){for(;'"'!=t.currCh;)t.hasMore||this.throwError(t,"Unterminated string"),i.push(this.parseChar(t));t.advance(1)}else i.push(this.parseChar(t))}}}}}return 1==i.length?i[0]:new(Lt.bind.apply(Lt,we([void 0],Se(i),!1)))},t.prototype.parseQuant=function(t,e){var r=1,i=1;if(Ae(t,"*"))r=0,i=n;else if(Ae(t,"+"))r=Math.min(r,1),i=n;else if(Ae(t,"?"))r=0,i=Math.max(i,1);else if(Ae(t,"{")){for(var o=!1,s="",a="";t.hasMore&&"}"!=t.currCh;)","==t.currCh?o=!0:o?a+=t.currCh:s+=t.currCh,t.advance(1);t.hasMore||this.throwError(t,"Invalid property escape"),s=s.trim(),a=a.trim(),t.advance(1);var u=parseInt(s),l=parseInt(a);if(o)(r=isNaN(u)?0:u)>(i=isNaN(l)?n:l)&&this.throwError(t,"Invalid Quant /".concat(s,",").concat(a,"/: Min must be <= Max"));else if(isNaN(u)){if(s.length>0)return void e.push(new Jt(s));this.throwError(t,"Invalid quantifier: /".concat(s,"/")),r=i=1}else r=i=u}else this.throwError(t,"Expected '{', '*', '?' or '+', Found: "+t.currCh);e.length<=0&&this.throwError(t,"Quantifier cannot appear before an expression");var h,c=e[e.length-1];c.tag==St.QUANT&&c.groupIndex<0?((h=c).minCount=Math.min(r,h.minCount),h.maxCount=Math.max(i,h.maxCount)):((h=e[e.length-1]=new Pt(c)).minCount=r,h.maxCount=i),h.greedy&&Ae(t,"?")&&(h.greedy=!1)},t.prototype.parseCharGroup=function(t){var e=[];r(Ae(t,"["),"Expected '['");for(var n=Ae(t,"^");"]"!=t.currCh;){var i=this.parseChar(t);if(Ae(t,"-"))if(t.hasMore)if("]"==t.currCh||"["==t.currCh)e.push(i),e.push(jt.Single("-"));else{var o=this.parseChar(t);i.op==Tt.SingleChar&&o.op==Tt.SingleChar||this.throwError(t,"Char range cannot start or end in a char class"),o.args[0]<i.args[0]&&this.throwError(t,"End cannot be less than start"),e.push(zt.Range(i,o))}else this.throwError(t,"Unterminated char class");else e.push(i)}return r(Ae(t,"]"),"']' expected"),zt.Union(n,e)},t.prototype.parseChar=function(t){return"\\"==t.currCh?this.parseEscapeChar(t):this.parseSingleChar(t)},t.prototype.parseSingleChar=function(t){var e=t.currCh;return t.advance(1),jt.Single(e)},t.prototype.parsePropertyEscape=function(t){r(Ae(t,"\\{"),"Invalid property escape"),t.advance(2);for(var e=!1,n="",i="";t.hasMore&&"}"!=t.currCh;)"="==t.currCh?e=!0:e?i+=t.currCh:n+=t.currCh,t.advance(1);return t.hasMore||this.throwError(t,"Invalid property escape"),n=n.trim(),i=i.trim(),e||(i=n,n="General_Category"),t.advance(1),jt.PropertyEscape(n,i)},t.prototype.parseEscapeChar=function(t){if(r(Ae(t,"\\"),"Expected '\\'"),t.hasMore||this.throwError(t,"Encounted unexpected end of input after \\"),Ae(t,"w"))return jt.Class(V.WORD_CHAR);if(Ae(t,"W"))return jt.Class(V.WORD_CHAR,!0);if(Ae(t,"d"))return jt.Class(V.DIGITS);if(Ae(t,"D"))return jt.Class(V.DIGITS,!0);if(Ae(t,"s"))return jt.Class(V.SPACES);if(Ae(t,"S"))return jt.Class(V.SPACES,!0);if(Ae(t,"0"))return jt.Single("\0");if(Ae(t,"r"))return jt.Single("\r");if(Ae(t,"n"))return jt.Single("\n");if(Ae(t,"f"))return jt.Single("\f");if(Ae(t,"b"))return jt.Single("\b");if(Ae(t,"v"))return jt.Single("\v");if(Ae(t,"t"))return jt.Single("\t");if(Ae(t,"\\"))return jt.Single("\\");if(Ae(t,"'"))return jt.Single("'");if(Ae(t,'"'))return jt.Single('"');if(Ae(t,"x")){t.hasMore||this.throwError(t,"Invalid hex sequence at ".concat(t.index));var e=t.currCh+t.nextCh,n=parseInt(e,16);return r(!isNaN(n),"Invalid hex sequence: '".concat(e,"'")),t.advance(2),jt.Single(n)}if(Ae(t,"u")){t.canAdvance(3)||this.throwError(t,"Invalid unicode sequence at ".concat(t.index));var i=t.substring(t.index,t.index+4),o=parseInt(i,16);return isNaN(o)&&this.throwError(t,"Invalid unicode sequence: '".concat(i,"'")),t.advance(4),jt.Single(o)}var s=t.currCh;return t.advance(1),jt.Single(s)},t.prototype.reduceLeft=function(t){var e=1==t.length?t[0]:new(Lt.bind.apply(Lt,we([void 0],Se(t),!1)));return t.splice(0),e},t.prototype.throwError=function(t,e){throw new Error(e)},t}();function ke(t,e){var r;return"string"==typeof t?((r=new Gt(Te(t,e),e)).pattern=t,r):"RegExp"==t.constructor.name?((r=new Gt(Te(t,e),e)).pattern=t.source,r):new Gt(t,e)}function _e(t){var e=new De;try{var r=e.parse(new ce(t));return null==r.dotAll&&(r.dotAll=!1),null==r.multiline&&(r.multiline=!1),r}catch(e){throw console.log("Error in FLEX RE: ",t),e}}function Te(t,e){e=e||{};var r="string"!=typeof t,n="string"==typeof t?t:t.source;r&&(e.unicode=t.unicode);var i=new Ce(n,e).parse();return"string"!=typeof t&&(i.dotAll=t.dotAll,i.ignoreCase=t.ignoreCase,i.multiline=t.multiline),i}function Fe(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return _e(String.raw.apply(String,function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}([t],function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}(e),!1)))}var Ie,Oe,Ne,Be,Re,Pe,Le=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Me=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Ue=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.idCounter=0,e}return Le(e,t),e.prototype.next=function(t,e){if(!t.hasMore)return null;var r=t.index,n=t.currCh,i=this.vm.match(t);if(null==i){var o=null;if(o=t.index==r+1?new se("Unexpected Character: ".concat(n),r,1,"UnexpectedCharacter",n):new se("Unexpected Symbol: ".concat(t.substring(r,t.index)),r,t.index-r,"UnexpectedLexeme"),this.onError&&(o=this.onError(o,t,r)),null!=o)throw o;return this.next(t,e)}var s=this.allRules[i.matchIndex],a=function(t,e,r){for(var n,i,o=new ye(t,e.matchIndex,e.start,e.end),s=0;s<e.positions.length;s+=2)e.positions[s]>=0&&(o.positions[Math.floor(s/2)]=[e.positions[s],e.positions[s+1]]);try{for(var a=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e.groups),u=a.next();!u.done;u=a.next()){var l=Me(u.value,2),h=l[0],c=l[1],p=Math.abs(h);p in o.groups||(o.groups[p]=[]),o.groups[p].push(c)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return null!=r&&(o.value=r.substring(e.start,e.end)),o}(s.tag,i,t);a.id=this.idCounter++;var u=this.onMatchHandlers[i.matchIndex];if(u||(u=this.matchHandlersByValue[s.tag]),u){if(null==(a=u(s,t,a,e)))return this.next(t,e)}else if(s.skip)return this.next(t,e);return a},e.prototype.tokenize=function(t,e){void 0===e&&(e=null);var r=[];"string"==typeof t&&(t=new ce(t));for(var n=this.next(t,e);n;){r.push(n);try{n=this.next(t,e)}catch(t){r.push({tag:"ERROR",start:t.offset,end:t.offset+t.length,value:t.message});break}}return r},e}(function(){function t(){var t=this;this._prog=null,this._vm=null,this.onError=null,this.allRules=[],this.onMatchHandlers=[],this.matchHandlersByValue={},this.variables=new Map,this.compiler=new ie(function(e){var r,n=t.variables.get(e)||null;if(null==n&&(n=(null===(r=t.findRuleByValue(e))||void 0===r?void 0:r.expr)||null),null==n)throw new Error("Invalid regex reference: ".concat(e));return n})}return t.prototype.getVar=function(t){return this.variables.get(t)||null},t.prototype.addVar=function(t,e){var r=this.variables.get(t)||null;return r=null==r?e:new Mt(r,e),this.variables.set(t,e),this},t.prototype.findRuleByValue=function(t){return this.allRules.find(function(e){return e.tag==t})||null},t.prototype.add=function(t,e,r){return void 0===r&&(r=null),"function"==typeof e&&(r=e,e=null),this.addRule(ke(t,e),r)},t.prototype.addRule=function(t,e){return void 0===e&&(e=null),t.matchIndex=this.allRules.length,this.allRules.push(t),this.onMatchHandlers.push(e),this._prog=null,this._vm=null,this},t.prototype.on=function(t,e){return this.matchHandlersByValue[t]=e,this},Object.defineProperty(t.prototype,"prog",{get:function(){if(null==this._prog){var t=this.sortRules();this._prog=this.compiler.compile(t)}return this._prog},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vm",{get:function(){return null==this._vm&&(this._vm=new ee(this.prog)),this._vm},enumerable:!1,configurable:!0}),t.prototype.sortRules=function(){var t=this.allRules.map(function(t){return t});return t.sort(function(t,e){return t.priority!=e.priority?e.priority-t.priority:t.matchIndex-e.matchIndex}),t},t}()),je=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},ze=(function(){function t(t){this.peekedToken=null,this.literals=[],this.matchers=[],"string"==typeof t&&(t=new ce(t)),this.tape=t}t.prototype.addMatcher=function(t,e){return void 0===e&&(e=!1),this.matchers.push([t,e]),this},t.prototype.addLiteral=function(t,e){var r=this.literals.findIndex(function(e){return e[0]==t});if(r<0)return this.literals.push([t,e]),this.literals.length-1;if(this.literals[r][1]!=e)throw new Error("Literal '".concat(t,"' already registered as ").concat(e));return r},t.prototype.nextToken=function(){if(!this.tape.hasMore)return null;for(var t=this.tape.index,e=0;e<this.literals.length;e++){var r=je(this.literals[e],2),n=r[0],i=r[1];if(pe.matches(this.tape,n)){var o=new ye(i,e,t,this.tape.index);return o.value=n,o}}for(e=0;e<this.matchers.length;e++){var s=je(this.matchers[e],2),a=s[0],u=s[1],l=a(this.tape,t);if(null!=l)return u?this.nextToken():(l.start=t,l.end=this.tape.index,l)}throw new se("Invalid Character",this.tape.index,1,"InvalidCharacter",this.tape.currCh)}}(),function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}),Je=Fe(Ie||(Ie=ze(['["]([^"\\\n]|\\.|\\\n)*["]'],['["]([^"\\\\\\n]|\\\\.|\\\\\\n)*["]']))),Ve=Fe(Oe||(Oe=ze(["[']([^'\\\n]|\\.|\\\n)*[']"],["[']([^'\\\\\\n]|\\\\.|\\\\\\n)*[']"]))),Xe=(String.raw(Ne||(Ne=ze(["/([^\\/]|\\.)*/([imus]*)"],["/([^\\\\/]|\\\\.)*/([imus]*)"]))),String.raw(Be||(Be=ze(["/(.+?(?<!\\))/([imus]*)"],["/(.+?(?<!\\\\))/([imus]*)"])))),Ge=function(){return Ge=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Ge.apply(this,arguments)},We=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},He=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},Ke=function(t){return"number"==typeof t?""+t:t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")};!function(t){t.STRING="STRING",t.REGEX="REGEX",t.NUMBER="NUMBER",t.SPACES="SPACES",t.IDENT="IDENT",t.PCT_IDENT="PCT_IDENT",t.STAR="STAR",t.PLUS="PLUS",t.QMARK="QMARK",t.PIPE="PIPE",t.DOLLAR_NUM="DOLLAR_NUM",t.DOLLAR_IDENT="DOLLAR_IDENT",t.OPEN_PAREN="OPEN_PAREN",t.CLOSE_PAREN="CLOSE_PAREN",t.OPEN_BRACE="OPEN_BRACE",t.CLOSE_BRACE="CLOSE_BRACE",t.OPEN_SQ="OPEN_SQ",t.CLOSE_SQ="CLOSE_SQ",t.COMMENT="COMMENT",t.ARROW="ARROW",t.COLCOLHYPHEN="COLCOLHYPHEN",t.COLON="COLON",t.SEMI_COLON="SEMI_COLON"}(Re||(Re={})),function(t){t.GRAMMAR="GRAMMAR",t.DECL="DECL",t.RULE="RULE",t.PROD_NULL="PROD_NULL",t.PROD_STR="PROD_STR",t.PROD_UNION="PROD_UNION",t.PROD_NAME="PROD_NAME",t.PROD_STRING="PROD_STRING",t.PROD_NUM="PROD_NUM",t.PROD_IDENT="PROD_IDENT",t.PROD_STAR="PROD_STAR",t.PROD_PLUS="PROD_PLUS",t.PROD_OPTIONAL="PROD_OPTIONAL",t.IDENT="IDENT",t.ERROR="ERROR",t.COMMENT="COMMENT"}(Pe||(Pe={}));var qe=function(){function t(t,e){this.leftRecursive=!1,this.generatedTokenizer=new Ue,this.regexSyntax="js",e=e||{},this.symbolsByLabel={},this.grammar=e.grammar||new ut,this.leftRecursive=!("leftRecursive"in e)||e.leftRecursive||!1,this.newSymbolCallback=e.newSymbolCallback||null,this.tokenHandlers=e.tokenHandlers||{},this.parse(t)}return t.prototype.symbolForLabel=function(t){return this.symbolsByLabel[t]||null},t.prototype.registerSymbol=function(t,e){r(!(t in this.symbolsByLabel),"".concat(t," is already registered")),this.symbolsByLabel[t]=e},t.prototype.ensureSymbol=function(t,e){var r=this.symbolForLabel(t);return null!=r||(this.newSymbolCallback&&(r=this.newSymbolCallback(t,e)||null),null==r&&(r=e?this.grammar.newTerm(t):this.grammar.newNT(t)),this.registerSymbol(t,r)),r},t.prototype.parse=function(t){var e,r=this,n=((e=new Ue).add(/->/,{tag:Re.ARROW}),e.add(/\[/,{tag:Re.OPEN_SQ}),e.add(/\]/,{tag:Re.CLOSE_SQ}),e.add(/\(/,{tag:Re.OPEN_PAREN}),e.add(/\)/,{tag:Re.CLOSE_PAREN}),e.add(/\{/,{tag:Re.OPEN_BRACE}),e.add(/\}/,{tag:Re.CLOSE_BRACE}),e.add(/\*/,{tag:Re.STAR}),e.add(/\+/,{tag:Re.PLUS}),e.add(/\?/,{tag:Re.QMARK}),e.add(/;/,{tag:Re.SEMI_COLON}),e.add(/:/,{tag:Re.COLON}),e.add(/\|/,{tag:Re.PIPE}),e.add(/\s+/m,{tag:Re.SPACES},function(){return null}),e.add(/\/\*.*?\*\//s,{tag:Re.COMMENT},function(){return null}),e.add(/\/\/.*$/m,{tag:Re.COMMENT},function(){return null}),e.add(Ve,{tag:Re.STRING},function(t,e,r){return r.value=e.substring(r.start+1,r.end-1),r}),e.add(Je,{tag:Re.STRING},function(t,e,r){return r.value=e.substring(r.start+1,r.end-1),r}),e.add(Xe,{tag:Re.REGEX},function(t,e,r){var n=e.substring(r.positions[1][0],r.positions[1][1]),i=e.substring(r.positions[3][0],r.positions[3][1]);return r.value=[n,i],r}),e.add(/\d+/,{tag:Re.NUMBER},function(t,e,r){return r.value=parseInt(e.substring(r.start,r.end)),r}),e.add(/%([\w][\w\d_]*)/,{tag:Re.PCT_IDENT},function(t,e,r){return r.value=e.substring(r.start+1,r.end),r}),e.add(/\$\d+/,{tag:Re.DOLLAR_NUM},function(t,e,r){return r.value=parseInt(e.substring(r.start+1,r.end)),r}),e.add(/\$([\w][\w\d_]*)/,{tag:Re.DOLLAR_IDENT},function(t,e,r){return r.value=e.substring(r.start+1,r.end),r}),e.add(/[\w][\w\d_]*/,{tag:Re.IDENT}),e);this.tokenizer=new ge(function(t,e){return n.next(t,r)},this),this.parseGrammar(new ce(t))},t.prototype.parseRegex=function(t,e,r,n){if(void 0===r&&(r=0),void 0===n&&(n=""),""==n&&(n=this.regexSyntax),"js"==n){var i=this.tokenizer.expectToken(t,Re.STRING,Re.NUMBER,Re.REGEX),o=void 0;if(e&&0!=e.length||(e="/"+i.value[0]+"/"+i.value[1]),i.tag==Re.STRING||i.tag==Re.NUMBER)o=ke(Ke(i.value),{tag:e,priority:r+20});else{if(i.tag!=Re.REGEX)throw new ae(i);var s=i.value[0];i.value[1].length>0&&(s=new RegExp(i.value[0],i.value[1])),o=ke(s,{tag:e,priority:r+10})}return o}for(var a="";t.hasMore&&"\n"!=t.currCh;)a+=t.currCh,t.advance();return a=a.trim(),e&&0!=e.length||(e="/"+a+"/"),new Gt(_e(a),{tag:e,priority:r})},t.prototype.parseGrammar=function(t){for(var e=this.tokenizer.peek(t);null!=e;){if(e.tag==Re.IDENT)this.parseDecl(t);else{if(e.tag!=Re.PCT_IDENT)throw new SyntaxError("Declaration must start with IDENT or PCT_IDENT. Found: '".concat(e.value,"' instead."));this.tokenizer.next(t),this.parseDirective(t,e.value)}e=this.tokenizer.peek(t)}},t.prototype.parseDirective=function(t,e){var r=this;if("start"==e){var n=this.tokenizer.expectToken(t,Re.IDENT);this.grammar.startSymbol=this.ensureSymbol(n.value,!1)}else if("resyntax"==e){if("js"!=(n=this.tokenizer.expectToken(t,Re.IDENT)).value&&"flex"!=n.value)throw new SyntaxError("Invalid regex syntax: "+n.value);this.regexSyntax=n.value}else if(e.startsWith("skip")){var i=this.parseRegex(t,"",30,e.endsWith("flex")?"flex":""),o=this.parseTokenHandler(t);o?this.generatedTokenizer.addRule(i,function(t,e,n){return o(t,e,n,r),null}):this.generatedTokenizer.addRule(i,function(){return null})}else{if(!e.startsWith("token")&&!e.startsWith("define"))throw new Error("Invalid directive: "+e);var s=e.startsWith("define"),a=this.tokenizer.expectToken(t,Re.IDENT,Re.STRING),u=a.value;if(a.tag!=Re.STRING&&a.tag!=Re.NUMBER||(u='"'.concat(a.value,'"')),i=this.parseRegex(t,u,0,e.endsWith("flex")?"flex":""),s)this.generatedTokenizer.addVar(u,i.expr);else{var l=this.parseTokenHandler(t);this.generatedTokenizer.addRule(i,l),this.ensureSymbol(u,!0)}}},t.prototype.parseTokenHandler=function(t){var e=this;if(!this.tokenizer.consumeIf(t,Re.OPEN_BRACE))return null;var r=this.tokenizer.expectToken(t,Re.IDENT);return this.tokenizer.expectToken(t,Re.CLOSE_BRACE),function(t,n,i,o){var s=e.tokenHandlers[r.value];if(!s)throw new Error("Handler method not found: "+r.value);return s(i,n,o)}},t.prototype.parseDecl=function(t){var e,r,n=this.tokenizer.expectToken(t,Re.IDENT);if(this.tokenizer.consumeIf(t,Re.ARROW,Re.COLON)){var i=this.ensureSymbol(n.value,!1);if(i.isTerminal)i.isTerminal=!1;else if(i.isAuxiliary)throw new Error("NT is already auxiliary and cannot be reused.");try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.parseProductions(t,this.grammar,i)),s=o.next();!s.done;s=o.next()){var a=We(s.value,2),u=a[0],l=a[1];this.grammar.add(i,u,l)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}this.tokenizer.expectToken(t,Re.SEMI_COLON)}},t.prototype.parseProductions=function(t,e,r){for(var n=[];null!=this.tokenizer.peek(t);){var i=this.parseProd(t,e);if(n.push(i),!this.tokenizer.consumeIf(t,Re.PIPE)&&this.tokenizer.nextMatches(t,Re.CLOSE_SQ,Re.CLOSE_PAREN,Re.SEMI_COLON))break}return n},t.prototype.parseProd=function(t,e){for(var r=new ot;!this.tokenizer.nextMatches(t,Re.CLOSE_PAREN,Re.CLOSE_SQ,Re.SEMI_COLON,Re.PIPE,Re.OPEN_BRACE);){var n=null;if(this.tokenizer.consumeIf(t,Re.OPEN_PAREN))0==(i=this.parseProductions(t,e,null)).length||(n=1==i.length?i[0][0]:e.anyof.apply(e,He([],We(i.map(function(t){return t[0]})),!1))),this.tokenizer.expectToken(t,Re.CLOSE_PAREN);else if(this.tokenizer.consumeIf(t,Re.OPEN_SQ)){var i;0==(i=this.parseProductions(t,e,null)).length||(n=1==i.length?e.opt(i[0][0]):e.opt(e.anyof.apply(e,He([],We(i.map(function(t){return t[0]})),!1)))),this.tokenizer.expectToken(t,Re.CLOSE_SQ)}else{if(!this.tokenizer.nextMatches(t,Re.IDENT,Re.STRING,Re.NUMBER,Re.REGEX))throw new ae(this.tokenizer.peek(t));var o=this.tokenizer.next(t),s=o.value;if(o.tag==Re.STRING||o.tag==Re.NUMBER){s='"'.concat(o.value,'"');var a=ke(Ke(o.value),{tag:s,priority:20});this.generatedTokenizer.addRule(a)}else if(o.tag==Re.REGEX){s="/"+o.value[0]+"/"+o.value[1];var u=o.value[0];o.value[1].length>0&&(u=new RegExp(o.value[0],o.value[1])),a=ke(u,{tag:s,priority:10}),this.generatedTokenizer.addRule(a)}var l=this.ensureSymbol(s,!0);n=new ot(l)}if(null==n)throw new Error("Could not determine node");this.tokenizer.consumeIf(t,Re.STAR)?n=e.atleast0(n,this.leftRecursive):this.tokenizer.consumeIf(t,Re.PLUS)?n=e.atleast1(n,this.leftRecursive):this.tokenizer.consumeIf(t,Re.QMARK)&&(n=e.opt(n)),r.extend(n)}var h=null;if(this.tokenizer.consumeIf(t,Re.OPEN_BRACE)){var c=this.tokenizer.expectToken(t,Re.DOLLAR_NUM,Re.IDENT);h=new st(c.value),this.tokenizer.expectToken(t,Re.CLOSE_BRACE)}return[r,h]},t}(),Ye=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$e=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Qe=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},Ze=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.parent=null,e}return Ye(e,t),e.prototype.add=function(e,r){return void 0===r&&(r=-1),t.prototype.add.call(this,e,r),e.parent=this,this},e.prototype.splice=function(e,r){for(var n,i,o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];try{for(var a=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(o),u=a.next();!u.done;u=a.next())u.value.parent=this}catch(t){n={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return t.prototype.splice.apply(this,Qe([e,r],$e(o),!1))},e}(function(){function t(t,e,r){for(var n=[],i=3;i<arguments.length;i++)n[i-3]=arguments[i];this.id=t,this.sym=e,this.value=r,this.children=[],this.children=n||[]}return Object.defineProperty(t.prototype,"childCount",{get:function(){return this.children.length},enumerable:!1,configurable:!0}),t.prototype.childAt=function(t){return t<0?this.children[this.children.length+t]:this.children[t]},Object.defineProperty(t.prototype,"isTerminal",{get:function(){return this.sym.isTerminal},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){if(void 0===e&&(e=-1),this.isTerminal)throw new Error("Cannot add children (".concat(t.sym.label,") to a terminal node: ").concat(this.sym.label));return e<0?this.children.push(t):this.children.splice(e,0,t),this},t.prototype.splice=function(t,e){for(var r,n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return(r=this.children).splice.apply(r,Qe([t,e],$e(n),!1)),this},Object.defineProperty(t.prototype,"reprString",{get:function(){return this.debugValue(!1).join("\n")},enumerable:!1,configurable:!0}),t.prototype.debugValue=function(t){if(void 0===t&&(t=!0),t){var e=[this.sym.label];return this.value&&e.push(this.value),this.children.length>0&&e.push(this.children.map(function(e){return e.debugValue(t)})),e}var r=[];return this.value,r.push(null==this.value?this.sym.label:this.sym.label+" - "+this.value),this.children.forEach(function(e){return e.debugValue(t).forEach(function(t){return r.push(" "+t)})}),r},t}()),tr=function(){function t(){}return t.prototype.setTokenizer=function(t){return this.tokenbuffer=new ge(t,null),this},t.prototype.getSym=function(t){var e=this.grammar.getSym(t.tag);if(null==e)throw new Error("Invalid token tag: "+t.tag+", Value: "+t.value);return e},t}(),er=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ye(e,t),e.prototype.parse=function(t,e){return void 0===e&&(e=null),"string"==typeof t&&(t=new ce(t)),this.parseInput(t,e)},e}(tr);function rr(t,e,r){return void 0===r&&(r=!0),e.debugString}!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Ye(e,t),e.prototype.parse=function(t,e){return void 0===e&&(e=null),"string"==typeof t&&(t=new ce(t)),this.parseInput(t,e)}}(tr);var nr,ir,or=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),sr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ar=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},ur=(function(){function t(t){this.grammar=t,this.refresh()}t.prototype.refresh=function(){var t=this;return this.entries=new Map,this.grammar.followSets.refresh(),this.grammar.forEachRule(null,function(e,r){t.processRule(e,r)}),function(t,e){void 0===e&&(e=!0);var r="";t.forEachNT(function(n){e&&n.isAuxiliary||(r+=n.label+" -> ",r+=function(t,e,r){void 0===r&&(r=!0);for(var n="",i=" ",o=0;o<e.length;o++)o>0&&(r||(n+="\n",n+=i),n+=" | "),n+=rr(0,e[o].rhs,r);return r||(n+="\n",n+=i),n+" ;"}(0,t.rulesForNT(n),e)+"\n\n")})}(this.grammar,!1),this.grammar.cycles,this.grammar.leftRecursion,this},Object.defineProperty(t.prototype,"count",{get:function(){var t,e,r,n,i=0;try{for(var o=sr(this.entries.values()),s=o.next();!s.done;s=o.next()){var a=s.value;try{for(var u=(r=void 0,sr(a.values())),l=u.next();!l.done;l=u.next())i+=l.value.length}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return i},enumerable:!1,configurable:!0}),t.prototype.ensureEntry=function(t,e){r(!t.isTerminal&&e.isTerminal);var n=this.entries.get(t.id);n||(n=new Map,this.entries.set(t.id,n));var i=n.get(e.id);return i||(i=[],n.set(e.id,i)),i},t.prototype.add=function(t,e,r){var n=this.ensureEntry(t,e);return n.findIndex(function(t){return t.equals(r)})<0&&n.push(r),1==n.length},t.prototype.get=function(t,e){return this.ensureEntry(t,e)},t.prototype.forEachEntry=function(t){var e,n,i,o;try{for(var s=sr(this.entries.keys()),a=s.next();!a.done;a=s.next()){var u=a.value,l=this.entries.get(u)||null;r(null!=l);var h=this.grammar.getSymById(u);r(null!=h);try{for(var c=(i=void 0,sr(l.keys())),p=c.next();!p.done;p=c.next()){var f=p.value,d=this.grammar.getSymById(f);if(r(null!=d),0==t(h,d,l.get(f)||[]))return}}catch(t){i={error:t}}finally{try{p&&!p.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}},Object.defineProperty(t.prototype,"debugValue",{get:function(){var t={};return this.forEachEntry(function(e,r,n){var i,o;t[e.label]=t[e.label]||{},t[e.label][r.label]=t[e.label][r.label]||[];var s=t[e.label][r.label];try{for(var a=sr(n),u=a.next();!u.done;u=a.next()){var l=u.value;s.push(l.debugString)}}catch(t){i={error:t}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}),t},enumerable:!1,configurable:!0}),t.prototype.processRule=function(t,e){var n=this,i=this.grammar.firstSets,o=!1;i.forEachTermIn(t.rhs,0,function(e){null==e?o=!0:n.add(t.nt,e,t)}),o&&this.grammar.followSets.forEachTerm(t.nt,function(e){r(null!=e,"Follow sets cannot have null"),n.add(t.nt,e,t)})}}(),function(){function t(t){this.idCounter=0,this.parseTable=t,this.stack=[];var e=t.grammar;r(null!=e.startSymbol,"Start symbol not selected"),this.docNode=this.push(e.Eof,new Ze(this.idCounter++,new it(e,"<DOC>",!1),null)),this.rootNode=this.push(e.startSymbol),this.docNode.add(this.rootNode)}return Object.defineProperty(t.prototype,"debugString",{get:function(){return"Stack: ["+this.stack.map(function(t){return t[0].label}).join(", ")+"]"},enumerable:!1,configurable:!0}),t.prototype.push=function(t,e){return void 0===e&&(e=null),e||(e=new Ze(this.idCounter++,t,null)),this.stack.push([t,e]),e},t.prototype.top=function(){return this.stack[this.stack.length-1]},t.prototype.pop=function(){return 0==this.stack.length&&r(!1,"Stacks are empty"),this.stack.pop()},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0==this.stack.length},enumerable:!1,configurable:!0}),t}()),lr=(function(t){function e(e){var n=t.call(this)||this;return n.parseTable=e,r(null!=e.grammar.startSymbol,"Start symbol not selected"),n}or(e,t),Object.defineProperty(e.prototype,"grammar",{get:function(){return this.parseTable.grammar},enumerable:!1,configurable:!0}),e.prototype.parseInput=function(t,e){var n,i;void 0===e&&(e=null),this.stack=new ur(this.parseTable);var o,s,a,u=this.tokenbuffer,l=this.stack,h=this.grammar;do{o=u.peek(t),s=(n=ar(l.top(),2))[0],a=n[1];var c=null==o?h.Eof:this.getSym(o),p=null==o?null:o.value;if(s.isTerminal)s==c?this.consumeTokenAndPop(t,c,o):this.processInvalidToken(c,o);else{var f=this.parseTable.get(s,c);if(1!=f.length)console.log("TopItem: ",s),console.log("nextSym: ",c),this.processInvalidReductions(a,s,c,p,f);else{var d=ar(this.stack.pop(),2),m=d[0],y=d[1];r(y==a),r(m==f[0].nt),r(y.sym==m),this.popSymAndPushRule(y,f[0])}}s=(i=ar(l.top(),2))[0],a=i[1]}while(s!=h.Eof);return l.rootNode},e.prototype.popSymAndPushRule=function(t,e){for(var r=e.rhs.syms.length-1;r>=0;r--){var n=e.rhs.syms[r],i=this.stack.push(n);t.add(i,0)}},e.prototype.consumeTokenAndPop=function(t,e,n){var i=ar(this.stack.top(),2),o=i[0],s=i[1];r(o==e),r(s.sym==e),s.value=n.value,this.tokenbuffer.next(t),this.stack.pop()},e.prototype.processInvalidToken=function(t,e){throw new Error("Invalid token: "+t.label)},e.prototype.processInvalidReductions=function(t,e,r,n,i){throw new Error("Invalid # reductions ".concat(i.length," found ").concat(e.label," -> ").concat(r.label))}}(er),function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}()),hr=function(t){function e(e,r,n){void 0===n&&(n=null);var i=this.constructor,o=t.call(this,e)||this;return o.type=r,o.value=n,Object.setPrototypeOf(o,i.prototype),o}return lr(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return this.constructor.name},enumerable:!1,configurable:!0}),e}(Error),cr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),pr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},fr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dr=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};(ir=nr||(nr={}))[ir.ACCEPT=0]="ACCEPT",ir[ir.SHIFT=1]="SHIFT",ir[ir.REDUCE=2]="REDUCE",ir[ir.GOTO=3]="GOTO";var mr=function(){function t(){this.gotoState=null,this.rule=null}return t.prototype.toString=function(){return this.tag==nr.ACCEPT?"Acc":this.tag==nr.SHIFT?"S"+this.gotoState:this.tag==nr.REDUCE?"R "+this.rule.id:""+this.gotoState},t.prototype.equals=function(t){return this.tag==t.tag&&this.gotoState==t.gotoState&&this.rule==t.rule},t.Shift=function(e){var r=new t;return r.tag=nr.SHIFT,r.gotoState=e,r},t.Reduce=function(e){var r=new t;return r.tag=nr.REDUCE,r.rule=e,r},t.Goto=function(e){var r=new t;return r.tag=nr.GOTO,r.gotoState=e,r},t.Accept=function(){var e=new t;return e.tag=nr.ACCEPT,e},t}(),yr=function(){function t(t){this.grammar=t,this.conflictActions={},this.actions={}}return Object.defineProperty(t.prototype,"hasConflicts",{get:function(){return Object.keys(this.conflictActions).length>0},enumerable:!1,configurable:!0}),t.prototype.getActions=function(t,e,r){var n;if(void 0===r&&(r=!1),t in this.actions)n=this.actions[t];else{if(!r)return[];n=this.actions[t]={}}return e.id in n?n[e.id]:r?n[e.id]=[]:[]},t.prototype.addAction=function(t,e,r){var n=this.getActions(t,e,!0);return n.findIndex(function(t){return t.equals(r)})<0&&n.push(r),n.length>1&&(this.conflictActions[t]=this.conflictActions[t]||{},this.conflictActions[t][e.label]=!0),this},Object.defineProperty(t.prototype,"debugValue",{get:function(){var t={};for(var e in this.actions)for(var r in t[e]={},this.actions[e]){var n=this.grammar.getSymById(r),i=this.actions[e][n.id]||[];i.length>0&&(t[e][n.label]=i.map(function(t){return t.toString()}))}return t},enumerable:!1,configurable:!0}),t}(),gr=function(){function t(){this.stateStack=[],this.nodeStack=[]}return t.prototype.push=function(t,e){this.stateStack.push(t),this.nodeStack.push(e)},t.prototype.top=function(t){return void 0===t&&(t=0),[this.stateStack[this.stateStack.length-1-t],this.nodeStack[this.nodeStack.length-1-t]]},t.prototype.pop=function(){var t=this.top();return this.stateStack.pop(),this.nodeStack.pop(),t},t.prototype.popN=function(t){void 0===t&&(t=1);var e=this.stateStack.length;this.stateStack.splice(e-t,t),this.nodeStack.splice(e-t,t)},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0==this.stateStack.length||0==this.nodeStack.length},enumerable:!1,configurable:!0}),t}(),vr=function(t){function e(e,r){void 0===r&&(r={});var n=t.call(this)||this;return n.parseTable=e,n}return cr(e,t),Object.defineProperty(e.prototype,"grammar",{get:function(){return this.parseTable.grammar},enumerable:!1,configurable:!0}),e.prototype.parseInput=function(t,e){var n,i,o;e=e||{},this.tokenbuffer.tokenizerContext=e.tokenizerContext,0!=e.buildParseTree&&(e.buildParseTree=!0),0!=e.copySingleChild&&(e.copySingleChild=!0);var s=0,a=new gr;a.push(0,new Ze(s++,this.grammar.augStartRule.nt,null));var u=this.tokenbuffer,l=this.grammar,h=null;function c(t){if(null==e?void 0:e.actionResolver)return e.actionResolver(t,a,u);if(t.length>1)throw new Error("Multiple actions found.");return t[0]}function p(){try{return u.peek(t)}catch(r){if(!(null==e?void 0:e.onTokenError)||!(null==e?void 0:e.onTokenError(r,t)))throw r;return p()}}for(;;){var f=p();if(null==f){if(a.isEmpty)break}else e.onNextToken&&(f=e.onNextToken(f));var d=null==f?l.Eof:this.getSym(f),m=null==f?null:f.value,y=pr(a.top(),2),g=y[0],v=(y[1],this.parseTable.getActions(g,d));if(null==v||0==v.length)throw new hr("Unexpected Token: '".concat(d.label,"'"),"UnexpectedToken",{state:g,token:f,nextSym:d});var x=c(v);if(x.tag==nr.ACCEPT)break;if(x.tag==nr.SHIFT){u.next(t);var b=new Ze(s++,d,m);a.push(x.gotoState,b)}else{r(null!=x.rule,"Nonterm and ruleindex must be provided for a reduction action");var E=x.rule.rhs.length;if(b=new Ze(s++,x.rule.nt,null),e.buildParseTree)for(var C=E-1;C>=0;C--){var S=a.top(C)[1];if(e.beforeAddingChildNode)try{for(var w=(n=void 0,fr(e.beforeAddingChildNode(b,S))),A=w.next();!A.done;A=w.next()){var D=A.value;b.add(D)}}catch(t){n={error:t}}finally{try{A&&!A.done&&(i=w.return)&&i.call(w)}finally{if(n)throw n.error}}else null!=S&&b.add(S)}if(x.rule.action)if(x.rule.action.isFunction){var k=x.rule.action.value,_=e.ruleHandlers[k];if(!_)throw new Error("Action handler not found: "+k);b.value=_.apply(void 0,dr([x.rule,b],pr(b.children),!1))}else b.value=b.children[x.rule.action.value-1].value;else e.onReduction?b=e.onReduction(b,x.rule):1==b.children.length&&e.copySingleChild&&(b.value=b.children[0].value);a.popN(E),g=(o=pr(a.top(),2))[0],o[1];var T=c(this.parseTable.getActions(g,x.rule.nt));r(null!=T&&null!=T.gotoState,"Top item does not have an action."),a.push(T.gotoState,b),h=b}}return h},e}(er),xr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),br=function(){return br=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},br.apply(this,arguments)},Er=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Cr=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},Sr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wr=function(){function t(t,e){void 0===e&&(e=0),this.id=0,this.rule=t,this.position=e}return t.prototype.advance=function(){return r(this.position<this.rule.rhs.length),new t(this.rule,this.position+1)},t.prototype.copy=function(){return new t(this.rule,this.position)},Object.defineProperty(t.prototype,"key",{get:function(){return r(!isNaN(this.rule.id),"Rule's ID is not yet set."),this.rule.id+":"+this.position},enumerable:!1,configurable:!0}),t.prototype.compareTo=function(t){var e=this.rule.id-t.rule.id;return 0==e&&(e=this.position-t.position),e},t.prototype.equals=function(t){return 0==this.compareTo(t)},Object.defineProperty(t.prototype,"debugString",{get:function(){var t=this.rule,e=this.position,r=t.rhs.syms.slice(0,e).join(" "),n=t.rhs.syms.slice(e).join(" ");return"".concat(t.id," - ").concat(t.nt," -> ").concat(r," • ").concat(n)},enumerable:!1,configurable:!0}),t}(),Ar=function(){function t(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.id=0,this._key=null,this._lookaheads={},this._hasLookAheads=!1,this.itemGraph=t,this.values=e}return t.prototype.copy=function(){var e=new(t.bind.apply(t,Cr([void 0,this.itemGraph],Er(this.values),!1)));return e._lookaheads=br({},this._lookaheads),e._hasLookAheads=this._hasLookAheads,e},t.prototype.addLookAhead=function(t,e){var r,n;t.id in this._lookaheads||(this._lookaheads[t.id]=[]);try{for(var i=Sr(this._lookaheads[t.id]),o=i.next();!o.done;o=i.next())if(o.value==e)return!1}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this._hasLookAheads=!0,this._key=null,this._lookaheads[t.id].push(e),this._lookaheads[t.id].sort(function(t,e){return t.id-e.id}),!0},t.prototype.clearLookAheads=function(){this._lookaheads={}},t.prototype.getLookAheads=function(t){return this._lookaheads[t.id]||[]},Object.defineProperty(t.prototype,"key",{get:function(){return null==this._key&&(this._key=this.revalKey()),this._key},enumerable:!1,configurable:!0}),t.prototype.revalKey=function(){var t=this;return this.hasLookAheads?(this.values.sort(),this.values.map(function(e){return e+"["+(t._lookaheads[e]||[]).map(function(t){return t.id}).join(",")+"]"}).join("/")):(this.values.sort(),this.values.join("/"))},t.prototype.has=function(t){return this.values.indexOf(t)>=0},t.prototype.equals=function(t){return this.key==t.key},t.prototype.add=function(t){return this.has(t)||(this.values.push(t),this._key=null),this},Object.defineProperty(t.prototype,"size",{get:function(){return this.values.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugString",{get:function(){return this.debugValue.join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasLookAheads",{get:function(){return this._hasLookAheads},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugValue",{get:function(){var t,e=this;return this.hasLookAheads?((t=this.values.map(function(t){return e.itemGraph.items.get(t)})).sort(function(t,e){return t.compareTo(e)}),t.map(function(t){var r=e.getLookAheads(t).map(function(t){return t.label}).sort(function(t,e){return t.localeCompare(e)}).join(", ");return r.length>0?"".concat(t.debugString," / ( ").concat(r," )"):t.debugString})):((t=this.values.map(function(t){return e.itemGraph.items.get(t)})).sort(function(t,e){return t.compareTo(e)}),t.map(function(t){return t.debugString}))},enumerable:!1,configurable:!0}),t}(),Dr=function(){function t(t){this.grammar=t,this.gotoSets={},this.items=new q,this.itemSets=new q}return t.prototype.startItem=function(){return r(null!=this.grammar.startSymbol,"Start symbol must be set"),r(null!=(this.grammar.augStartRule||null),"Grammar is not augmented"),this.items.ensure(new wr(this.grammar.augStartRule))},t.prototype.reset=function(){this.grammar.refresh(),this.gotoSets={},this.items.clear(),this.itemSets.clear(),this.startSet()},t.prototype.refresh=function(){return this.reset(),this.grammar.refresh(),this.evalGotoSets(),this},t.prototype.evalGotoSets=function(){for(var t,e,r=this.itemSets,n=0;n<r.size;n++){var i=r.get(n);try{for(var o=(t=void 0,Sr(this.grammar.allSymbols)),s=o.next();!s.done;s=o.next()){var a=s.value;if(a!=this.grammar.Null){var u=this.goto(i,a);u.size>0&&this.setGoto(i,a,u)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}}},t.prototype.goto=function(t,e){var r,n,i=this.newItemSet();try{for(var o=Sr(t.values),s=o.next();!s.done;s=o.next()){var a=s.value,u=this.items.get(a),l=u.rule;u.position<l.rhs.length&&l.rhs.syms[u.position]==e&&this.advanceItemAndAdd(u,t,i)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this.closure(i)},t.prototype.advanceItemAndAdd=function(t,e,r){var n,i,o=this.items.ensure(t.advance());r.add(o.id);try{for(var s=Sr(e.getLookAheads(t)),a=s.next();!a.done;a=s.next()){var u=a.value;r.addLookAhead(o,u)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}},t.prototype.newItemSet=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new(Ar.bind.apply(Ar,Cr([void 0,this],Er(t.map(function(t){return t.id})),!1)))},Object.defineProperty(t.prototype,"size",{get:function(){return this.itemSets.size},enumerable:!1,configurable:!0}),t.prototype.ensureGotoSet=function(t){return t.id in this.gotoSets||(this.gotoSets[t.id]={}),this.gotoSets[t.id]},t.prototype.setGoto=function(t,e,r){this.ensureGotoSet(t)[e.id]=r},t.prototype.getGoto=function(t,e){return(this.gotoSets[t.id]||{})[e.id]||null},t.prototype.forEachGoto=function(t,e){var r=this.gotoSets[t.id]||{};for(var n in r)if(0==e(this.grammar.getSymById(n),r[n]))break},t.prototype.gotoSetFor=function(t){return this.gotoSets[t.id]||{}},Object.defineProperty(t.prototype,"debugValue",{get:function(){var t=this,e={};return this.itemSets.entries.forEach(function(r){e[r.id]={items:[],goto:{}},e[r.id].items=r.debugValue;var n=t.gotoSets[r.id];for(var i in n){var o=t.grammar.getSymById(i);e[r.id].goto=e[r.id].goto||{},e[r.id].goto[o.label]=n[i].id}}),e},enumerable:!1,configurable:!0}),t}(),kr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xr(e,t),e.prototype.startSet=function(){var t=this.startItem(),e=this.newItemSet(t);return this.closure(e)},e.prototype.closure=function(t){for(var e,r,n=new(Ar.bind.apply(Ar,Cr([void 0,this],Er(t.values),!1))),i=0;i<n.values.length;i++){var o=n.values[i],s=this.items.get(o),a=s.rule;if(s.position<a.rhs.length){var u=a.rhs.syms[s.position];if(!u.isTerminal)try{for(var l=(e=void 0,Sr(this.grammar.rulesForNT(u))),h=l.next();!h.done;h=l.next()){var c=h.value,p=this.items.ensure(new wr(c,0));n.add(p.id)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}}}return 0==n.size?n:this.itemSets.ensure(n)},e}(Dr),_r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xr(e,t),e.prototype.startSet=function(){var t=this.startItem(),e=this.newItemSet(t);return e.addLookAhead(t,this.grammar.Eof),this.closure(e)},e.prototype.closure=function(t){for(var e=this,r=t.copy(),n=function(t){var n,o,s=r.values[t],a=i.items.get(s);if(a.position>=a.rule.rhs.length)return"continue";var u=a.rule.rhs,l=u.syms[a.position];if(l.isTerminal)return"continue";try{for(var h=(n=void 0,Sr(r.getLookAheads(a))),c=h.next();!c.done;c=h.next()){var p=c.value,f=u.copy().append(p);i.grammar.firstSets.forEachTermIn(f,a.position+1,function(t){var n,i;if(null!=t){var o=e.grammar.rulesForNT(l);try{for(var s=(n=void 0,Sr(o)),a=s.next();!a.done;a=s.next()){var u=a.value,h=e.items.ensure(new wr(u,0));r.add(h.id),r.addLookAhead(h,t)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}}})}}catch(t){n={error:t}}finally{try{c&&!c.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}},i=this,o=0;o<r.values.length;o++)n(o);return 0==r.size?r:this.itemSets.ensure(r)},e}(Dr),Tr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Fr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};function Ir(t,e){switch(void 0===e&&(e="lr1"),e){case"lr1":return[Br(i=new _r(n=t).refresh(),n),i];case"lalr":return function(t){var e=Fr(Or(t),2),n=e[0],i=e[1];if(!n.hasConflicts)return[n,i];var o=function(t,e){var n=new ut;function i(t,r){var i="[".concat(t,":").concat(r.label,"]"),o=n.ensureSym(new it(n,i,r.isTerminal),!1);return 0!=t||e.startSymbol!=r||e.startSymbol==o||r.isTerminal||(n.startSymbol=o),o}for(var o in t.gotoSets){var s=t.gotoSets[o];for(var a in s){var u=e.getSymById(a);i(o,u)}}function l(e,n,o){var s=e,a=o.rhs.syms.map(function(e,n){var o=i(s,e),a=t.gotoSets[s][e.id]||null;return r(null!=a,"Next set transition *must* be valid"),s=a.id,o});return new(ot.bind.apply(ot,function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}([void 0],Fr(a),!1)))}for(var o in t.gotoSets){s=t.gotoSets[o];var h=function(t){var r=e.getSymById(t),s=o;if(!r.isTerminal){var a=i(s,r);e.forEachRule(r,function(t,e){var r=l(s,0,t),i=new at(a,r);n.addRule(i)})}};for(var a in s)h(a)}return n}(i,t),s={};for(var a in i.gotoSets)for(var u in i.gotoSets[a]){var l=i.gotoSets[a][u];l.id in s||(s[l.id]={}),u in s[l.id]||(s[l.id][u]=new Set),s[l.id][u].add(a)}for(var a in n.conflictActions){var h=i.itemSets.get(a);Rr(t,o,i,h,s)}return[Br(i,t),i]}(t)}var n,i;return Or(t)}function Or(t){var e=function(t){var e,r,n=new kr(t).refresh();try{for(var i=Tr(n.itemSets.entries),o=i.next();!o.done;o=i.next())Nr(t,n,o.value)}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}(t);return[Br(e,t),e]}function Nr(t,e,n){var i,o,s=function(i){var o=e.items.get(i),s=o.rule;o.position>=s.rhs.length&&t.followSets.forEachTerm(s.nt,function(t){null!=t&&(r(t.isTerminal),n.addLookAhead(o,t))})};try{for(var a=Tr(n.values),u=a.next();!u.done;u=a.next())s(u.value)}catch(t){i={error:t}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}function Br(t,e){var r,n,i=new yr(e),o=function(r){var n,o,s,a;try{for(var u=(n=void 0,Tr(r.values)),l=u.next();!l.done;l=u.next()){var h=l.value,c=t.items.get(h),p=c.rule;if(c.position<p.rhs.length){var f=p.rhs.syms[c.position];if(f.isTerminal){var d=t.getGoto(r,f);d&&i.addAction(r.id,f,mr.Shift(d.id))}}else if(!p.nt.equals(e.augStartRule.nt)){var m=r.getLookAheads(c);try{for(var y=(s=void 0,Tr(m)),g=y.next();!g.done;g=y.next()){var v=g.value;i.addAction(r.id,v,mr.Reduce(p))}}catch(t){s={error:t}}finally{try{g&&!g.done&&(a=y.return)&&a.call(y)}finally{if(s)throw s.error}}}}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}t.forEachGoto(r,function(t,e){null==t||t.isTerminal||i.addAction(r.id,t,mr.Goto(e.id))});var x=t.items.ensure(new wr(e.augStartRule,1));r.addLookAhead(x,e.Eof),r.has(x.id)&&i.addAction(r.id,e.Eof,mr.Accept())};try{for(var s=Tr(t.itemSets.entries),a=s.next();!a.done;a=s.next())o(a.value)}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return i}function Rr(t,e,n,i,o){var s,a;function u(t,e,i,s){if(e<0)r(null!=(n.gotoSets[i][t.nt.id]||null),"Transition on rule.nt missing from start state"),s.add(i);else{var a=t.rhs.syms[e],l=o[i][a.id]||null;r(null!=l,"Prev set should not be null"),l.forEach(function(r){return u(t,e-1,r,s)})}}i.clearLookAheads();var l=function(o){var s=n.items.get(o),a=s.rule;if(s.position>=a.rhs.length){var l=new Set;u(a,a.rhs.length-1,i.id,l),l.forEach(function(n){var o="[".concat(n,":").concat(a.nt.label,"]"),u=e.getSym(o);r(null!=u,"Augmented grammar symbol [p:A] not found"),e.followSets.forEachTerm(u,function(n){if(null!=n&&n!=e.Eof){r(n.isTerminal);var o=n.label.substring(n.label.indexOf(":")+1,n.label.length-1).trim(),a=t.getSym(o);r(null!=a,"T (".concat(o,") in [r:T] cannot be null")),i.addLookAhead(s,a)}})})}};try{for(var h=Tr(i.values),c=h.next();!c.done;c=h.next())l(c.value)}catch(t){s={error:t}}finally{try{c&&!c.done&&(a=h.return)&&a.call(h)}finally{if(s)throw s.error}}}var Pr,Lr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Mr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){t[t.WORD_CHAR=0]="WORD_CHAR",t[t.DIGITS=1]="DIGITS",t[t.SPACES=2]="SPACES"}(Pr||(Pr={}));var Ur,jr,zr="0".charCodeAt(0),Jr="9".charCodeAt(0),Vr="a".charCodeAt(0),Xr="z".charCodeAt(0),Gr="A".charCodeAt(0),Wr="Z".charCodeAt(0),Hr="_".charCodeAt(0),Kr=function(){function t(){}return t.prototype.matches=function(t,e){var r=this.match(t);return e?!r:r},t}(),qr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mr(e,t),e.prototype.match=function(t){if(t>=8192&&t<=8202)return!0;for(var e=0;e<14;e++)if(" \f\n\r\t\v  \u2028\u2029   \ufeff".charCodeAt(e)==t)return!0;return!1},e.prototype.reString=function(t){return t?"\\S":"\\s"},e}(Kr),Yr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mr(e,t),e.prototype.match=function(t){return t>=zr&&t<=Jr},e.prototype.reString=function(t){return t?"\\D":"\\d"},e}(Kr),$r=[new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mr(e,t),e.prototype.match=function(t){return t==Hr||t>=zr&&t<=Jr||t>=Vr&&t<=Xr||t>=Gr&&t<=Wr},e.prototype.reString=function(t){return t?"\\W":"\\w"},e}(Kr)),new Yr,new qr];!function(t){t[t.gc=0]="gc",t[t.General_Category=0]="General_Category",t[t.sc=1]="sc",t[t.Script=1]="Script",t[t.scx=2]="scx",t[t.Script_Extension=2]="Script_Extension",t[t.Any=3]="Any",t[t.ASCII=4]="ASCII",t[t.AHex=5]="AHex",t[t.ASCII_Hex_Digit=5]="ASCII_Hex_Digit",t[t.Alpha=6]="Alpha",t[t.Alphabetic=6]="Alphabetic",t[t.Bidi_M=7]="Bidi_M",t[t.Bidi_Mirrored=7]="Bidi_Mirrored",t[t.Bidi_C=8]="Bidi_C",t[t.Bidi_Control=8]="Bidi_Control",t[t.CI=9]="CI",t[t.Case_Ignorable=9]="Case_Ignorable",t[t.Cased=10]="Cased",t[t.CWCF=11]="CWCF",t[t.Changes_When_Casefolded=11]="Changes_When_Casefolded",t[t.CWCM=12]="CWCM",t[t.Changes_When_Casemapped=12]="Changes_When_Casemapped",t[t.CWL=13]="CWL",t[t.Changes_When_Lowercased=13]="Changes_When_Lowercased",t[t.CWKCF=14]="CWKCF",t[t.Changes_When_NFKC_Casefolded=14]="Changes_When_NFKC_Casefolded",t[t.CWT=15]="CWT",t[t.Changes_When_Titlecased=15]="Changes_When_Titlecased",t[t.CWU=16]="CWU",t[t.Changes_When_Uppercased=16]="Changes_When_Uppercased",t[t.Dash=17]="Dash",t[t.DI=18]="DI",t[t.Default_Ignorable_Code_Point=18]="Default_Ignorable_Code_Point",t[t.Dep=19]="Dep",t[t.Deprecated=19]="Deprecated",t[t.Dia=20]="Dia",t[t.Diacritic=20]="Diacritic",t[t.Emoji=21]="Emoji",t[t.Emoji_Component=22]="Emoji_Component",t[t.Emoji_Modifier=23]="Emoji_Modifier",t[t.Emoji_Modifier_Base=24]="Emoji_Modifier_Base",t[t.Emoji_Presentation=25]="Emoji_Presentation",t[t.Ext=26]="Ext",t[t.Extender=26]="Extender",t[t.Gr_Base=27]="Gr_Base",t[t.Grapheme_Base=27]="Grapheme_Base",t[t.Gr_Ext=28]="Gr_Ext",t[t.Grapheme_Extend=28]="Grapheme_Extend",t[t.Hex=29]="Hex",t[t.Hex_Digit=29]="Hex_Digit",t[t.IDSB=30]="IDSB",t[t.IDS_Binary_Operator=30]="IDS_Binary_Operator",t[t.IDST=31]="IDST",t[t.IDS_Trinary_Operator=31]="IDS_Trinary_Operator",t[t.IDC=32]="IDC",t[t.ID_Continue=32]="ID_Continue",t[t.IDS=33]="IDS",t[t.ID_Start=33]="ID_Start",t[t.Ideo=34]="Ideo",t[t.Ideographic=34]="Ideographic",t[t.Join_C=35]="Join_C",t[t.Join_Control=35]="Join_Control",t[t.LOE=36]="LOE",t[t.Logical_Order_Exception=36]="Logical_Order_Exception",t[t.Lower=37]="Lower",t[t.Lowercase=37]="Lowercase",t[t.Math=38]="Math",t[t.NChar=39]="NChar",t[t.Noncharacter_Code_Point=39]="Noncharacter_Code_Point",t[t.Pat_Syn=40]="Pat_Syn",t[t.Pattern_Syntax=40]="Pattern_Syntax",t[t.Pat_WS=41]="Pat_WS",t[t.Pattern_White_Space=41]="Pattern_White_Space",t[t.QMark=42]="QMark",t[t.Quotation_Mark=42]="Quotation_Mark",t[t.Radical=43]="Radical",t[t.RI=44]="RI",t[t.Regional_Indicator=44]="Regional_Indicator",t[t.STerm=45]="STerm",t[t.Sentence_Terminal=45]="Sentence_Terminal",t[t.SD=46]="SD",t[t.Soft_Dotted=46]="Soft_Dotted",t[t.Term=47]="Term",t[t.Terminal_Punctuation=47]="Terminal_Punctuation",t[t.UIdeo=48]="UIdeo",t[t.Unified_Ideograph=48]="Unified_Ideograph",t[t.Upper=49]="Upper",t[t.Uppercase=49]="Uppercase",t[t.VS=50]="VS",t[t.Variation_Selector=50]="Variation_Selector",t[t.space=51]="space",t[t.White_Space=51]="White_Space",t[t.XIDC=52]="XIDC",t[t.XID_Continue=52]="XID_Continue",t[t.XIDS=53]="XIDS",t[t.XID_Start=53]="XID_Start"}(Ur||(Ur={})),function(t){t[t.LC=0]="LC",t[t.Cased_Letter=0]="Cased_Letter",t[t.Pe=1]="Pe",t[t.Close_Punctuation=1]="Close_Punctuation",t[t.Pc=2]="Pc",t[t.Connector_Punctuation=2]="Connector_Punctuation",t[t.Cc=3]="Cc",t[t.cntrl=3]="cntrl",t[t.Control=3]="Control",t[t.Sc=4]="Sc",t[t.Currency_Symbol=4]="Currency_Symbol",t[t.Pd=5]="Pd",t[t.Dash_Punctuation=5]="Dash_Punctuation",t[t.Nd=6]="Nd",t[t.digit=6]="digit",t[t.Decimal_Number=6]="Decimal_Number",t[t.Me=7]="Me",t[t.Enclosing_Mark=7]="Enclosing_Mark",t[t.Pf=8]="Pf",t[t.Final_Punctuation=8]="Final_Punctuation",t[t.Cf=9]="Cf",t[t.Format=9]="Format",t[t.Pi=10]="Pi",t[t.Initial_Punctuation=10]="Initial_Punctuation",t[t.L=11]="L",t[t.Letter=11]="Letter",t[t.Nl=12]="Nl",t[t.Letter_Number=12]="Letter_Number",t[t.Zl=13]="Zl",t[t.Line_Separator=13]="Line_Separator",t[t.Ll=14]="Ll",t[t.Lowercase_Letter=14]="Lowercase_Letter",t[t.M=15]="M",t[t.Combining_Mark=15]="Combining_Mark",t[t.Mark=16]="Mark",t[t.Sm=17]="Sm",t[t.Math_Symbol=17]="Math_Symbol",t[t.Lm=18]="Lm",t[t.Modifier_Letter=18]="Modifier_Letter",t[t.Sk=19]="Sk",t[t.Modifier_Symbol=19]="Modifier_Symbol",t[t.Mn=20]="Mn",t[t.Nonspacing_Mark=20]="Nonspacing_Mark",t[t.N=21]="N",t[t.Number=21]="Number",t[t.Ps=22]="Ps",t[t.Open_Punctuation=22]="Open_Punctuation",t[t.C=23]="C",t[t.Other=23]="Other",t[t.Lo=24]="Lo",t[t.Other_Letter=24]="Other_Letter",t[t.No=25]="No",t[t.Other_Number=25]="Other_Number",t[t.Po=26]="Po",t[t.Other_Punctuation=26]="Other_Punctuation",t[t.So=27]="So",t[t.Other_Symbol=27]="Other_Symbol",t[t.Zp=28]="Zp",t[t.Paragraph_Separator=28]="Paragraph_Separator",t[t.Co=29]="Co",t[t.Private_Use=29]="Private_Use",t[t.P=30]="P",t[t.punct=30]="punct",t[t.Punctuation=30]="Punctuation",t[t.Z=31]="Z",t[t.Separator=31]="Separator",t[t.Zs=32]="Zs",t[t.Space_Separator=32]="Space_Separator",t[t.Mc=33]="Mc",t[t.Spacing_Mark=33]="Spacing_Mark",t[t.Cs=34]="Cs",t[t.Surrogate=34]="Surrogate",t[t.S=35]="S",t[t.Symbol=35]="Symbol",t[t.Lt=36]="Lt",t[t.Titlecase_Letter=36]="Titlecase_Letter",t[t.Cn=37]="Cn",t[t.Unassigned=37]="Unassigned",t[t.Lu=38]="Lu",t[t.Uppercase_Letter=38]="Uppercase_Letter"}(jr||(jr={}));var Qr,Zr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),tn=function(){return tn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},tn.apply(this,arguments)},en=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rn=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},nn=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};!function(t){t[t.START_OF_INPUT=0]="START_OF_INPUT",t[t.END_OF_INPUT=1]="END_OF_INPUT",t[t.START_OF_WORD=2]="START_OF_WORD",t[t.END_OF_WORD=3]="END_OF_WORD",t[t.UNION=4]="UNION",t[t.CAT=5]="CAT",t[t.VAR=6]="VAR",t[t.BACK_NAMED_REF=7]="BACK_NAMED_REF",t[t.BACK_NUM_REF=8]="BACK_NUM_REF",t[t.QUANT=9]="QUANT",t[t.LOOK_AHEAD=10]="LOOK_AHEAD",t[t.LOOK_BACK=11]="LOOK_BACK",t[t.CHAR=12]="CHAR"}(Qr||(Qr={}));var on,sn=function(){function t(){this.parent=null,this.reString=null,this.groupIndex=-1,this.groupName=null,this.groupIsSilent=!1,this.ignoreCase=null,this.dotAll=null,this.multiline=null}return t.prototype.setOptions=function(t){return"dotAll"in t&&(this.dotAll=t.dotAll),"ignoreCase"in t&&(this.ignoreCase=t.ignoreCase),"groupIndex"in t&&(this.groupIndex=t.groupIndex),"multiline"in t&&(this.multiline=t.multiline),this},t.prototype.debugValue=function(){var t={};return this.dotAll&&(t.dotAll=!0),this.ignoreCase&&(t.ignoreCase=!0),this.multiline&&(t.multiline=!0),this.groupIndex>=0&&(t.groupIndex=this.groupIndex),t},Object.defineProperty(t.prototype,"isVariable",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toString",{get:function(){return null==this.reString&&(this.reString=this.evalREString()),this.reString},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"modifiers",{get:function(){var t="";return this.dotAll&&(t+="d"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.groupIndex>=0&&(t+="g:"+this.groupIndex),0==t.length?t:"<"+t+">"},enumerable:!1,configurable:!0}),t}(),an=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=Qr.START_OF_INPUT,e}return Zr(e,t),e.prototype.debugValue=function(){return"^"},e.prototype.reverse=function(){return this},e.prototype.evalREString=function(){return"^"},e}(sn),un=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=Qr.END_OF_INPUT,e}return Zr(e,t),e.prototype.debugValue=function(){return"$"},e.prototype.evalREString=function(){return"$"},e.prototype.reverse=function(){return this},e}(sn),ln=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=Qr.START_OF_WORD,e}Zr(e,t),e.prototype.debugValue=function(){return"\\b"},e.prototype.reverse=function(){return this},e.prototype.evalREString=function(){return"\\b"}}(sn),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=Qr.END_OF_WORD,e}Zr(e,t),e.prototype.debugValue=function(){return"\\b"},e.prototype.reverse=function(){return this},e.prototype.evalREString=function(){return"\\b"}}(sn),function(t){function e(e,r,n){void 0===n&&(n=!1);var i=t.call(this)||this;return i.expr=e,i.cond=r,i.negate=n,i}return Zr(e,t),e}(sn)),hn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=Qr.LOOK_AHEAD,e}return Zr(e,t),e.prototype.evalREString=function(){return"".concat(this.expr.toString,"(?").concat(this.negate?"!":"=").concat(this.cond.toString,")")},e.prototype.debugValue=function(){return["LookAhead",tn(tn({},t.prototype.debugValue.call(this)),{negate:this.negate,expr:this.expr.debugValue(),cond:this.cond.debugValue()})]},e.prototype.reverse=function(){return new cn(this.expr.reverse(),this.cond.reverse(),this.negate)},e}(ln),cn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=Qr.LOOK_BACK,e}return Zr(e,t),e.prototype.evalREString=function(){return"(?<".concat(this.negate?"!":"=").concat(this.cond.toString,")").concat(this.expr.toString)},e.prototype.debugValue=function(){return["LookBack",tn(tn({},t.prototype.debugValue.call(this)),{negate:this.negate,expr:this.expr.debugValue(),cond:this.cond.debugValue()})]},e.prototype.reverse=function(){return new hn(this.expr.reverse(),this.cond.reverse(),this.negate)},e}(ln),pn=function(t){function e(e,r,n,i){void 0===r&&(r=1),void 0===n&&(n=1),void 0===i&&(i=!0);var o=t.call(this)||this;return o.expr=e,o.minCount=r,o.maxCount=n,o.greedy=i,o.tag=Qr.QUANT,o}return Zr(e,t),Object.defineProperty(e.prototype,"isUnlimited",{get:function(){return this.maxCount<0||this.maxCount==n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isVariable",{get:function(){return this.minCount!=this.maxCount||!this.expr.isVariable},enumerable:!1,configurable:!0}),e.prototype.reverse=function(){return new e(this.expr.reverse(),this.minCount,this.maxCount,this.greedy)},e.prototype.evalREString=function(){var t="*";return 1==this.minCount&&this.isUnlimited?t="+":0==this.minCount&&this.isUnlimited?t="*":0==this.minCount&&1==this.maxCount?t="?":1==this.minCount&&1==this.maxCount||(t=this.minCount==this.maxCount?"{".concat(this.minCount,"}"):"{".concat(this.minCount,",").concat(this.isUnlimited?"":this.maxCount,"}")),"".concat(this.expr.toString).concat(t)},e.prototype.debugValue=function(){var e="*";return 1==this.minCount&&this.isUnlimited?e=this.greedy?"+?":"+":0==this.minCount&&this.isUnlimited?e=this.greedy?"*?":"*":0==this.minCount&&1==this.maxCount?e=this.greedy?"??":"?":1==this.minCount&&1==this.maxCount||(e=this.minCount==this.maxCount?"{".concat(this.minCount,"}")+(this.greedy?"?":""):"{".concat(this.minCount,",").concat(this.maxCount,"}")+(this.greedy?"?":"")),[e,t.prototype.debugValue.call(this),this.expr.debugValue()]},e}(sn),fn=function(t){function e(){for(var e,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=t.call(this)||this;o.tag=Qr.CAT,o.children=[];try{for(var s=en(n),a=s.next();!a.done;a=s.next()){var u=a.value;o.add(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return o}return Zr(e,t),Object.defineProperty(e.prototype,"isVariable",{get:function(){var t,e;try{for(var r=en(this.children),n=r.next();!n.done;n=r.next())if(n.value.isVariable)return!0}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return!1},enumerable:!1,configurable:!0}),e.prototype.evalREString=function(){var t=this.children.map(function(t){return t.toString}).join("");return this.children.length>1?"("+t+")":t},e.prototype.reverse=function(){var t=this.children.map(function(t){return t.reverse()});return t.reverse(),new(e.bind.apply(e,nn([void 0],rn(t),!1)))},e.prototype.add=function(t){var e,r;if(t.tag!=Qr.CAT||t.groupIndex>=0)this.children.push(t);else try{for(var n=en(t.children),i=n.next();!i.done;i=n.next()){var o=i.value;this.add(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},e.prototype.debugValue=function(){return["Cat",tn({},t.prototype.debugValue.call(this)),this.children.map(function(t){return t.debugValue()})]},e}(sn),dn=function(t){function e(){for(var e,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=t.call(this)||this;o.tag=Qr.UNION,o.options=[];try{for(var s=en(n),a=s.next();!a.done;a=s.next()){var u=a.value;o.add(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return o}return Zr(e,t),Object.defineProperty(e.prototype,"isVariable",{get:function(){var t,e;try{for(var r=en(this.options),n=r.next();!n.done;n=r.next())if(n.value.isVariable)return!0}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return!1},enumerable:!1,configurable:!0}),e.prototype.evalREString=function(){var t=this.options.map(function(t){return t.toString}).join("|");return this.options.length>1?"("+t+")":t},e.prototype.reverse=function(){var t=this.options.map(function(t){return t.reverse()});return new(e.bind.apply(e,nn([void 0],rn(t),!1)))},e.prototype.add=function(t){var e,r;if(t.tag!=Qr.UNION||t.groupIndex>=0)this.options.push(t);else try{for(var n=en(t.options),i=n.next();!i.done;i=n.next()){var o=i.value;this.add(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},e.prototype.debugValue=function(){return["Union",tn({},t.prototype.debugValue.call(this)),this.options.map(function(t){return t.debugValue()})]},e}(sn);!function(t){t[t.AnyChar=1]="AnyChar",t[t.SingleChar=2]="SingleChar",t[t.CharRange=3]="CharRange",t[t.PropertyEscape=4]="PropertyEscape",t[t.CharClass=5]="CharClass",t[t.Union=6]="Union",t[t.Intersection=7]="Intersection"}(on||(on={}));var mn=function(t){function e(e,r){void 0===r&&(r=!1);var n=t.call(this)||this;return n.op=e,n.neg=r,n.tag=Qr.CHAR,n}return Zr(e,t),e.prototype.match=function(t){var e=this.matchChar(t);return e&&!this.neg||this.neg&&!e},e.prototype.reverse=function(){return this},e.prototype.debugValue=function(){return this.toString+this.modifiers},e}(sn),yn=function(t){function e(e,r,n){void 0===r&&(r=!1),void 0===n&&(n=[]);var i=t.call(this,e,r)||this;return i.op=e,i.neg=r,i.args=n,i}return Zr(e,t),e.Any=function(t){return void 0===t&&(t=!1),new e(on.AnyChar,t)},e.Class=function(t,r){return void 0===r&&(r=!1),new e(on.CharClass,r,[t])},e.Single=function(t,r){return void 0===r&&(r=!1),"string"==typeof t&&(t=t.charCodeAt(0)),new e(on.SingleChar,r,[t])},e.PropertyEscape=function(t,r,n){return void 0===n&&(n=!1),"string"==typeof t&&(t=function(t){if(!((t=t.trim())in Ur))throw new SyntaxError("Invalid property name: "+t);return Ur[t]}(t)),"string"==typeof r&&(r=function(t){if(!((t=t.trim())in jr))throw new SyntaxError("Invalid property value: "+t);return jr[t]}(r)),new e(on.PropertyEscape,n,[t,r])},e.prototype.matchChar=function(t){var e=this.args;switch(this.op){case on.SingleChar:return t==this.args[0];case on.CharClass:return $r[e[0]].matches(t,!1);case on.PropertyEscape:throw new Error("Property Escape Matching - TBD");default:throw new Error("Custom Chars - TBD i: "+this.op)}return!1},e.prototype.compareTo=function(t){if(this.op!=t.op)return this.op-t.op;for(var e=0;e<this.args.length&&e<t.args.length;e++)if(this.args[e]!=t.args[e])return this.args[e]-t.args[e];return this.args.length-t.args.length},e.prototype.evalREString=function(){return this.op==on.AnyChar?".":this.op==on.SingleChar?(t=this.args[0],String.fromCharCode(t).replace("\n","\\n").replace("\0","\\0").replace("\r","\\r").replace("\t","\\t").replace("\f","\\f").replace("\b","\\b")):this.op==on.CharClass?$r[this.args[0]].reString(this.neg):this.op==on.PropertyEscape?this.neg?"\\P{":"\\p{}":"Custom "+this.args.join(" ");var t},e}(mn),gn=function(t){function e(e,r,n){void 0===r&&(r=!1),void 0===n&&(n=[]);var i=t.call(this,e,r)||this;return i.op=e,i.neg=r,i.chars=n,i}return Zr(e,t),e.prototype.compareTo=function(t){if(this.op!=t.op)return this.op-t.op;for(var e=0;e<this.chars.length&&e<t.chars.length;e++){var r=this.chars[e].compareTo(t.chars[e]);if(0!=r)return r}return this.chars.length-t.chars.length},e.prototype.matchChar=function(t){var e=this.chars;switch(this.op){case on.CharRange:return t>=e[0].args[0]&&t<=e[1].args[0];case on.Union:for(var r=0;r<e.length;r++)if(e[r].match(t))return!0;return!1;case on.Intersection:for(r=0;r<e.length;r++)if(!e[r].match(t))return!1;return!0;default:throw new Error("Custom CharGroup - TBD i: "+this.op)}return!1},e.prototype.evalREString=function(){var t=this.chars.map(function(t){return t.debugValue()}).join("");return this.op==on.CharRange?"".concat(this.chars[0].toString,"-").concat(this.chars[1].toString):this.op==on.Union||this.op==on.Intersection?t.length>1?(this.neg?"[^":"[")+t+"]":t:"Custom "+this.chars.join(" ")},e.Range=function(t,r,n){return void 0===n&&(n=!1),new e(on.CharRange,n,[t,r])},e.Union=function(t,r){return void 0===t&&(t=!1),new e(on.Union,t,r)},e.Intersection=function(t,r){return void 0===t&&(t=!1),new e(on.Intersection,t,r)},e}(mn),vn=function(t){function e(e,r){void 0===r&&(r=!1);var n=t.call(this)||this;return n.name=e,n.reversed=r,n.tag=Qr.VAR,n}return Zr(e,t),e.prototype.reverse=function(){return new e(this.name,!this.reversed)},e.prototype.evalREString=function(){return"<"+this.name+">"},e.prototype.debugValue=function(){return["V:"+this.name,tn({},t.prototype.debugValue.call(this))]},e}(sn),xn=function(t){function e(e,r){void 0===r&&(r=!1);var n=t.call(this)||this;return n.name=e,n.reversed=r,n.tag=Qr.BACK_NAMED_REF,n}return Zr(e,t),e.prototype.reverse=function(){return new e(this.name,!this.reversed)},e.prototype.evalREString=function(){return"\\k<"+this.name+">"},e.prototype.debugValue=function(){return tn(tn({},t.prototype.debugValue),{BackRef:this.name})},e}(sn),bn=function(t){function e(e,r){void 0===r&&(r=!1);var n=t.call(this)||this;return n.num=e,n.reversed=r,n.tag=Qr.BACK_NUM_REF,n}return Zr(e,t),e.prototype.reverse=function(){return new e(this.num,!this.reversed)},e.prototype.evalREString=function(){return"\\"+this.num},e.prototype.debugValue=function(){return"\\"+this.num},e}(sn),En=function(){function t(t,e){this.expr=t,this.skip=!1,e=e||{},this.tag=e.tag||null,0==e.priority?this.priority=0:this.priority=e.priority||10,0==e.matchIndex?this.matchIndex=0:this.matchIndex=e.matchIndex||-1,this.skip=e.skip||!1,this.activeStates=e.activeStates||null}return t.prototype.stateCanActivate=function(t){return null==this.activeStates||0==this.activeStates.size||this.activeStates.has("*")||this.activeStates.has(t)},Object.defineProperty(t.prototype,"needsSpecificStates",{get:function(){return null!=this.activeStates&&this.activeStates.size>0&&!this.activeStates.has("*")},enumerable:!1,configurable:!0}),t}(),Cn=function(){return Cn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Cn.apply(this,arguments)},Sn=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},wn=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};function An(t){return"\r"==t||"\n"==t||"\u2028"==t||"\u2029"==t}var Dn,kn=function(t,e,r,n){void 0===t&&(t=10),void 0===e&&(e=-1),void 0===r&&(r=-1),void 0===n&&(n=-1),this.priority=t,this.matchIndex=e,this.start=r,this.end=n,this.groups=[],this.positions=[]};!function(t){t[t.Any=0]="Any",t[t.AnyNonNL=1]="AnyNonNL",t[t.Char=2]="Char",t[t.CIChar=3]="CIChar",t[t.Match=4]="Match",t[t.Noop=5]="Noop",t[t.Save=6]="Save",t[t.Split=7]="Split",t[t.Jump=8]="Jump",t[t.Begin=9]="Begin",t[t.RBegin=10]="RBegin",t[t.End=11]="End",t[t.StartingChar=12]="StartingChar",t[t.EndingChar=13]="EndingChar",t[t.MLStartingChar=14]="MLStartingChar",t[t.MLEndingChar=15]="MLEndingChar",t[t.StartOfWord=16]="StartOfWord",t[t.EndOfWord=17]="EndOfWord",t[t.GroupStart=18]="GroupStart",t[t.GroupEnd=19]="GroupEnd",t[t.EnsureState=20]="EnsureState"}(Dn||(Dn={}));var _n=function(){function t(t,e){void 0===t&&(t="INITIAL"),void 0===e&&(e=!0),this.startCondition=t,this.scIsInclusive=e,this.instrs=[],this.stateMapping=new Map,this.registerState("INITIAL"),this.registerState(t)}return Object.defineProperty(t.prototype,"length",{get:function(){return this.instrs.length},enumerable:!1,configurable:!0}),t.prototype.registerState=function(t){return this.stateMapping.has(t)||this.stateMapping.set(t,this.stateMapping.size),this.stateMapping.get(t)||-1},t.prototype.add=function(t,e){var r;void 0===e&&(e=null);for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o=(r=new Tn(t,e)).add.apply(r,wn([],Sn(n),!1));return o.offset=this.instrs.length,this.instrs.push(o),o},t.with=function(e){var r=new t;return e(r),r},t.prototype.debugValue=function(t){return void 0===t&&(t=On),t?this.instrs.map(function(e,r){return e.comment.trim().length>0?"L".concat(r,": ").concat(t(e)," # ").concat(e.comment):"L".concat(r,": ").concat(t(e))}):this.instrs.map(function(t,e){return"L".concat(e,": ").concat(t.debugValue)})},t}(),Tn=function(){function t(t,e){void 0===e&&(e=null),this.opcode=t,this.char=e,this.offset=0,this.comment="",this.args=[],this.char=e}return t.prototype.add=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(t=this.args).push.apply(t,wn([],Sn(e),!1)),this},Object.defineProperty(t.prototype,"debugValue",{get:function(){var t=this.comment.trim();return t.length>0&&(t=" # "+t),"".concat(this.opcode," ").concat(this.args.join(" ")," ").concat(this.char||""," ").concat(t)},enumerable:!1,configurable:!0}),t}(),Fn=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.offset=t,this.gen=e,this.parentId=-1,this.id=0,this.priority=0,this.groups=[],this.positions=[],this.registers={}}return t.prototype.regIncr=function(t){if(!(t in this.registers))throw new Error("Register at offset ".concat(t," is invalid"));this.registers[t]++},t.prototype.regAcquire=function(t){if(t in this.registers)throw new Error("Register at offset ".concat(t," already acquired. Release it first"));this.registers[t]=0},t.prototype.regRelease=function(t){if(!(t in this.registers))throw new Error("Register at offset ".concat(t," is invalid"));delete this.registers[t]},t.prototype.regValue=function(t){if(!(t in this.registers))throw new Error("Register at offset ".concat(t," is invalid"));return this.registers[t]},t}(),In=function(){function t(t,e,r,n,i){void 0===e&&(e=0),void 0===r&&(r=-1),void 0===n&&(n=!0),void 0===i&&(i={}),this.prog=t,this.start=e,this.end=r,this.forward=n,this.threadCounter=0,this.currThreads=[],this.nextThreads=[],this.startPos=0,this.currState=0,this.gen=0,this.genForOffset={},r<0&&(r=t.length-1),this.end=r}return t.prototype.savePosition=function(t,e,r){for(;t.positions.length<=e;)t.positions.push(-1);t.positions[e]=r},t.prototype.jumpBy=function(t,e){return void 0===e&&(e=1),this.jumpTo(t,t.offset+e)},t.prototype.jumpTo=function(t,e){var r=new Fn(e,this.gen);return r.id=t.id,r.parentId=t.parentId,r.priority=t.priority,r.positions=t.positions,r.groups=t.groups,r.registers=t.registers,r},t.prototype.forkTo=function(t,e){var r=new Fn(e,this.gen);return r.id=++this.threadCounter,r.parentId=t.id,r.priority=t.priority,r.positions=wn([],Sn(t.positions),!1),r.groups=wn([],Sn(t.groups),!1),r.registers=Cn({},t.registers),r},t.prototype.startGroup=function(t,e,r){var n=this.forkTo(t,t.offset+1);return n.groups.push([e,r]),n},t.prototype.endGroup=function(t,e,r){var n=this.forkTo(t,t.offset+1);return n.groups.push([-e,r]),n},t.prototype.addThread=function(t,e,r,n){var i,o;if(void 0===n&&(n=0),!(t.offset<this.start||t.offset>this.end||this.genForOffset[t.offset-this.start]==this.gen)){this.genForOffset[t.offset-this.start]=this.gen;var s,a,u,l=this.prog.instrs[t.offset],h=l.opcode;switch(h){case Dn.Jump:u=this.jumpTo(t,l.args[0]),this.addThread(u,e,r,n);break;case Dn.Split:for(var c=0;c<l.args.length;c++){var p=l.args[c],f=0==c?this.jumpTo(t,p):this.forkTo(t,p);this.addThread(f,e,r,n)}break;case Dn.Save:u=this.jumpTo(t,t.offset+1),this.savePosition(u,l.args[0],r.index+n),this.tracer&&this.tracer.threadQueued(t,r.index+n),this.addThread(u,e,r,n);break;case Dn.GroupStart:u=this.startGroup(t,l.args[0],r.index+n),this.tracer&&this.tracer.threadQueued(t,r.index+n),this.addThread(u,e,r,n);break;case Dn.GroupEnd:u=this.endGroup(t,l.args[0],r.index+n),this.tracer&&this.tracer.threadQueued(t,r.index+n),this.addThread(u,e,r,n);break;case Dn.StartingChar:case Dn.MLStartingChar:a=this.prevCh(r),(0==r.index||h==Dn.MLStartingChar&&An(a))&&this.addThread(this.jumpBy(t,1),e,r,n);break;case Dn.EndingChar:case Dn.MLEndingChar:(""==(s=this.nextCh(r))||h==Dn.MLEndingChar&&An(s))&&this.addThread(this.jumpBy(t,1),e,r,n);break;case Dn.StartOfWord:case Dn.EndOfWord:break;case Dn.RBegin:var d=Sn(l.args,3),m=d[0],y=d[1],g=d[2],v=2*(1+m),x=t.positions[v],b=Sn(this.recurseMatch(r,x-1,l.offset+1,g,!1,1==y),2),E=b[0];b[1],E&&this.addThread(this.jumpTo(t,g+1),e,r,n);break;case Dn.Begin:var C=Sn(l.args,3),S=C[0],w=C[1],A=C[2];if(1==S)this.tracer&&this.tracer.threadQueued(t,r.index),e.push(t);else{var D=Sn(this.recurseMatch(r,r.index+1,l.offset+1,A,!0,1==w),2);E=D[0],D[1],E&&this.addThread(this.jumpTo(t,A+1),e,r,n)}break;case Dn.EnsureState:var k=l.args;try{for(var _=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(k),T=_.next();!T.done;T=_.next()){var F=T.value;if(this.currState==F){this.addThread(this.jumpBy(t,1),e,r,n);break}}}catch(t){i={error:t}}finally{try{T&&!T.done&&(o=_.return)&&o.call(_)}finally{if(i)throw i.error}}break;default:this.tracer&&this.tracer.threadQueued(t,r.index),e.push(t)}}},t.prototype.matchCurrPos=function(t,e,r){return void 0===r&&(r=!1),r?e.match(t.currChCodeLower)||e.match(t.currChCodeUpper):e.match(t.currChCode)},t.prototype.hasMore=function(t){return this.forward?t.hasMore:t.index>=0},t.prototype.nextCh=function(t){var e=t.index+(this.forward?1:-1);return t.charAt(e)},t.prototype.prevCh=function(t){return t.charAt(t.index-(this.forward?1:-1))},t.prototype.match=function(t){if(this.end<this.start)return null;this.startMatching(t);for(var e=null;this.currThreads.length>0;)e=this.stepChar(t,e);return null!=e&&(t.index=e.end),e},t.prototype.recurseMatch=function(e,r,n,i,o,s){void 0===o&&(o=!0),void 0===s&&(s=!1);var a=e.index;if(!e.canAdvance(o?1:-1))return[s,-1];e.index=r;var u=new t(this.prog,n,i,o).match(e),l=e.index;return e.index=a,[null!=u&&!s||null==u&&s,l]},t.prototype.startMatching=function(t){this.currThreads=[],this.nextThreads=[],this.gen++,this.addThread(new Fn(this.start,this.gen),this.currThreads,t),this.startPos=t.index},t.prototype.stepChar=function(t,e){void 0===e&&(e=null),this.gen++;for(var r=0;r<this.currThreads.length;r++){var n=this.currThreads[r],i=this.stepThread(t,n);if(null!=i&&(null==e||i.priority>e.priority||i.priority==e.priority&&i.end>e.end)){e=i;break}}return this.hasMore(t)&&t.advance(this.forward?1:-1),this.currThreads=this.nextThreads,this.nextThreads=[],e},t.prototype.stepThread=function(t,e){this.tracer&&this.tracer.threadStepped(e,t.index,this.gen);var n=null,i=this.prog.instrs[e.offset],o=i.opcode,s=(i.args,this.forward?1:-1),a=!1;switch(o){case Dn.RBegin:throw new Error("Invalid state. Reverse matches must be handled in addThread");case Dn.Begin:var u=Sn(i.args,3),l=u[0],h=u[1],c=u[2];r(1==l,"Plain lookahead cannot be here");var p=Sn(this.recurseMatch(t,t.index,i.offset+1,c,!0,1==h),2),f=p[0];p[1],f&&this.addThread(this.jumpTo(e,c+1),this.nextThreads,t);break;case Dn.End:var d=new kn(-1,-1,this.startPos,t.index);return d.groups=e.groups,d.positions=e.positions,d;case Dn.Match:if(t.index>this.startPos){var m=i.args[0],y=i.args[1];(n=new kn).start=this.startPos,n.end=t.index,n.priority=m,n.matchIndex=y,n.groups=e.groups,n.positions=e.positions}break;case Dn.Char:case Dn.CIChar:this.hasMore(t)&&(a=this.matchCurrPos(t,i.char,o==Dn.CIChar));break;case Dn.AnyNonNL:case Dn.Any:this.hasMore(t)&&(a=o==Dn.Any||!An(t.currCh))}return a&&this.addThread(this.jumpBy(e,1),this.nextThreads,t,s),n},t}();function On(t){switch(t.opcode){case Dn.Match:return"Match ".concat(t.args[0]," ").concat(t.args[1]);case Dn.Char:case Dn.CIChar:return"".concat(Dn[t.opcode].toString()," ")+"".concat(t.char.debugValue());case Dn.Any:return".";case Dn.AnyNonNL:return"NL.";case Dn.StartingChar:return"^";case Dn.MLStartingChar:return"NL^";case Dn.EndingChar:return"$NL";case Dn.MLEndingChar:return"$NL_MultiLine";case Dn.Save:return"Save ".concat(t.args[0]);case Dn.GroupStart:return"GroupStart ".concat(t.args[0]);case Dn.GroupEnd:return"GroupEnd ".concat(t.args[0]);case Dn.Split:return"Split ".concat(t.args.join(", "));case Dn.Jump:return"Jump ".concat(t.args[0]);case Dn.Begin:return"Begin ".concat(t.args.join(" "));case Dn.RBegin:return"RBegin ".concat(t.args.join(" "));case Dn.End:return"End ".concat(t.args.join(" "));case Dn.EnsureState:return"EnsureState ".concat(t.args.join(" "));default:throw new Error("Invalid Opcode: "+t.opcode)}}var Nn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Bn=function(){function t(t,e){void 0===e&&(e=null),this.regexResolver=t,this.listener=e,this.emitGroups=!1,this.emitPosition=!0}return t.prototype.compile=function(t){var e=this,r=new _n,n=t.length<=1?new Tn(Dn.Split):r.add(Dn.Split,null);return t.forEach(function(t,i){n.add(r.instrs.length);var o=null!=t.expr.ignoreCase&&t.expr.ignoreCase,s=null==t.expr.dotAll||t.expr.dotAll,a=null==t.expr.multiline||t.expr.multiline;if(t.needsSpecificStates&&null!=t.activeStates){var u=r.add(Dn.EnsureState,null);t.activeStates.forEach(function(t){var e=r.registerState(t);u.add(e)})}e.compileExpr(t.expr,r,o,s,a),r.add(Dn.Match,null).add(t.priority,t.matchIndex>=0?t.matchIndex:i)}),r},t.prototype.compileExpr=function(t,e,r,n,i){var o=e.length,s=e.length;if(t.groupIndex>=0&&(this.emitPosition&&e.add(Dn.Save).add(2*(1+t.groupIndex)),this.emitGroups&&e.add(Dn.GroupStart).add(1+t.groupIndex)),t.tag==Qr.CHAR)this.compileChar(t,e,r,n,i);else if(t.tag==Qr.START_OF_INPUT){var a=null==t.multiline?i:t.multiline;e.add(a?Dn.MLStartingChar:Dn.StartingChar)}else if(t.tag==Qr.END_OF_INPUT)a=null==t.multiline?i:t.multiline,e.add(a?Dn.MLEndingChar:Dn.EndingChar);else if(t.tag==Qr.START_OF_WORD)e.add(Dn.StartOfWord);else if(t.tag==Qr.END_OF_WORD)e.add(Dn.EndOfWord);else if(t.tag==Qr.CAT)this.compileCat(t,e,r,n,i);else if(t.tag==Qr.UNION)this.compileUnion(t,e,r,n,i);else if(t.tag==Qr.QUANT)this.compileQuant(t,e,r,n,i);else if(t.tag==Qr.VAR)this.compileVar(t,e,r,n,i);else if(t.tag==Qr.BACK_NAMED_REF)this.compileBackNamedRef(t,e,r,n,i);else if(t.tag==Qr.BACK_NUM_REF)this.compileBackNumRef(t,e,r,n,i);else if(t.tag==Qr.LOOK_AHEAD)this.compileLookAhead(t,e,r,n,i);else{if(t.tag!=Qr.LOOK_BACK)throw new Error("Regex Type not yet supported: "+t.tag);this.compileLookBack(t,e,r,n,i)}return t.groupIndex>=0&&(this.emitGroups&&e.add(Dn.GroupEnd).add(1+t.groupIndex),this.emitPosition&&e.add(Dn.Save).add(2*(1+t.groupIndex)+1)),this.listener&&e.length>s&&this.listener(t,e,s,e.length-s),e.length-o},t.prototype.compileChar=function(t,e,r,n,i){t.op==on.AnyChar?e.add(n?Dn.Any:Dn.AnyNonNL):e.add(r?Dn.CIChar:Dn.Char).char=t},t.prototype.compileCat=function(t,e,r,n,i){var o,s;try{for(var a=Nn(t.children),u=a.next();!u.done;u=a.next()){var l=u.value;this.compileExpr(l,e,r,n,i)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(o)throw o.error}}},t.prototype.compileBackNumRef=function(t,e,r,n,i){throw new Error("BackNumRef Not Implemented")},t.prototype.compileBackNamedRef=function(t,e,r,n,i){throw new Error("BackNameRef Not Implemented")},t.prototype.compileVar=function(t,e,r,n,i){var o=t.name.trim(),s=this.regexResolver?this.regexResolver(o):null;if(null==s)throw new Error("Cannot find expression: ".concat(o));this.compileExpr(s,e,r,n,i)},t.prototype.compileUnion=function(t,e,r,n,i){for(var o,s,a=e.add(Dn.Split),u=[],l=0;l<t.options.length;l++)a.add(e.length),this.compileExpr(t.options[l],e,r,n,i),l<t.options.length-1&&u.push(e.add(Dn.Jump));try{for(var h=Nn(u),c=h.next();!c.done;c=h.next())c.value.add(e.length)}catch(t){o={error:t}}finally{try{c&&!c.done&&(s=h.return)&&s.call(h)}finally{if(o)throw o.error}}},t.prototype.compileQuant=function(t,e,r,i,o){if(0==t.minCount&&t.maxCount==n)this.compileAtleast0(t.expr,e,t.greedy,r,i,o);else if(1==t.minCount&&t.maxCount==n)this.compileAtleast1(t.expr,e,t.greedy,r,i,o);else if(0==t.minCount&&1==t.maxCount)this.compileOptional(t.expr,e,t.greedy,r,i,o);else{for(var s=0;s<t.minCount;s++)this.compileExpr(t.expr,e,r,i,o);if(t.isUnlimited)this.compileAtleast0(t.expr,e,t.greedy,r,i,o);else for(s=t.minCount;s<t.maxCount;s++)this.compileOptional(t.expr,e,t.greedy,r,i,o)}},t.prototype.compileAtleast1=function(t,e,r,n,i,o){void 0===r&&(r=!0);var s=e.length;this.compileExpr(t,e,n,i,o);var a=e.add(Dn.Split),u=e.length;r?a.add(s,u):a.add(u,s)},t.prototype.compileAtleast0=function(t,e,r,n,i,o){var s=e.add(Dn.Split),a=s.offset,u=e.length;this.compileExpr(t,e,n,i,o),e.add(Dn.Jump).add(a);var l=e.length;r?s.add(u,l):s.add(l,u)},t.prototype.compileOptional=function(t,e,r,n,i,o){var s=e.add(Dn.Split),a=e.length;this.compileExpr(t,e,n,i,o);var u=e.length;r?s.add(a,u):s.add(u,a)},t.prototype.compileLookAhead=function(t,e,r,n,i){this.compileExpr(t.expr,e,r,n,i);var o=e.add(Dn.Begin).add(0,t.negate?1:0);this.compileExpr(t.cond,e,r,n,i);var s=e.add(Dn.End).add(o.offset);o.add(s.offset)},t.prototype.compileLookBack=function(t,e,n,i,o){this.compileExpr(t.expr,e,n,i,o),r(t.expr.groupIndex>=0,"LookBack Assertion requires expression to have a group Index");var s=e.add(Dn.RBegin).add(t.expr.groupIndex,t.negate?1:0);this.compileExpr(t.cond.reverse(),e,n,i,o);var a=e.add(Dn.End).add(s.offset);s.add(a.offset)},t}(),Rn=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Pn=function(t){function e(e,r,n,i,o){void 0===o&&(o=null);var s=this.constructor,a=t.call(this,e)||this;return a.offset=r,a.length=n,a.type=i,a.value=o,a.name="TokenizerError",Object.setPrototypeOf(a,s.prototype),a}return Rn(e,t),e}(Error),Ln=function(t){function e(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=t.call(this,"Found Token: ".concat((null==e?void 0:e.tag)||"EOF"," (").concat((null==e?void 0:e.value)||"","), Expected: ").concat(r.join(", ")))||this;return i.foundToken=e,i.name="UnexpectedTokenError",i.expectedTokens=r,i}return Rn(e,t),e}(Error),Mn=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Un=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},jn=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},zn=function(t){function e(e,r){void 0===r&&(r=!0);var n=t.call(this,r)||this;return n.forward=r,n._rawInput=e,n.input=jn([],Un(e),!1),n}return Mn(e,t),e.prototype.push=function(t){var e;this._rawInput+=t,(e=this.input).push.apply(e,jn([],Un(t),!1))},e.prototype.substring=function(t,e){return this._rawInput.substring(t,e)},e.prototype.hasIndex=function(t){return t>=0&&t<this.input.length},e.prototype.charAt=function(t){return t<0||t>=this.input.length?"":this.input[t]},e}(function(){function t(t){void 0===t&&(t=!0),this.forward=t,this.index=0}return t.prototype.advance=function(t){void 0===t&&(t=1);var e=this.forward?this.index+t:this.index-t;return this.index=e,!0},t.prototype.canAdvance=function(t){void 0===t&&(t=1);var e=this.forward?this.index+t:this.index-t;return this.hasIndex(e)},Object.defineProperty(t.prototype,"hasMore",{get:function(){var t=this.forward?this.index:this.index-1;return this.hasIndex(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currCh",{get:function(){return this.charAt(this.index)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"prevCh",{get:function(){return this.charAt(this.index-(this.forward?1:-1))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextCh",{get:function(){var t=this.index+(this.forward?1:-1);return this.charAt(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currChCode",{get:function(){return this.hasMore?this.currCh.charCodeAt(0):-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currChCodeLower",{get:function(){return this.hasMore?this.currCh.toLowerCase().charCodeAt(0):-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currChCodeUpper",{get:function(){return this.hasMore?this.currCh.toUpperCase().charCodeAt(0):-1},enumerable:!1,configurable:!0}),t.prototype.charCodeAt=function(t){return this.hasIndex(t)?this.charAt(t).charCodeAt(0):-1},t.prototype.charCodeAtLower=function(t){return this.hasIndex(t)?this.charAt(t).toLowerCase().charCodeAt(0):-1},t.prototype.charCodeAtUpper=function(t){return this.hasIndex(t)?this.charAt(t).toUpperCase().charCodeAt(0):-1},t}()),Jn=function(){function t(){}return t.advanceAfter=function(e,r,n){void 0===n&&(n=!0);var i=t.advanceTo(e,r,n);return i>=0&&(i+=r.length,e.index=i),i},t.advanceTo=function(e,r,n){void 0===n&&(n=!0);for(var i=e.index;e.hasMore;){var o=e.index;if(t.matches(e,r)){var s=e.index;e.index=o;var a=0;if(n)for(var u=s-1;u>=0&&"\\"==e.charAt(u);u--)a++;if(a%2==0)return e.index}e.advance(1)}throw e.index=i,new Error("Unexpected end of input before (".concat(r,")"))},t.matches=function(t,e,r){void 0===r&&(r=!0);for(var n=t.index,i=0,o=!0;i<e.length;i++){if(e[i]!=t.currCh){o=!1;break}t.advance(1)}return r&&o||(t.index=n),o},t}(),Vn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xn=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Gn=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},Wn=function(){function t(e,r,n,i){this.tag=e,this.matchIndex=r,this.start=n,this.end=i,this.id=t.idCounter++,this.value=null,this.groups={},this.positions={}}return t.prototype.isOneOf=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var i=Vn(r),o=i.next();!o.done;o=i.next()){var s=o.value;if(this.tag==s)return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return!1},t.idCounter=0,t}(),Hn=(function(){function t(t,e){this.nextToken=t,this.tokenizerContext=e,this.buffer=[]}t.prototype.next=function(t){var e=this.peek(t);return null!=e&&this.consume(),e},t.prototype.peek=function(t,e){for(void 0===e&&(e=0);this.buffer.length<=e;){var r=this.nextToken(t,this.tokenizerContext);if(null==r)return null;this.buffer.push(r)}return this.buffer[e]},t.prototype.match=function(t,e,r,n,i){void 0===r&&(r=!1),void 0===n&&(n=!0);var o=this.peek(t);if(null!=o){if(!e(o)){if(r)throw new Ln(o);return null}i&&null!=i&&i(o),n&&this.consume()}else if(r)throw new Pn("Unexpected end of input",-1,0,"UnexpectedEndOfInput");return o},t.prototype.consume=function(){this.buffer.splice(0,1)},t.prototype.consumeIf=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.match(t,function(t){return t.isOneOf.apply(t,Gn([],Xn(e),!1))})},t.prototype.expectToken=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.match(t,function(t){return t.isOneOf.apply(t,Gn([],Xn(e),!1))},!0,!0)},t.prototype.ensureToken=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.match(t,function(t){return t.isOneOf.apply(t,Gn([],Xn(e),!1))},!0,!1)},t.prototype.nextMatches=function(t){for(var e,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=this.peek(t);if(null==o)return null;try{for(var s=Vn(n),a=s.next();!a.done;a=s.next()){var u=a.value;if(o.tag==u)return o}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return null}}(),function(){function t(){this.value=-1}return t.prototype.next=function(){return++this.value},Object.defineProperty(t.prototype,"current",{get:function(){return this.value},enumerable:!1,configurable:!0}),t}());function Kn(t){return" "==t||"\t"==t||"\n"==t||"\r"==t}var qn=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Yn=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},$n=function(){function t(t,e){this.pattern=t,this.counter=new Hn,this.unicode=(null==e?void 0:e.unicode)||!1}return t.prototype.reduceLeft=function(t){var e=1==t.length?t[0]:new(fn.bind.apply(fn,Yn([void 0],qn(t),!1)));return t.splice(0),e},t.prototype.throwError=function(t){throw new SyntaxError("Error in JS RE '".concat(this.pattern,"': ").concat(t))},t.prototype.parse=function(t,e){void 0===t&&(t=0),void 0===e&&(e=-1);var r=this.pattern,n=[];for(e<0&&(e=r.length-1);t<=e;){var i=r[t];if("."==i)n.push(yn.Any()),t++;else if("\\"==i&&r[t+1]>="1"&&r[t+1]<="9"){t++;for(var o="";t<=e&&r[t]>="0"&&r[t]<="9";)o+=r[t++];var s=parseInt(o);s>this.counter.current+1&&this.throwError("Invalid reference: "+s),n.push(new bn(s))}else if("\\"==i&&"k"==r[t+1]&&"<"==r[t+2]){for(var a=t+=3;a<=e&&">"!=r[a];)a++;a>e&&this.throwError("Expected '>' found EOI");var u=r.substring(t,a);""==u.trim()&&this.throwError("Expected name"),n.push(new xn(u)),t=a+1}else if("["==i){for(var l=t+1;l<=e&&"]"!=r[l];)"\\"==r[l]&&l++,l++;l>e&&this.throwError("Expected ']' found EOI"),n.push(this.parseCharGroup(t+1,l-1)),t=l+1}else if("^"==i)n.push(new an),t++;else if("$"==i)n.push(new un),t++;else if("|"==i){if(t+1<=e){var h=this.reduceLeft(n),c=this.parse(t+1,e);return new dn(h,c)}t=e+1}else if("("==i)t=this.parseGroup(n,t,e);else if(")"==i||"]"==i||"}"==i)this.throwError("Unmatched ".concat(i,". Try using \\").concat(i));else if("*"==r[t]||"?"==r[t]||"+"==r[t]||"{"==r[t])t=this.parseQuant(n,t,e);else{var p=qn(this.parseChar(t,e),2),f=p[0],d=p[1];n.push(f),t+=d}}return n.length,1==n.length?n[0]:new(fn.bind.apply(fn,Yn([void 0],qn(n),!1)))},t.prototype.parseGroup=function(t,e,r){for(var n=e+1,i=0,o=this.pattern;n<=r&&(")"!=o[n]||i>0);)"("==o[n]?i++:")"==o[n]&&i--,"\\"==o[n]&&n++,n++;var s;if(n>r&&this.throwError("Expected ')' found EOI"),"?"==o[++e])if(":"==o[++e])t.push(this.parse(e+1,n-1));else if("<"==o[e]&&"!"!=o[e+1]&&"="!=o[e+1]){for(var a=this.counter.next(),u="",l=e+1;l<=r&&">"!=o[l];)u+=o[l],l++;(s=this.parse(l+1,n-1)).groupIndex=a,u.length>0&&(s.groupName=u)}else{var h=!0;"<"==o[e]&&(e++,h=!1);var c="!"==o[e++],p=this.parse(e,n-1);if(!h){var f=this.parse(n+1,r);return f.groupIndex<0&&(f.groupIndex=this.counter.next(),f.groupIsSilent=!0),t.push(new cn(f,p,c)),r+1}t.length;var d=new hn(this.reduceLeft(t),p,c);t.push(d)}else a=this.counter.next(),c=!1,"^"==o[e]&&(c=!0,e++),(s=this.parse(e,n-1)).groupIndex>=0&&(s=new fn(s)),s.groupIndex=a,t.push(s);return n+1},t.prototype.parseCharGroup=function(t,e){var r=[],n=t,i=!1,o=this.pattern;for("^"==o[n]&&(i=!0,n++);n<=e;){var s=qn(this.parseChar(n,e),2),a=s[0];if((n+=s[1])<o.length&&"-"==o[n])if("]"==o[++n]||"["==o[n])r.push(a),r.push(yn.Single("-"));else if(n<=e){var u=qn(this.parseChar(n,e),2),l=u[0],h=u[1];a.op==on.SingleChar&&l.op==on.SingleChar||this.throwError("Char range cannot start or end in a char class"),l.args[0]<a.args[0]&&this.throwError("End cannot be less than start"),r.push(gn.Range(a,l)),n+=h}else this.throwError("Unterminated char class");else r.push(a)}return gn.Union(i,r)},t.prototype.parseChar=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),"\\"==this.pattern[t]?this.parseEscapeChar(t,e):this.parseSingleChar(t,e)},t.prototype.parseSingleChar=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var r=this.pattern.charCodeAt(t);return[yn.Single(r),1]},t.prototype.parsePropertyEscape=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var r=this.pattern;r[t]+1!="{"&&this.throwError("Invalid property escape");for(var n=t+=2,i=-1;n<=e&&"}"!=r[n];)"="==r[n]&&(i=n),n++;n>e&&this.throwError("Invalid property escape");var o=r.substring(t,n),s="General_Category",a=o;if(i>=0){var u=o.split("=");2!=u.length&&this.throwError("Invalid property escape"),s=u[0].trim(),a=u[1].trim()}return[yn.PropertyEscape(s,a),2+n+1-t]},t.prototype.parseEscapeChar=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var n=this.pattern;r("\\"==n[t],"Expected '\\'"),++t>e&&this.throwError("Encounted unexpected end of input after \\");var i=n[t];if(this.unicode&&"p"==i||"P"==i)return this.parsePropertyEscape(t,e);switch(i){case"w":return[yn.Class(Pr.WORD_CHAR),2];case"W":return[yn.Class(Pr.WORD_CHAR,!0),2];case"d":return[yn.Class(Pr.DIGITS),2];case"D":return[yn.Class(Pr.DIGITS,!0),2];case"s":return[yn.Class(Pr.SPACES),2];case"S":return[yn.Class(Pr.SPACES,!0),2];case"0":return n[t+1]>="0"&&n[t+1]<="9"&&this.unicode&&this.throwError("Invalid decimal escape"),[yn.Single("\0"),2];case"r":return[yn.Single("\r"),2];case"n":return[yn.Single("\n"),2];case"f":return[yn.Single("\f"),2];case"b":return[yn.Single("\b"),2];case"v":return[yn.Single("\v"),2];case"t":return[yn.Single("\t"),2];case"c":(this.unicode||t>=e)&&this.throwError("Invalid char sequence at ".concat(t,", ").concat(e));var o=n.charCodeAt(t+1)%32;return[yn.Single(o),3];case"x":++t>=e&&this.throwError("Invalid hex sequence at ".concat(t,", ").concat(e));var s=n.substring(t,t+2),a=parseInt(s,16);return r(!isNaN(a),"Invalid hex sequence: '".concat(s,"'")),[yn.Single(a),4];case"u":++t>e-3&&this.throwError("Invalid unicode sequence at ".concat(t));var u=n.substring(t,t+4),l=parseInt(u,16);return isNaN(l)&&this.throwError("Invalid unicode sequence: '".concat(u,"'")),[yn.Single(l),6];case"^":case"$":case".":case"*":case"+":case"?":case"\\":case"'":case'"':case"(":case")":case"[":case"]":case"{":case"}":case"|":case"/":return[yn.Single(i),2];default:return this.unicode&&this.throwError("Invalid escape character: "+i),[yn.Single(i),2]}},t.prototype.parseQuant=function(t,e,r){var i=this.pattern,o=i[e-1],s=1,a=1;if("*"==i[e])s=0,a=n;else if("+"==i[e])s=Math.min(s,1),a=n;else if("?"==i[e])s=0,a=Math.max(a,1);else{if("{"!=i[e])throw new Error("Here?");var u=i.indexOf("}",e+1);(u<=e||u>r)&&this.throwError("Unexpected end of input while looking for '}'");var l=i.substring(e+1,u).trim(),h=l.split(",").map(function(t){return parseInt(t.trim())});if(e=u,1==h.length){if(isNaN(h[0])){if(l.trim().length>0)return t.push(new vn(l.trim())),e+1;this.throwError("Invalid quantifier: /".concat(l,"/"))}s=a=h[0]}else 2==h.length?(s=isNaN(h[0])?0:h[0])>(a=isNaN(h[1])?n:h[1])&&this.throwError("Invalid Quant /".concat(l,"/: Min must be <= Max")):h.length>2&&this.throwError('Invalid quantifier spec: "{'.concat(l,'}"'))}t.length<=0&&this.throwError("Quantifier cannot appear before an expression");var c=t[t.length-1];c.tag!=Qr.QUANT||"*"!=o&&"?"!=o&&"+"!=o&&"}"!=o||this.throwError("Nothing to repeat"),!this.unicode||c.tag!=Qr.LOOK_AHEAD&&c.tag!=Qr.LOOK_BACK||this.throwError("Cannot have quantifier on assertion in unicode mode");var p=t[t.length-1]=new pn(c);return p.minCount=s,p.maxCount=a,++e<=r&&"?"==i[e]&&p.greedy&&(e++,p.greedy=!1),e},t}(),Qn=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Zn=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};function ti(t,e){for(var r=t.index,n=0;n<e.length;n++){if(t.currCh!=e.charAt(n))return t.index=r,!1;t.advance(1)}return!0}var ei=function(){function t(){this.counter=new Hn}return t.prototype.parse=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=0);for(var i=[];t.hasMore;){var o=t.currCh;if(ti(t,"."))i.push(yn.Any());else if(ti(t,"^"))(s=new an).multiline=!0,i.push(s);else if(ti(t,"$")){var s;(s=new un).multiline=!0,i.push(s)}else{if(ti(t,"|")){var a=this.reduceLeft(i),u=this.parse(t,e,n);return new dn(a,u)}if("["==o)i.push(this.parseCharGroup(t));else if("*"==o||"?"==o||"+"==o||"{"==o)this.parseQuant(t,i);else if(e&&Kn(o))t.advance(1);else if(e&&ti(t,"/*")){for(;"*"!=t.currCh||"/"!=t.nextCh;)t.hasMore||this.throwError(t,"Unterminated comment"),t.advance(1);t.advance(2)}else{if(ti(t,"{-}"))throw new Error("Intersection Not yet supported");if(ti(t,"{+}"))throw new Error("Union Not yet supported");if(ti(t,"("))if(ti(t,"?"))if(ti(t,"#")){for(;t.hasMore&&")"!=t.currCh;)t.advance(1);r(ti(t,")"),"Expected ')'")}else{for(var l=!1,h=!1,c=e,p=!1;t.hasMore&&":"!=t.currCh;)"i"==t.currCh?l=!p:"s"==t.currCh?h=!p:"x"==t.currCh?c=!p:"-"==t.currCh&&(p=!0),t.advance(1);r(ti(t,":"),"Expected ':'");var f=this.counter.next();(d=this.parse(t,c,n+1)).groupIndex>=0&&(d=new fn(d)),d.dotAll=h,d.ignoreCase=l,d.groupIndex=f,i.push(d),r(ti(t,")"),"Expected ')'")}else{var d;f=this.counter.next(),(d=this.parse(t,e,n+1)).groupIndex>=0&&(d=new fn(d)),d.groupIndex=f,i.push(d),r(ti(t,")"),"Expected ')'")}else{if(")"==o){0==n&&this.throwError(t,"Unmatched ".concat(o,". Try using \\").concat(o));break}if("]"==o||"}"==o)this.throwError(t,"Unmatched ".concat(o,". Try using \\").concat(o));else{if(ti(t,"/"))return a=this.reduceLeft(i),u=this.parse(t,e,n),new hn(a,u,!1);if(ti(t,'"')){for(;'"'!=t.currCh;)t.hasMore||this.throwError(t,"Unterminated string"),i.push(this.parseChar(t));t.advance(1)}else i.push(this.parseChar(t))}}}}}return 1==i.length?i[0]:new(fn.bind.apply(fn,Zn([void 0],Qn(i),!1)))},t.prototype.parseQuant=function(t,e){var r=1,i=1;if(ti(t,"*"))r=0,i=n;else if(ti(t,"+"))r=Math.min(r,1),i=n;else if(ti(t,"?"))r=0,i=Math.max(i,1);else if(ti(t,"{")){for(var o=!1,s="",a="";t.hasMore&&"}"!=t.currCh;)","==t.currCh?o=!0:o?a+=t.currCh:s+=t.currCh,t.advance(1);t.hasMore||this.throwError(t,"Invalid property escape"),s=s.trim(),a=a.trim(),t.advance(1);var u=parseInt(s),l=parseInt(a);if(o)(r=isNaN(u)?0:u)>(i=isNaN(l)?n:l)&&this.throwError(t,"Invalid Quant /".concat(s,",").concat(a,"/: Min must be <= Max"));else if(isNaN(u)){if(s.length>0)return void e.push(new vn(s));this.throwError(t,"Invalid quantifier: /".concat(s,"/")),r=i=1}else r=i=u}else this.throwError(t,"Expected '{', '*', '?' or '+', Found: "+t.currCh);e.length<=0&&this.throwError(t,"Quantifier cannot appear before an expression");var h,c=e[e.length-1];c.tag==Qr.QUANT&&c.groupIndex<0?((h=c).minCount=Math.min(r,h.minCount),h.maxCount=Math.max(i,h.maxCount)):((h=e[e.length-1]=new pn(c)).minCount=r,h.maxCount=i),h.greedy&&ti(t,"?")&&(h.greedy=!1)},t.prototype.parseCharGroup=function(t){var e=[];r(ti(t,"["),"Expected '['");for(var n=ti(t,"^");"]"!=t.currCh;){var i=this.parseChar(t);if(ti(t,"-"))if(t.hasMore)if("]"==t.currCh||"["==t.currCh)e.push(i),e.push(yn.Single("-"));else{var o=this.parseChar(t);i.op==on.SingleChar&&o.op==on.SingleChar||this.throwError(t,"Char range cannot start or end in a char class"),o.args[0]<i.args[0]&&this.throwError(t,"End cannot be less than start"),e.push(gn.Range(i,o))}else this.throwError(t,"Unterminated char class");else e.push(i)}return r(ti(t,"]"),"']' expected"),gn.Union(n,e)},t.prototype.parseChar=function(t){return"\\"==t.currCh?this.parseEscapeChar(t):this.parseSingleChar(t)},t.prototype.parseSingleChar=function(t){var e=t.currCh;return t.advance(1),yn.Single(e)},t.prototype.parsePropertyEscape=function(t){r(ti(t,"\\{"),"Invalid property escape"),t.advance(2);for(var e=!1,n="",i="";t.hasMore&&"}"!=t.currCh;)"="==t.currCh?e=!0:e?i+=t.currCh:n+=t.currCh,t.advance(1);return t.hasMore||this.throwError(t,"Invalid property escape"),n=n.trim(),i=i.trim(),e||(i=n,n="General_Category"),t.advance(1),yn.PropertyEscape(n,i)},t.prototype.parseEscapeChar=function(t){if(r(ti(t,"\\"),"Expected '\\'"),t.hasMore||this.throwError(t,"Encounted unexpected end of input after \\"),ti(t,"w"))return yn.Class(Pr.WORD_CHAR);if(ti(t,"W"))return yn.Class(Pr.WORD_CHAR,!0);if(ti(t,"d"))return yn.Class(Pr.DIGITS);if(ti(t,"D"))return yn.Class(Pr.DIGITS,!0);if(ti(t,"s"))return yn.Class(Pr.SPACES);if(ti(t,"S"))return yn.Class(Pr.SPACES,!0);if(ti(t,"0"))return yn.Single("\0");if(ti(t,"r"))return yn.Single("\r");if(ti(t,"n"))return yn.Single("\n");if(ti(t,"f"))return yn.Single("\f");if(ti(t,"b"))return yn.Single("\b");if(ti(t,"v"))return yn.Single("\v");if(ti(t,"t"))return yn.Single("\t");if(ti(t,"\\"))return yn.Single("\\");if(ti(t,"'"))return yn.Single("'");if(ti(t,'"'))return yn.Single('"');if(ti(t,"x")){t.hasMore||this.throwError(t,"Invalid hex sequence at ".concat(t.index));var e=t.currCh+t.nextCh,n=parseInt(e,16);return r(!isNaN(n),"Invalid hex sequence: '".concat(e,"'")),t.advance(2),yn.Single(n)}if(ti(t,"u")){t.canAdvance(3)||this.throwError(t,"Invalid unicode sequence at ".concat(t.index));var i=t.substring(t.index,t.index+4),o=parseInt(i,16);return isNaN(o)&&this.throwError(t,"Invalid unicode sequence: '".concat(i,"'")),t.advance(4),yn.Single(o)}var s=t.currCh;return t.advance(1),yn.Single(s)},t.prototype.reduceLeft=function(t){var e=1==t.length?t[0]:new(fn.bind.apply(fn,Zn([void 0],Qn(t),!1)));return t.splice(0),e},t.prototype.throwError=function(t,e){throw new Error(e)},t}();function ri(t,e){e=e||{};var r="string"!=typeof t,n="string"==typeof t?t:t.source;r&&(e.unicode=t.unicode);var i=new $n(n,e).parse();return"string"!=typeof t&&(i.dotAll=t.dotAll,i.ignoreCase=t.ignoreCase,i.multiline=t.multiline),i}function ni(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return function(t){var e=new ei;try{var r=e.parse(new zn(t));return null==r.dotAll&&(r.dotAll=!1),null==r.multiline&&(r.multiline=!1),r}catch(e){throw console.log("Error in FLEX RE: ",t),e}}(String.raw.apply(String,function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}([t],function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}(e),!1)))}var ii,oi,si,ai,ui,li=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hi=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},ci=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.idCounter=0,e}li(e,t),e.prototype.next=function(t,e){if(!t.hasMore)return null;var r=t.index,n=t.currCh,i=this.vm.match(t);if(null==i){var o=null;if(o=t.index==r+1?new Pn("Unexpected Character: ".concat(n),r,1,"UnexpectedCharacter",n):new Pn("Unexpected Symbol: ".concat(t.substring(r,t.index)),r,t.index-r,"UnexpectedLexeme"),this.onError&&(o=this.onError(o,t,r)),null!=o)throw o;return this.next(t,e)}var s=this.allRules[i.matchIndex],a=function(t,e,r){for(var n,i,o=new Wn(t,e.matchIndex,e.start,e.end),s=0;s<e.positions.length;s+=2)e.positions[s]>=0&&(o.positions[Math.floor(s/2)]=[e.positions[s],e.positions[s+1]]);try{for(var a=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e.groups),u=a.next();!u.done;u=a.next()){var l=hi(u.value,2),h=l[0],c=l[1],p=Math.abs(h);p in o.groups||(o.groups[p]=[]),o.groups[p].push(c)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return null!=r&&(o.value=r.substring(e.start,e.end)),o}(s.tag,i,t);a.id=this.idCounter++;var u=this.onMatchHandlers[i.matchIndex];if(u||(u=this.matchHandlersByValue[s.tag]),u){if(null==(a=u(s,t,a,e)))return this.next(t,e)}else if(s.skip)return this.next(t,e);return a},e.prototype.tokenize=function(t,e){void 0===e&&(e=null);var r=[];"string"==typeof t&&(t=new zn(t));for(var n=this.next(t,e);n;){r.push(n);try{n=this.next(t,e)}catch(t){r.push({tag:"ERROR",start:t.offset,end:t.offset+t.length,value:t.message});break}}return r}}(function(){function t(){var t=this;this._prog=null,this._vm=null,this.onError=null,this.allRules=[],this.onMatchHandlers=[],this.matchHandlersByValue={},this.variables=new Map,this.compiler=new Bn(function(e){var r,n=t.variables.get(e)||null;if(null==n&&(n=(null===(r=t.findRuleByValue(e))||void 0===r?void 0:r.expr)||null),null==n)throw new Error("Invalid regex reference: ".concat(e));return n})}return t.prototype.getVar=function(t){return this.variables.get(t)||null},t.prototype.addVar=function(t,e){var r=this.variables.get(t)||null;return r=null==r?e:new dn(r,e),this.variables.set(t,e),this},t.prototype.findRuleByValue=function(t){return this.allRules.find(function(e){return e.tag==t})||null},t.prototype.add=function(t,e,r){return void 0===r&&(r=null),"function"==typeof e&&(r=e,e=null),this.addRule(function(t,e){var r;return"string"==typeof t?((r=new En(ri(t,e),e)).pattern=t,r):"RegExp"==t.constructor.name?((r=new En(ri(t,e),e)).pattern=t.source,r):new En(t,e)}(t,e),r)},t.prototype.addRule=function(t,e){return void 0===e&&(e=null),t.matchIndex=this.allRules.length,this.allRules.push(t),this.onMatchHandlers.push(e),this._prog=null,this._vm=null,this},t.prototype.on=function(t,e){return this.matchHandlersByValue[t]=e,this},Object.defineProperty(t.prototype,"prog",{get:function(){if(null==this._prog){var t=this.sortRules();this._prog=this.compiler.compile(t)}return this._prog},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vm",{get:function(){return null==this._vm&&(this._vm=new In(this.prog)),this._vm},enumerable:!1,configurable:!0}),t.prototype.sortRules=function(){var t=this.allRules.map(function(t){return t});return t.sort(function(t,e){return t.priority!=e.priority?e.priority-t.priority:t.matchIndex-e.matchIndex}),t},t}()),function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}),pi=(function(){function t(t){this.peekedToken=null,this.literals=[],this.matchers=[],"string"==typeof t&&(t=new zn(t)),this.tape=t}t.prototype.addMatcher=function(t,e){return void 0===e&&(e=!1),this.matchers.push([t,e]),this},t.prototype.addLiteral=function(t,e){var r=this.literals.findIndex(function(e){return e[0]==t});if(r<0)return this.literals.push([t,e]),this.literals.length-1;if(this.literals[r][1]!=e)throw new Error("Literal '".concat(t,"' already registered as ").concat(e));return r},t.prototype.nextToken=function(){if(!this.tape.hasMore)return null;for(var t=this.tape.index,e=0;e<this.literals.length;e++){var r=ci(this.literals[e],2),n=r[0],i=r[1];if(Jn.matches(this.tape,n)){var o=new Wn(i,e,t,this.tape.index);return o.value=n,o}}for(e=0;e<this.matchers.length;e++){var s=ci(this.matchers[e],2),a=s[0],u=s[1],l=a(this.tape,t);if(null!=l)return u?this.nextToken():(l.start=t,l.end=this.tape.index,l)}throw new Pn("Invalid Character",this.tape.index,1,"InvalidCharacter",this.tape.currCh)}}(),function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t});ni(ii||(ii=pi(['["]([^"\\\n]|\\.|\\\n)*["]'],['["]([^"\\\\\\n]|\\\\.|\\\\\\n)*["]']))),ni(oi||(oi=pi(["[']([^'\\\n]|\\.|\\\n)*[']"],["[']([^'\\\\\\n]|\\\\.|\\\\\\n)*[']"]))),String.raw(si||(si=pi(["/([^\\/]|\\.)*/([imus]*)"],["/([^\\\\/]|\\\\.)*/([imus]*)"]))),String.raw(ai||(ai=pi(["/(.+?(?<!\\))/([imus]*)"],["/(.+?(?<!\\\\))/([imus]*)"]))),__webpack_require__(7042),c.ONE,function(t){t.Kampitham="Kampitham",t.Nokku="Nokku",t.Spuritham="Spuritham",t.Prathyagatham="Prathyagatham",t.Aahaatam_Raavi="Raavi",t.Aahaatam_Kandippu="Kandippu",t.Vaali="Vaali",t.Odukkal="Odukkal",t.Jaaru_Eetra="EetraJaaru",t.Jaaru_Irakka="IrakkaJaaru",t.Orikkai="Orikkai"}(ui||(ui={}));class fi{constructor(){this.shapeId=fi.idCounter++,this._x=null,this._y=null,this._width=null,this._height=null,this.parentShape=null,this.children=[]}get bbox(){return this._bbox||(this._bbox=this.refreshBBox()),this._bbox}get minSize(){return this._minSize||(this._minSize=this.refreshMinSize()),this._minSize}invalidateBounds(){this._minSize=null,this._bbox=null}setBounds(t,e,r,n,i=!1){null!=t&&(isNaN(t)?this._x=null:this._x=t),null!=e&&(isNaN(e)?this._y=null:this._y=e),null!=r&&(isNaN(r)?this._width=null:this._width=r),null!=n&&(isNaN(n)?this._height=null:this._height=n);const[o,s,a,u]=this.updateBounds(t,e,r,n);return null!=o&&(isNaN(o)?this._x=null:this._x=o),null!=s&&(isNaN(s)?this._y=null:this._y=s),null!=a&&(isNaN(a)?this._width=null:this._width=a),null!=u&&(isNaN(u)?this._height=null:this._height=u),i&&this.refreshLayout(),[o,s,a,u]}get hasX(){return null!=this._x&&!isNaN(this._x)}get hasY(){return null!=this._y&&!isNaN(this._y)}get hasWidth(){return null!=this._width&&!isNaN(this._width)}get hasHeight(){return null!=this._height&&!isNaN(this._height)}get x(){return this._x||0}set x(t){this.setBounds(null==t?NaN:t,null,null,null)}get y(){return null!=this._y?this._y:0}set y(t){this.setBounds(null,null==t?NaN:t,null,null)}get width(){return null!=this._width?this._width:0}set width(t){this.setBounds(null,null,null==t?NaN:t,null)}get height(){return null!=this._height?this._height:0}set height(t){this.setBounds(null,null,null,null==t?NaN:t)}refreshLayout(){}}fi.idCounter=0;const di=c.ONE,[mi]=(di.timesNum(2),function(t,e){void 0===e&&(e=null);var r=Lr(function(t,e){void 0===e&&(e=null);var r=Lr(function(t,e){var r=new ut((e=e||{}).grammar||{}),n=new qe(t,Ge(Ge({},e),{grammar:r})),i=n.generatedTokenizer.next.bind(n.generatedTokenizer);return(e.debug||"").split("|").findIndex(function(t){return"all"==t||"lexer"==t})>=0&&console.log("Prog: \n","".concat(n.generatedTokenizer.vm.prog.debugValue().join("\n"))),[r,i]}(t,e=e||{}),2),n=r[0],i=r[1];n.augmentStartSymbol();var o=Lr(Ir(n,e.type),2);return[o[0],i,o[1]]}(t,e),3),n=r[0],i=r[1],o=r[2],s=new vr(n);return(e.tokenizer||i)&&s.setTokenizer(e.tokenizer||i),(e.debug||"").split("|").findIndex(function(t){return"all"==t||"parser"==t})>=0&&function(t,e){var r=t.grammar,n=t.parseTable;console.log("===============================\nGrammar (as default): \n",r.debugValue.map(function(t,e){return"".concat(e+1," - ").concat(t)}),"===============================\nGrammar (as Bison): \n",r.debugValue.map(function(t,e){return"".concat(t.replace("->",":")," ; \n")}).join(""),"===============================\nParseTable: \n",JSON.stringify(function(t,e){var r={},n=t.debugValue,i=null==e?void 0:e.debugValue;for(var o in n){var s=n[o];if(e){var a=i[o];r[o]={items:a.items,actions:s,goto:a.goto}}else r[o]=s}return r}(n,e),null,4),"===============================\nConflicts: \n",n.conflictActions)}(s,o),[s,i,o]}(String.raw`
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Notations=e():t.Notations=e()}(this,()=>(()=>{var t={24:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,l=u>>1,c=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=l}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,l=8*o-i-1,c=(1<<l)-1,h=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;t[r+p]=255&s,p+=d,s/=256,l-=8);t[r+p-d]|=128*g}},80:(t,e,r)=>{"use strict";var n=r(922).hp;function i(t,e){return function(){return t.apply(e,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,{iterator:a,toStringTag:u}=Symbol,l=(c=Object.create(null),t=>{const e=o.call(t);return c[e]||(c[e]=e.slice(8,-1).toLowerCase())});var c;const h=t=>(t=t.toLowerCase(),e=>l(e)===t),f=t=>e=>typeof e===t,{isArray:p}=Array,d=f("undefined");function g(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&v(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const y=h("ArrayBuffer"),m=f("string"),v=f("function"),b=f("number"),w=t=>null!==t&&"object"==typeof t,S=t=>{if("object"!==l(t))return!1;const e=s(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||u in t||a in t)},E=h("Date"),C=h("File"),_=h("Blob"),x=h("FileList"),O=h("URLSearchParams"),[A,T,N,R]=["ReadableStream","Request","Response","Headers"].map(h);function I(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,i;if("object"!=typeof t&&(t=[t]),p(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(g(t))return;const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(n=0;n<o;n++)s=i[n],e.call(null,t[s],s,t)}}function k(t,e){if(g(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n,i=r.length;for(;i-- >0;)if(n=r[i],e===n.toLowerCase())return n;return null}const L="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r.g,P=t=>!d(t)&&t!==L,B=(j="undefined"!=typeof Uint8Array&&s(Uint8Array),t=>j&&t instanceof j);var j;const M=h("HTMLFormElement"),D=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),U=h("RegExp"),F=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};I(r,(r,i)=>{let o;!1!==(o=e(r,i,t))&&(n[i]=o||r)}),Object.defineProperties(t,n)},$=h("AsyncFunction"),V=(z="function"==typeof setImmediate,G=v(L.postMessage),z?setImmediate:G?(q=`axios@${Math.random()}`,W=[],L.addEventListener("message",({source:t,data:e})=>{t===L&&e===q&&W.length&&W.shift()()},!1),t=>{W.push(t),L.postMessage(q,"*")}):t=>setTimeout(t));var z,G,q,W;const H="undefined"!=typeof queueMicrotask?queueMicrotask.bind(L):"undefined"!=typeof process&&process.nextTick||V;var K={isArray:p,isArrayBuffer:y,isBuffer:g,isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||v(t.append)&&("formdata"===(e=l(t))||"object"===e&&v(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&y(t.buffer),e},isString:m,isNumber:b,isBoolean:t=>!0===t||!1===t,isObject:w,isPlainObject:S,isEmptyObject:t=>{if(!w(t)||g(t))return!1;try{return 0===Object.keys(t).length&&Object.getPrototypeOf(t)===Object.prototype}catch(t){return!1}},isReadableStream:A,isRequest:T,isResponse:N,isHeaders:R,isUndefined:d,isDate:E,isFile:C,isBlob:_,isRegExp:U,isFunction:v,isStream:t=>w(t)&&v(t.pipe),isURLSearchParams:O,isTypedArray:B,isFileList:x,forEach:I,merge:function t(){const{caseless:e,skipUndefined:r}=P(this)&&this||{},n={},i=(i,o)=>{const s=e&&k(n,o)||o;S(n[s])&&S(i)?n[s]=t(n[s],i):S(i)?n[s]=t({},i):p(i)?n[s]=i.slice():r&&d(i)||(n[s]=i)};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&I(arguments[t],i);return n},extend:(t,e,r,{allOwnKeys:n}={})=>(I(e,(e,n)=>{r&&v(e)?t[n]=i(e,r):t[n]=e},{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let i,o,a;const u={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)a=i[o],n&&!n(a,t,e)||u[a]||(e[a]=t[a],u[a]=!0);t=!1!==r&&s(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:l,kindOfTest:h,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(p(t))return t;let e=t.length;if(!b(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[a]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:M,hasOwnProperty:D,hasOwnProp:D,reduceDescriptors:F,freezeMethods:t=>{F(t,(e,r)=>{if(v(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];v(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach(t=>{r[t]=!0})};return p(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:k,global:L,isContextDefined:P,isSpecCompliantForm:function(t){return!!(t&&v(t.append)&&"FormData"===t[u]&&t[a])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(w(t)){if(e.indexOf(t)>=0)return;if(g(t))return t;if(!("toJSON"in t)){e[n]=t;const i=p(t)?[]:{};return I(t,(t,e)=>{const o=r(t,n+1);!d(o)&&(i[e]=o)}),e[n]=void 0,i}}return t};return r(t,0)},isAsyncFn:$,isThenable:t=>t&&(w(t)||v(t))&&v(t.then)&&v(t.catch),setImmediate:V,asap:H,isIterable:t=>null!=t&&v(t[a])};function J(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}K.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const Q=J.prototype,Y={};function X(t){return K.isPlainObject(t)||K.isArray(t)}function Z(t){return K.endsWith(t,"[]")?t.slice(0,-2):t}function tt(t,e,r){return t?t.concat(e).map(function(t,e){return t=Z(t),!r&&e?"["+t+"]":t}).join(r?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Y[t]={value:t}}),Object.defineProperties(J,Y),Object.defineProperty(Q,"isAxiosError",{value:!0}),J.from=(t,e,r,n,i,o)=>{const s=Object.create(Q);K.toFlatObject(t,s,function(t){return t!==Error.prototype},t=>"isAxiosError"!==t);const a=t&&t.message?t.message:"Error",u=null==e&&t?t.code:e;return J.call(s,a,u,r,n,i),t&&null==s.cause&&Object.defineProperty(s,"cause",{value:t,configurable:!0}),s.name=t&&t.name||"Error",o&&Object.assign(s,o),s};const et=K.toFlatObject(K,{},null,function(t){return/^is[A-Z]/.test(t)});function rt(t,e,r){if(!K.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const i=(r=K.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!K.isUndefined(e[t])})).metaTokens,o=r.visitor||c,s=r.dots,a=r.indexes,u=(r.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(e);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(K.isDate(t))return t.toISOString();if(K.isBoolean(t))return t.toString();if(!u&&K.isBlob(t))throw new J("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(t)||K.isTypedArray(t)?u&&"function"==typeof Blob?new Blob([t]):n.from(t):t}function c(t,r,n){let o=t;if(t&&!n&&"object"==typeof t)if(K.endsWith(r,"{}"))r=i?r:r.slice(0,-2),t=JSON.stringify(t);else if(K.isArray(t)&&function(t){return K.isArray(t)&&!t.some(X)}(t)||(K.isFileList(t)||K.endsWith(r,"[]"))&&(o=K.toArray(t)))return r=Z(r),o.forEach(function(t,n){!K.isUndefined(t)&&null!==t&&e.append(!0===a?tt([r],n,s):null===a?r:r+"[]",l(t))}),!1;return!!X(t)||(e.append(tt(n,r,s),l(t)),!1)}const h=[],f=Object.assign(et,{defaultVisitor:c,convertValue:l,isVisitable:X});if(!K.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!K.isUndefined(r)){if(-1!==h.indexOf(r))throw Error("Circular reference detected in "+n.join("."));h.push(r),K.forEach(r,function(r,i){!0===(!(K.isUndefined(r)||null===r)&&o.call(e,r,K.isString(i)?i.trim():i,n,f))&&t(r,n?n.concat(i):[i])}),h.pop()}}(t),e}function nt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function it(t,e){this._pairs=[],t&&rt(t,this,e)}const ot=it.prototype;function st(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function at(t,e,r){if(!e)return t;const n=r&&r.encode||st;K.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(o=i?i(e,r):K.isURLSearchParams(e)?e.toString():new it(e,r).toString(n),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}ot.append=function(t,e){this._pairs.push([t,e])},ot.toString=function(t){const e=t?function(e){return t.call(this,e,nt)}:nt;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};var ut=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){K.forEach(this.handlers,function(e){null!==e&&t(e)})}},lt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ct={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:it,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ht="undefined"!=typeof window&&"undefined"!=typeof document,ft="object"==typeof navigator&&navigator||void 0,pt=ht&&(!ft||["ReactNative","NativeScript","NS"].indexOf(ft.product)<0),dt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,gt=ht&&window.location.href||"http://localhost";var yt={...Object.freeze({__proto__:null,hasBrowserEnv:ht,hasStandardBrowserWebWorkerEnv:dt,hasStandardBrowserEnv:pt,navigator:ft,origin:gt}),...ct};function mt(t){function e(t,r,n,i){let o=t[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=t.length;return o=!o&&K.isArray(n)?n.length:o,a?(K.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s):(n[o]&&K.isObject(n[o])||(n[o]=[]),e(t,r,n[o],i)&&K.isArray(n[o])&&(n[o]=function(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}(n[o])),!s)}if(K.isFormData(t)&&K.isFunction(t.entries)){const r={};return K.forEachEntry(t,(t,n)=>{e(function(t){return K.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0])}(t),n,r,0)}),r}return null}const vt={transitional:lt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,i=K.isObject(t);if(i&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return n?JSON.stringify(mt(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t)||K.isReadableStream(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return rt(t,new yt.classes.URLSearchParams,{visitor:function(t,e,r,n){return yt.isNode&&K.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...e})}(t,this.formSerializer).toString();if((o=K.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return rt(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),function(t){if(K.isString(t))try{return(0,JSON.parse)(t),K.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||vt.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(K.isResponse(t)||K.isReadableStream(t))return t;if(t&&K.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(t){if(r){if("SyntaxError"===t.name)throw J.from(t,J.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],t=>{vt.headers[t]={}});var bt=vt;const wt=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),St=Symbol("internals");function Et(t){return t&&String(t).trim().toLowerCase()}function Ct(t){return!1===t||null==t?t:K.isArray(t)?t.map(Ct):String(t)}function _t(t,e,r,n,i){return K.isFunction(n)?n.call(this,e,r):(i&&(e=r),K.isString(e)?K.isString(n)?-1!==e.indexOf(n):K.isRegExp(n)?n.test(e):void 0:void 0)}class xt{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function i(t,e,r){const i=Et(e);if(!i)throw new Error("header name must be a non-empty string");const o=K.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||e]=Ct(t))}const o=(t,e)=>K.forEach(t,(t,r)=>i(t,r,e));if(K.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(K.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))o((t=>{const e={};let r,n,i;return t&&t.split("\n").forEach(function(t){i=t.indexOf(":"),r=t.substring(0,i).trim().toLowerCase(),n=t.substring(i+1).trim(),!r||e[r]&&wt[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e})(t),e);else if(K.isObject(t)&&K.isIterable(t)){let r,n,i={};for(const e of t){if(!K.isArray(e))throw TypeError("Object iterator must return a key-value pair");i[n=e[0]]=(r=i[n])?K.isArray(r)?[...r,e[1]]:[r,e[1]]:e[1]}o(i,e)}else null!=t&&i(e,t,r);return this}get(t,e){if(t=Et(t)){const r=K.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(K.isFunction(e))return e.call(this,t,r);if(K.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Et(t)){const r=K.findKey(this,t);return!(!r||void 0===this[r]||e&&!_t(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function i(t){if(t=Et(t)){const i=K.findKey(r,t);!i||e&&!_t(0,r[i],i,e)||(delete r[i],n=!0)}}return K.isArray(t)?t.forEach(i):i(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const i=e[r];t&&!_t(0,this[i],i,t,!0)||(delete this[i],n=!0)}return n}normalize(t){const e=this,r={};return K.forEach(this,(n,i)=>{const o=K.findKey(r,i);if(o)return e[o]=Ct(n),void delete e[i];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}(i):String(i).trim();s!==i&&delete e[i],e[s]=Ct(n),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return K.forEach(this,(r,n)=>{null!=r&&!1!==r&&(e[n]=t&&K.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(t=>r.set(t)),r}static accessor(t){const e=(this[St]=this[St]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=Et(t);e[n]||(function(t,e){const r=K.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(t,r,i){return this[n].call(this,e,t,r,i)},configurable:!0})})}(r,t),e[n]=!0)}return K.isArray(t)?t.forEach(n):n(t),this}}xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(xt.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}}),K.freezeMethods(xt);var Ot=xt;function At(t,e){const r=this||bt,n=e||r,i=Ot.from(n.headers);let o=n.data;return K.forEach(t,function(t){o=t.call(r,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Tt(t){return!(!t||!t.__CANCEL__)}function Nt(t,e,r){J.call(this,null==t?"canceled":t,J.ERR_CANCELED,e,r),this.name="CanceledError"}function Rt(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new J("Request failed with status code "+r.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}K.inherits(Nt,J,{__CANCEL__:!0});const It=(t,e,r=3)=>{let n=0;const i=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const u=Date.now(),l=n[s];i||(i=u),r[o]=a,n[o]=u;let c=s,h=0;for(;c!==o;)h+=r[c++],c%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),u-i<e)return;const f=l&&u-l;return f?Math.round(1e3*h/f):void 0}}(50,250);return function(r,o){let s,a,u=0,l=1e3/o;const c=(r,o=Date.now())=>{u=o,s=null,a&&(clearTimeout(a),a=null),(r=>{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,u=i(a);n=o,t({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&o<=s?(s-o)/u:void 0,event:r,lengthComputable:null!=s,[e?"download":"upload"]:!0})})(...r)};return[(...t)=>{const e=Date.now(),r=e-u;r>=l?c(t,e):(s=t,a||(a=setTimeout(()=>{a=null,c(s)},l-r)))},()=>s&&c(s)]}(0,r)},kt=(t,e)=>{const r=null!=t;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Lt=t=>(...e)=>K.asap(()=>t(...e));var Pt=yt.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,yt.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0,Bt=yt.hasStandardBrowserEnv?{write(t,e,r,n,i,o,s){if("undefined"==typeof document)return;const a=[`${t}=${encodeURIComponent(e)}`];K.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),K.isString(n)&&a.push(`path=${n}`),K.isString(i)&&a.push(`domain=${i}`),!0===o&&a.push("secure"),K.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if("undefined"==typeof document)return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function jt(t,e,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);return t&&(n||0==r)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Mt=t=>t instanceof Ot?{...t}:t;function Dt(t,e){e=e||{};const r={};function n(t,e,r,n){return K.isPlainObject(t)&&K.isPlainObject(e)?K.merge.call({caseless:n},t,e):K.isPlainObject(e)?K.merge({},e):K.isArray(e)?e.slice():e}function i(t,e,r,i){return K.isUndefined(e)?K.isUndefined(t)?void 0:n(void 0,t,0,i):n(t,e,0,i)}function o(t,e){if(!K.isUndefined(e))return n(void 0,e)}function s(t,e){return K.isUndefined(e)?K.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function a(r,i,o){return o in e?n(r,i):o in t?n(void 0,r):void 0}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e,r)=>i(Mt(t),Mt(e),0,!0)};return K.forEach(Object.keys({...t,...e}),function(n){const o=u[n]||i,s=o(t[n],e[n],n);K.isUndefined(s)&&o!==a||(r[n]=s)}),r}var Ut=t=>{const e=Dt({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=e;if(e.headers=s=Ot.from(s),e.url=at(jt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),K.isFormData(r))if(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(K.isFunction(r.getHeaders)){const t=r.getHeaders(),e=["content-type","content-length"];Object.entries(t).forEach(([t,r])=>{e.includes(t.toLowerCase())&&s.set(t,r)})}if(yt.hasStandardBrowserEnv&&(n&&K.isFunction(n)&&(n=n(e)),n||!1!==n&&Pt(e.url))){const t=i&&o&&Bt.read(o);t&&s.set(i,t)}return e},Ft="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise(function(e,r){const n=Ut(t);let i=n.data;const o=Ot.from(n.headers).normalize();let s,a,u,l,c,{responseType:h,onUploadProgress:f,onDownloadProgress:p}=n;function d(){l&&l(),c&&c(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function y(){if(!g)return;const n=Ot.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Rt(function(t){e(t),d()},function(t){r(t),d()},{data:h&&"text"!==h&&"json"!==h?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:t,request:g}),g=null}g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout,"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(y)},g.onabort=function(){g&&(r(new J("Request aborted",J.ECONNABORTED,t,g)),g=null)},g.onerror=function(e){const n=new J(e&&e.message?e.message:"Network Error",J.ERR_NETWORK,t,g);n.event=e||null,r(n),g=null},g.ontimeout=function(){let e=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||lt;n.timeoutErrorMessage&&(e=n.timeoutErrorMessage),r(new J(e,i.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,t,g)),g=null},void 0===i&&o.setContentType(null),"setRequestHeader"in g&&K.forEach(o.toJSON(),function(t,e){g.setRequestHeader(e,t)}),K.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),h&&"json"!==h&&(g.responseType=n.responseType),p&&([u,c]=It(p,!0),g.addEventListener("progress",u)),f&&g.upload&&([a,l]=It(f),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=e=>{g&&(r(!e||e.type?new Nt(null,t,g):e),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const m=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(n.url);m&&-1===yt.protocols.indexOf(m)?r(new J("Unsupported protocol "+m+":",J.ERR_BAD_REQUEST,t)):g.send(i||null)})},$t=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let r,n=new AbortController;const i=function(t){if(!r){r=!0,s();const e=t instanceof Error?t:this.reason;n.abort(e instanceof J?e:new Nt(e instanceof Error?e.message:e))}};let o=e&&setTimeout(()=>{o=null,i(new J(`timeout ${e} of ms exceeded`,J.ETIMEDOUT))},e);const s=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(t=>{t.unsubscribe?t.unsubscribe(i):t.removeEventListener("abort",i)}),t=null)};t.forEach(t=>t.addEventListener("abort",i));const{signal:a}=n;return a.unsubscribe=()=>K.asap(s),a}};const Vt=function*(t,e){let r=t.byteLength;if(!e||r<e)return void(yield t);let n,i=0;for(;i<r;)n=i+e,yield t.slice(i,n),i=n},zt=(t,e,r,n)=>{const i=async function*(t,e){for await(const r of async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}}(t))yield*Vt(r,e)}(t,e);let o,s=0,a=t=>{o||(o=!0,n&&n(t))};return new ReadableStream({async pull(t){try{const{done:e,value:n}=await i.next();if(e)return a(),void t.close();let o=n.byteLength;if(r){let t=s+=o;r(t)}t.enqueue(new Uint8Array(n))}catch(t){throw a(t),t}},cancel:t=>(a(t),i.return())},{highWaterMark:2})},{isFunction:Gt}=K,qt=(({Request:t,Response:e})=>({Request:t,Response:e}))(K.global),{ReadableStream:Wt,TextEncoder:Ht}=K.global,Kt=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},Jt=t=>{t=K.merge.call({skipUndefined:!0},qt,t);const{fetch:e,Request:r,Response:n}=t,i=e?Gt(e):"function"==typeof fetch,o=Gt(r),s=Gt(n);if(!i)return!1;const a=i&&Gt(Wt),u=i&&("function"==typeof Ht?(l=new Ht,t=>l.encode(t)):async t=>new Uint8Array(await new r(t).arrayBuffer()));var l;const c=o&&a&&Kt(()=>{let t=!1;const e=new r(yt.origin,{body:new Wt,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),h=s&&a&&Kt(()=>K.isReadableStream(new n("").body)),f={stream:h&&(t=>t.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!f[t]&&(f[t]=(e,r)=>{let n=e&&e[t];if(n)return n.call(e);throw new J(`Response type '${t}' is not supported`,J.ERR_NOT_SUPPORT,r)})});return async t=>{let{url:i,method:s,data:a,signal:l,cancelToken:p,timeout:d,onDownloadProgress:g,onUploadProgress:y,responseType:m,headers:v,withCredentials:b="same-origin",fetchOptions:w}=Ut(t),S=e||fetch;m=m?(m+"").toLowerCase():"text";let E=$t([l,p&&p.toAbortSignal()],d),C=null;const _=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let x;try{if(y&&c&&"get"!==s&&"head"!==s&&0!==(x=await(async(t,e)=>{const n=K.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(K.isBlob(t))return t.size;if(K.isSpecCompliantForm(t)){const e=new r(yt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return K.isArrayBufferView(t)||K.isArrayBuffer(t)?t.byteLength:(K.isURLSearchParams(t)&&(t+=""),K.isString(t)?(await u(t)).byteLength:void 0)})(e):n})(v,a))){let t,e=new r(i,{method:"POST",body:a,duplex:"half"});if(K.isFormData(a)&&(t=e.headers.get("content-type"))&&v.setContentType(t),e.body){const[t,r]=kt(x,It(Lt(y)));a=zt(e.body,65536,t,r)}}K.isString(b)||(b=b?"include":"omit");const e=o&&"credentials"in r.prototype,l={...w,signal:E,method:s.toUpperCase(),headers:v.normalize().toJSON(),body:a,duplex:"half",credentials:e?b:void 0};C=o&&new r(i,l);let p=await(o?S(C,w):S(i,l));const d=h&&("stream"===m||"response"===m);if(h&&(g||d&&_)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=p[e]});const e=K.toFiniteNumber(p.headers.get("content-length")),[r,i]=g&&kt(e,It(Lt(g),!0))||[];p=new n(zt(p.body,65536,r,()=>{i&&i(),_&&_()}),t)}m=m||"text";let O=await f[K.findKey(f,m)||"text"](p,t);return!d&&_&&_(),await new Promise((e,r)=>{Rt(e,r,{data:O,headers:Ot.from(p.headers),status:p.status,statusText:p.statusText,config:t,request:C})})}catch(e){if(_&&_(),e&&"TypeError"===e.name&&/Load failed|fetch/i.test(e.message))throw Object.assign(new J("Network Error",J.ERR_NETWORK,t,C),{cause:e.cause||e});throw J.from(e,e&&e.code,t,C)}}},Qt=new Map,Yt=t=>{let e=t&&t.env||{};const{fetch:r,Request:n,Response:i}=e,o=[n,i,r];let s,a,u=o.length,l=Qt;for(;u--;)s=o[u],a=l.get(s),void 0===a&&l.set(s,a=u?new Map:Jt(e)),l=a;return a};Yt();const Xt={http:null,xhr:Ft,fetch:{get:Yt}};K.forEach(Xt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}});const Zt=t=>`- ${t}`,te=t=>K.isFunction(t)||null===t||!1===t;var ee=function(t,e){t=K.isArray(t)?t:[t];const{length:r}=t;let n,i;const o={};for(let s=0;s<r;s++){let r;if(n=t[s],i=n,!te(n)&&(i=Xt[(r=String(n)).toLowerCase()],void 0===i))throw new J(`Unknown adapter '${r}'`);if(i&&(K.isFunction(i)||(i=i.get(e))))break;o[r||"#"+s]=i}if(!i){const t=Object.entries(o).map(([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build"));throw new J("There is no suitable adapter to dispatch the request "+(r?t.length>1?"since :\n"+t.map(Zt).join("\n"):" "+Zt(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i};function re(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Nt(null,t)}function ne(t){return re(t),t.headers=Ot.from(t.headers),t.data=At.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ee(t.adapter||bt.adapter,t)(t).then(function(e){return re(t),e.data=At.call(t,t.transformResponse,e),e.headers=Ot.from(e.headers),e},function(e){return Tt(e)||(re(t),e&&e.response&&(e.response.data=At.call(t,t.transformResponse,e.response),e.response.headers=Ot.from(e.response.headers))),Promise.reject(e)})}const ie="1.13.2",oe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{oe[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const se={};oe.transitional=function(t,e,r){function n(t,e){return"[Axios v"+ie+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,i,o)=>{if(!1===t)throw new J(n(i," has been removed"+(e?" in "+e:"")),J.ERR_DEPRECATED);return e&&!se[i]&&(se[i]=!0,console.warn(n(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,i,o)}},oe.spelling=function(t){return(e,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};var ae={assertOptions:function(t,e,r){if("object"!=typeof t)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],s=e[o];if(s){const e=t[o],r=void 0===e||s(e,o,t);if(!0!==r)throw new J("option "+o+" must be "+r,J.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new J("Unknown option "+o,J.ERR_BAD_OPTION)}},validators:oe};const ue=ae.validators;class le{constructor(t){this.defaults=t||{},this.interceptors={request:new ut,response:new ut}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const r=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?r&&!String(t.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+r):t.stack=r}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Dt(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:i}=e;void 0!==r&&ae.assertOptions(r,{silentJSONParsing:ue.transitional(ue.boolean),forcedJSONParsing:ue.transitional(ue.boolean),clarifyTimeoutError:ue.transitional(ue.boolean)},!1),null!=n&&(K.isFunction(n)?e.paramsSerializer={serialize:n}:ae.assertOptions(n,{encode:ue.function,serialize:ue.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),ae.assertOptions(e,{baseUrl:ue.spelling("baseURL"),withXsrfToken:ue.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&K.merge(i.common,i[e.method]);i&&K.forEach(["delete","get","head","post","put","patch","common"],t=>{delete i[t]}),e.headers=Ot.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach(function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))});const u=[];let l;this.interceptors.response.forEach(function(t){u.push(t.fulfilled,t.rejected)});let c,h=0;if(!a){const t=[ne.bind(this),void 0];for(t.unshift(...s),t.push(...u),c=t.length,l=Promise.resolve(e);h<c;)l=l.then(t[h++],t[h++]);return l}c=s.length;let f=e;for(;h<c;){const t=s[h++],e=s[h++];try{f=t(f)}catch(t){e.call(this,t);break}}try{l=ne.call(this,f)}catch(t){return Promise.reject(t)}for(h=0,c=u.length;h<c;)l=l.then(u[h++],u[h++]);return l}getUri(t){return at(jt((t=Dt(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}}K.forEach(["delete","get","head","options"],function(t){le.prototype[t]=function(e,r){return this.request(Dt(r||{},{method:t,url:e,data:(r||{}).data}))}}),K.forEach(["post","put","patch"],function(t){function e(e){return function(r,n,i){return this.request(Dt(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}le.prototype[t]=e(),le.prototype[t+"Form"]=e(!0)});var ce=le;class he{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(t){e=t});const r=this;this.promise.then(t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null}),this.promise.then=t=>{let e;const n=new Promise(t=>{r.subscribe(t),e=t}).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t(function(t,n,i){r.reason||(r.reason=new Nt(t,n,i),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new he(function(e){t=e}),cancel:t}}}var fe=he;const pe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pe).forEach(([t,e])=>{pe[e]=t});var de=pe;const ge=function t(e){const r=new ce(e),n=i(ce.prototype.request,r);return K.extend(n,ce.prototype,r,{allOwnKeys:!0}),K.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Dt(e,r))},n}(bt);ge.Axios=ce,ge.CanceledError=Nt,ge.CancelToken=fe,ge.isCancel=Tt,ge.VERSION=ie,ge.toFormData=rt,ge.AxiosError=J,ge.Cancel=ge.CanceledError,ge.all=function(t){return Promise.all(t)},ge.spread=function(t){return function(e){return t.apply(null,e)}},ge.isAxiosError=function(t){return K.isObject(t)&&!0===t.isAxiosError},ge.mergeConfig=Dt,ge.AxiosHeaders=Ot,ge.formToJSON=t=>mt(K.isHTMLForm(t)?new FormData(t):t),ge.getAdapter=ee,ge.HttpStatusCode=de,ge.default=ge,t.exports=ge},922:(t,e,r)=>{"use strict";var n=r(961),i=r(24);e.hp=a,e.IS=50;var o=2147483647;function s(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|p(t,e),n=s(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return h(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if($(t,ArrayBuffer)||t&&$(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r)).__proto__=a.prototype,n}(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return a.from(n,e,r);var i=function(t){if(a.isBuffer(t)){var e=0|f(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||V(t.length)?s(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return l(t),s(t<0?0:0|f(t))}function h(t){for(var e=t.length<0?0:0|f(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function f(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function p(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(t).length;default:if(i)return n?-1:D(t).length;e=(""+e).toLowerCase(),i=!0}}function d(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return T(this,e,r);case"base64":return _(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=r;o<a;o++)if(l(t,o)===l(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,f=0;f<u;f++)if(l(t,o+f)!==l(e,f)){h=!1;break}if(h)return o}return-1}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(V(a))return s;t[r+s]=a}return s}function b(t,e,r,n){return F(D(e,t.length-r),t,r,n)}function w(t,e,r,n){return F(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function S(t,e,r,n){return w(t,e,r,n)}function E(t,e,r,n){return F(U(e),t,r,n)}function C(t,e,r,n){return F(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function _(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,l=t[i],c=null,h=l>239?4:l>223?3:l>191?2:1;if(i+h<=r)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(t){var e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=O));return r}(n)}a.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(t,e,r){return u(t,e,r)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},a.allocUnsafe=function(t){return c(t)},a.allocUnsafeSlow=function(t){return c(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if($(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),$(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=a.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if($(o,Uint8Array)&&(o=a.from(o)),!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},a.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?x(this,0,t):d.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},a.prototype.compare=function(t,e,r,n,i){if($(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),u=Math.min(o,s),l=this.slice(n,i),c=t.slice(e,r),h=0;h<u;++h)if(l[h]!==c[h]){o=l[h],s=c[h];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},a.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return S(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function T(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function N(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=M(t[o]);return i}function R(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function I(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function k(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function L(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(t,e,r,n,o){return e=+e,r>>>=0,o||L(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function B(t,e,r,n,o){return e=+e,r>>>=0,o||L(t,0,r,8),i.write(t,e,r,n,52,8),r+8}a.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=a.prototype,n},a.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},a.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||I(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||I(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||I(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||I(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||k(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},a.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||k(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);k(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s|0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);k(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s|0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var o=i-1;o>=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=a.isBuffer(t)?t:a.from(t,n),u=s.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=s[o%u]}return this};var j=/[^+/0-9A-Za-z-_]/g;function M(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function $(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function V(t){return t!=t}},961:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],u=o[1],l=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,u)),c=0,h=u>0?s-4:s;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],l[c++]=e>>16&255,l[c++]=e>>8&255,l[c++]=255&e;return 2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[c++]=255&e),1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[c++]=e>>8&255,l[c++]=255&e),l},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(l(t,a,a+s>u?u:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function l(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(u(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n={};return(()=>{"use strict";r.d(n,{aq:()=>S,YJ:()=>N});class t{constructor(e=null){if(this.TYPE="Entity",this.uuid=t.counter++,this._parent=null,(e=e||{}).metadata)throw new Error("See where metadata is being passed")}get parent(){return this._parent}setParent(t){this._parent=t}debugValue(){return{type:this.TYPE}}toString(){return`Entity(id = ${this.uuid})`}equals(t,e=!1){return this.TYPE==t.TYPE}clone(){const t=this.newInstance();return this.copyTo(t),t}copyTo(t){}newInstance(){return new this.constructor}}t.counter=0;class e extends t{constructor(){super(...arguments),this.TYPE="TimedEntity"}equals(t){return super.equals(t)&&this.duration.equals(t.duration)}}function i(t,e){if(!t)throw new Error(e)}r(80).default;const o=Math.pow(2,32);Math.pow(2,64);class s{constructor(t,e,r){this.uuid=s.counter++,this._spawnedFrom=null,this.sourceState=null,this.cancelled=!1,this.timeStamp=-1,this.children=[],this.name=t,this.source=e,this.payload=r}get spawnedFrom(){return this._spawnedFrom}setSpawnedFrom(t){this._spawnedFrom=t,this._rootEvent=null==t?this:t.rootEvent}spawn(t,e,r){const n=new s(t,e,r);return n.setSpawnedFrom(this),this.children.push(n),n}get rootEvent(){return this._rootEvent}}s.counter=0;class a{constructor(){this.stateData=null,this.id=a.counter++}get name(){return this.constructor.name}enter(t){this.stateData=t}handle(t){}}a.counter=0;class u{constructor(){this._eventHub=new l}get eventHub(){return this._eventHub}set eventHub(t){const e=this._eventHub;this._eventHub=t,this.eventHubChanged(e)}eventHubChanged(t){console.log("WARNING - EventHub Change Listener not implemented: ",this.constructor.name)}}class l{constructor(){this._handlers={},this._events=[],this._inBatchMode=!1}on(t,e){return this._addHandler(t,this._handlers,e)}removeOn(t,e){return this._removeHandler(t,this._handlers,e)}_ensurestrings(t){return"string"==typeof t&&(t=t.split(",")),t.map(function(t){return t.trim()})}_addHandler(t,e,r){return this._ensurestrings(t).forEach(function(t){e[t]=e[t]||[],e[t].push(r)}),this}_removeHandler(t,e,r){return this._ensurestrings(t).forEach(function(t){const n=e[t]||[];for(let t=0;t<n.length;t++)if(n[t]==r){n.splice(t,1);break}}),this}emit(t,e,r){const n=new s(t,e,r);return this._inBatchMode?(this._events.push(n),!0):this.dispatchEvent(n)}dispatchEvent(t){const e=this._handlers[t.name]||[];for(const r of e)if(r(t),t.cancelled)return!1;return!0}startBatchMode(){return this._inBatchMode||(this._inBatchMode=!0),this}cancelBatch(){this._inBatchMode=!1,this._events=[]}commitBatch(){this._inBatchMode=!1,this.emit(l.BATCH_EVENTS,this,this._events),this._events=[]}}l.BATCH_EVENTS="BatchEvents";class c{constructor(...t){this._firstChild=null,this._lastChild=null,this._size=0;for(const e of t)this.pushBack(e)}toJSON(){return Array.from(this.values())}forEach(t){let e=this._firstChild,r=0;for(;null!=e&&0!=t(e);)r++,e=e.nextSibling;return r}equals(t,e){if(this.size!=t.size)return!1;let r=this.first,n=t.first;for(;null!=r&&null!=n;r=r.nextSibling,n=n.nextSibling)if(!e(r,n))return!1;return null==r&&null==n}get isEmpty(){return 0==this._size}get size(){return this._size}get first(){return this._firstChild}get last(){return this._lastChild}*reversedValues(){let t=this._lastChild;for(;null!=t;)yield t,t=t.prevSibling}*values(){let t=this._firstChild;for(;null!=t;)yield t,t=t.nextSibling}add(t,e=null){if(null!=t.nextSibling||null!=t.prevSibling)throw new Error("New node already added to a list. Remove it first");if(t.nextSibling=t.prevSibling=null,this._size++,null==this._firstChild||null==this._lastChild)this._firstChild=this._lastChild=t;else if(null==e)t.prevSibling=this._lastChild,t.nextSibling=null,this._lastChild.nextSibling=t,this._lastChild=t;else if(e==this._firstChild)t.nextSibling=e,t.prevSibling=null,this._firstChild.prevSibling=t,this._firstChild=t;else{const r=e.prevSibling;t.nextSibling=e,e.prevSibling=t,t.prevSibling=r,null!=r&&(r.nextSibling=t)}return this}pushFront(t){return this.add(t,this._firstChild)}pushBack(t){return this.add(t)}remove(t){const e=t.nextSibling,r=t.prevSibling;return null==e?(this._lastChild=r,null==r&&(this._firstChild=null)):e.prevSibling=r,null==r?(this._firstChild=e,null==e&&(this._lastChild=null)):r.nextSibling=e,this._size--,t.prevSibling=t.nextSibling=null,this}popBack(){if(null==this._lastChild)throw new Error("No children");const t=this._lastChild;return this.remove(t),t}popFront(){if(null==this._firstChild)throw new Error("No children");const t=this._firstChild;return this.remove(t),t}}class h{}function f(t,e){for(t=Math.abs(t),e=Math.abs(e);e>0;){const r=e;e=t%e,t=r}return t}h.IS_EXPLORER=()=>navigator&&navigator.userAgent.indexOf("MSIE")>-1,h.IS_FIREFOX=()=>navigator&&navigator.userAgent.indexOf("Firefox")>-1,h.IS_OPERA=()=>navigator&&navigator.userAgent.toLowerCase().indexOf("op")>-1,h.UAHasChrome=()=>navigator&&navigator.userAgent.indexOf("Chrome")>-1,h.UAHasSafari=()=>navigator&&navigator.userAgent.indexOf("Safari")>-1,h.IS_SAFARI=()=>navigator&&h.UAHasSafari()&&(!h.UAHasChrome()||!h.UAHasSafari()),h.IS_CHROME=()=>navigator&&h.UAHasChrome()&&(!h.UAHasChrome()||!h.IS_OPERA());class p{constructor(t=0,e=1,r=!1){if(isNaN(t)||isNaN(e))throw new Error(`Invalid numerator(${t}) or denminator(${e})`);if(r){const r=f(t,e);t/=r,e/=r}this.num=t,this.den=e}static parse(t,e=!1){const r=t.trim().split("/").map(t=>t.trim());let n=1,i=1;if(1==r.length)n=parseInt(r[0]);else{if(2!=r.length)throw new Error("Invalid fraction string: "+t);r[0].length>0&&(n=parseInt(r[0])),r[1].length>0&&(i=parseInt(r[1]))}if(isNaN(n)||isNaN(i))throw new Error("Invalid fraction string: "+t);return new p(n,i,e)}get isWhole(){return this.num%this.den==0}get isZero(){return 0==this.num}get isInfinity(){return 0==this.den}get isOne(){return this.num==this.den}get ceil(){return this.num%this.den==0?this.num/this.den:1+Math.floor(this.num/this.den)}get floor(){return this.num%this.den==0?this.num/this.den:Math.floor(this.num/this.den)}plus(t,e=!1){return new p(this.num*t.den+this.den*t.num,this.den*t.den,e)}plusNum(t,e=!1){return new p(this.num+this.den*t,this.den,e)}minus(t,e=!1){return new p(this.num*t.den-this.den*t.num,this.den*t.den,e)}minusNum(t,e=!1){return new p(this.num-this.den*t,this.den,e)}times(t,e=!1){return new p(this.num*t.num,this.den*t.den,e)}timesNum(t,e=!1){return new p(this.num*t,this.den,e)}divby(t,e=!1){return new p(this.num*t.den,this.den*t.num,e)}divbyNum(t,e=!1){return new p(this.num,this.den*t,e)}numDivby(t,e=!1){return new p(this.den*t,this.num,e)}mod(t){const e=this.divby(t),r=Math.floor(e.num/e.den);return this.minus(t.timesNum(r))}modNum(t){const e=this.divbyNum(t),r=Math.floor(e.num/e.den);return this.minusNum(t*r)}get inverse(){return new p(this.den,this.num)}get factorized(){const t=f(this.num,this.den);return new p(this.num/t,this.den/t)}equals(t){return this.num*t.den==this.den*t.num}equalsNum(t){return this.num==this.den*t}cmp(t){return this.num*t.den-this.den*t.num}cmpNum(t){return this.num-this.den*t}isLT(t){return this.cmp(t)<0}isLTE(t){return this.cmp(t)<=0}isLTNum(t){return this.cmpNum(t)<0}isLTENum(t){return this.cmpNum(t)<=0}isGT(t){return this.cmp(t)>0}isGTE(t){return this.cmp(t)>=0}isGTNum(t){return this.cmpNum(t)>0}isGTENum(t){return this.cmpNum(t)>=0}toString(){return this.num+"/"+this.den}static max(t,e){return t.cmp(e)>0?t:e}static min(t,e){return t.cmp(e)<0?t:e}}p.ZERO=new p,p.ONE=new p(1,1),p.INFINITY=new p(1,0);const d=(t=0,e=1,r=!1)=>new p(t,e,r),g=p.ZERO;p.ONE;class y{constructor(t,e=0,r=0,n=0){this.cycle=t,this.barIndex=e,this.beatIndex=r,this.instance=n}get next(){const t=this.cycle.bars[this.barIndex],e=[[this.barIndex,this.beatIndex,this.instance],t.beatLengths[this.beatIndex]];return this.instance++,(!t.beatCounts[this.beatIndex]||this.instance>=t.beatCounts[this.beatIndex])&&(this.instance=0,this.beatIndex++,this.beatIndex>=t.beatLengths.length&&(this.beatIndex=0,this.barIndex++,this.barIndex>=this.cycle.bars.length&&(this.barIndex=0))),e}get prev(){const t=this.cycle.bars[this.barIndex],e=[[this.barIndex,this.beatIndex,this.instance],t.beatLengths[this.beatIndex]];return this.instance--,this.instance<0&&(this.beatIndex--,this.beatIndex<0&&(this.barIndex--,this.barIndex<0&&(this.barIndex=this.cycle.bars.length-1),this.beatIndex=this.cycle.bars[this.barIndex].beatCount-1),this.instance=(this.cycle.bars[this.barIndex].beatCounts[this.beatIndex]||1)-1),e}}class m extends e{constructor(t=null){super(t=t||{}),this.TYPE="Bar",this.beatLengths=[],this.beatCounts=[],this.name=t.name||"";for(const e of t.beatLengths||[])"number"==typeof e?this.beatLengths.push(d(e)):this.beatLengths.push(e);for(const e of t.beatCounts||[])this.beatCounts.push(e);for(;this.beatCounts.length<this.beatLengths.length;)this.beatCounts.push(1)}debugValue(){return Object.assign(Object.assign({},super.debugValue()),{name,beatLengths:this.beatLengths})}equals(t){if(!super.equals(t))return!1;if(this.beatLengths.length!=t.beatLengths.length)return!1;if(this.beatCounts.length!=t.beatCounts.length)return!1;for(let e=0;e<this.beatLengths.length;e++)if(!this.beatLengths[e].equals(t.beatLengths[e]))return!1;for(let e=0;e<this.beatCounts.length;e++)if(this.beatCounts[e]!=t.beatCounts[e])return!1;return!0}copyTo(t){super.copyTo(t),t.name=this.name,t.beatLengths=[...this.beatLengths],t.beatCounts=[...this.beatCounts]}instanceCount(t){return t>this.beatCounts.length?1:this.beatCounts[t]}get beatCount(){return this.beatLengths.length}get totalBeatCount(){let t=0;for(let e=0;e<this.beatLengths.length;e++)t+=this.beatCounts[e]||1;return t}get duration(){let t=g;for(let e=0;e<this.beatLengths.length;e++)t=t.plus(this.beatLengths[e].timesNum(this.beatCounts[e]||1));return t}}class v extends e{constructor(t=null){super(t=t||{}),this.TYPE="Cycle",this.name=t.name||"",this.bars=t.bars||[]}debugValue(){return Object.assign(Object.assign({},super.debugValue()),{name,bars:this.bars.map(t=>t.debugValue())})}children(){return this.bars}equals(t){if(!super.equals(t))return!1;if(this.bars.length!=t.bars.length)return!1;for(let e=0;e<this.bars.length;e++)if(!this.bars[e].equals(t.bars[e]))return!1;return!0}getAtIndex(t){let e=0;for(;t<0;)t+=this.totalBeatCount,e--;t>=this.totalBeatCount&&(e=Math.floor(t/this.totalBeatCount)),t%=this.totalBeatCount;let r=g;for(let n=0;n<this.bars.length;n++){const i=this.bars[n];if(t>=i.totalBeatCount)t-=i.totalBeatCount,r=r.plus(i.duration);else for(let o=0;o<i.beatCount;o++){const s=i.beatLengths[o],a=i.beatCounts[o]||1;if(!(t>=a)){const i=t;return[e,[n,o,i],r.plus(s.timesNum(i))]}t-=a,r=r.plus(s.timesNum(a))}}throw new Error("Should not be here!")}getPosition(t){const e=this.duration;let r=0;if(t.isLT(g))for(;t.isLT(g);)r--,t=t.plus(e);else if(t.isGTE(e)){const n=t.mod(e);i((t=t.minus(n).divby(e)).isWhole),r=t.floor,t=n}let n=0;for(let e=0;e<this.bars.length;e++){const i=this.bars[e],o=i.duration;if(t.isGTE(o))t=t.minus(o);else for(let o=0;o<i.beatCount;o++){const s=i.beatLengths[o],a=i.beatCounts[o]||1;for(let i=0;i<a;i++,n++){if(!t.isGTE(s))return[r,[e,o,i],t,n];t=t.minus(s)}}n+=i.totalBeatCount}throw new Error("Should not be here!")}*iterateBeats(t=0,e=0,r=0){let n=t,i=e,o=r;for(;;){const t=this.bars[n];yield[[n,i,o],t.beatLengths[i]],o++,(!t.beatCounts[i]||o>=t.beatCounts[i])&&(o=0,i++,i>=t.beatLengths.length&&(i=0,n++,n>=this.bars.length&&(n=0)))}}copyTo(t){super.copyTo(t),t.name=this.name,t.bars=this.bars.map(t=>t.clone())}get beatCount(){let t=0;for(const e of this.bars)t+=e.beatCount;return t}get totalBeatCount(){let t=0;for(const e of this.bars)t+=e.totalBeatCount;return t}get duration(){return this.bars.reduce((t,e)=>t.plus(e.duration),g)}}v.DEFAULT=new v({name:"Adi Thalam",bars:[new m({name:"Laghu",beatLengths:[1,1,1,1]}),new m({name:"Dhrutam",beatLengths:[1,1]}),new m({name:"Dhrutam",beatLengths:[1,1]})]});const b=p.ZERO,w=p.ONE;var S,E;(E=S||(S={})).NOTE="Note",E.LITERAL="Literal",E.SYLLABLE="Syllable",E.SPACE="Space",E.GROUP="Group",E.LABEL="Label",E.REST="Rest",E.MARKER="Marker";class C extends e{constructor(t=w){super(),this.TYPE="Atom",this.nextSibling=null,this.prevSibling=null,this.parentGroup=null,this.isContinuation=!1,this._duration=t||w}debugValue(){const t=super.debugValue();return this.duration.isOne||(t.duration=this.duration.factorized.toString()),this.isContinuation&&(t.isContinuation=!0),(this.markersBefore||[]).length>0&&(t.mbef=this.markersBefore.map(t=>t.debugValue())),(this.markersAfter||[]).length>0&&(t.maft=this.markersAfter.map(t=>t.debugValue())),t}copyTo(t){super.copyTo(t),t._duration=new p(this.duration.num,this.duration.den)}get duration(){return this._duration}set duration(t){this._duration=t}}class _ extends C{constructor(){super(...arguments),this.TYPE="LeafAtom",this.beforeRest=!1}splitAt(t){if(this.duration.cmp(t)>0){const e=this.createSpilloverSpace(this.duration.minus(t));return e.isContinuation=!0,this.duration=t,e}return null}createSpilloverSpace(t){return new O(t)}debugValue(){return this.beforeRest?Object.assign(Object.assign({},super.debugValue()),{beforeRest:!0}):super.debugValue()}}class x extends t{constructor(t,e=!0){super(),this.text=t,this.isBefore=e,this.TYPE="Marker"}debugValue(){return Object.assign(Object.assign({},super.debugValue()),{text:this.text,before:this.isBefore})}toString(){return`Marker(${this.text}-${this.isBefore})`}}class O extends _{constructor(t=w,e=!1){super(t),this.TYPE="Space",this.isSilent=!1,this.isSilent=e}debugValue(){return Object.assign(Object.assign({},super.debugValue()),{isSilent:this.isSilent})}toString(){return`Space(${this.duration}-${this.isSilent})`}copyTo(t){super.copyTo(t),t.isSilent=this.isSilent}equals(t){return super.equals(t)&&this.isSilent==t.isSilent}createSpilloverSpace(t){const e=super.createSpilloverSpace(t);return e.isSilent=this.isSilent,e}}class A extends _{constructor(t,e=w){super(e),this.value=t,this.TYPE="Literal",this.embelishments=[]}debugValue(){const t=Object.assign(Object.assign({},super.debugValue()),{value:this.value});return this.embelishments.length>0&&(t.embs=this.embelishments.map(t=>"debugValue"in t?t.debugValue():t)),t}toString(){return`Lit(${this.duration}-${this.value})`}equals(t){return super.equals(t)&&this.value==t.value}copyTo(t){super.copyTo(t),t.value=this.value}}class T extends A{constructor(t,e=w,r=0,n=0){super(t,e),this.TYPE="Note",this.octave=0,this.shift=0,this.octave=r,this.shift=n}static fromLit(t){if(t.TYPE==S.NOTE)return t;const e=new T(t.value,t.duration);return e.embelishments=t.embelishments,e.beforeRest=t.beforeRest,e}debugValue(){const t=Object.assign({},super.debugValue());return 0!=this.octave&&(t.octave=this.octave),0!=this.shift&&(t.shift=this.shift),t}toString(){return`Note(${this.duration}-${this.value}-${this.octave})`}equals(t){return super.equals(t)&&this.octave==t.octave&&this.shift==t.shift}copyTo(t){super.copyTo(t),t.octave=this.octave,t.shift=this.shift}}class N extends C{constructor(...t){super(0==t.length?b:w),this.TYPE="Group",this.durationIsMultiplier=!1,this.atoms=new c,this.addAtoms(!1,...t)}equals(t,e=!1){return!!super.equals(t)&&this.atoms.equals(t.atoms,(t,e)=>t.equals(e))}copyTo(t){super.copyTo(t),t.durationIsMultiplier=this.durationIsMultiplier,this.atoms.forEach(e=>t.atoms.add(e.clone()))}get duration(){return this.durationIsMultiplier?this.totalChildDuration.divby(this._duration):this._duration}setDurationAsMultiplier(t=!0){return this.durationIsMultiplier=t,this}setDuration(t,e=!1){return this._duration=t,this.durationIsMultiplier=e,this}debugValue(){const t=Object.assign(Object.assign({},super.debugValue()),{atoms:Array.from(this.atoms.values(),t=>t.debugValue())});return this.durationIsMultiplier&&(t.durationIsMultiplier=!0),t}splitAt(t){if(this.duration.isLTE(t)||t.isLTE(b))return null;const e=new N;this.durationIsMultiplier&&(e.durationIsMultiplier=!0,e._duration=this._duration);let r=this.duration;const n=this.totalChildDuration,i=this.durationIsMultiplier?w.divby(this._duration):this._duration.divby(n,!0);for(;r.isGT(t)&&this.atoms.last;){const n=this.atoms.last,o=n.duration.times(i),s=r.minus(o);if(!s.isGTE(t)){const r=t.minus(s,!0).divby(i,!0),o=n.splitAt(r);if(null==o)throw new Error("Spill over cannot be null here");if(this.durationIsMultiplier){if(this._duration.isZero)throw new Error("How can this be?")}else this._duration=t;return o.isContinuation=!0,e.insertAtomsAt(e.atoms.first,!0,o),e}if(this.removeAtoms(!0,n),e.insertAtomsAt(e.atoms.first,!0,n),s.equals(t))return e;r=s}return e}get totalChildDuration(){let t=b;return this.atoms.forEach(e=>t=t.plus(e.duration)),t}insertAtomsAt(t,e=!1,...r){const n=(e=e&&!this.durationIsMultiplier)?this.totalChildDuration:w;for(const e of r){if(null!=e.parentGroup){if(e.parentGroup!=this)throw new Error("Atom belongs to another parent. Remove it first");e.parentGroup.removeAtoms(!1,e)}if(e.TYPE==S.REST){const t=this.atoms.last;t&&t.TYPE!=S.GROUP&&t.TYPE!=S.LABEL&&(t.beforeRest=!0)}else e.parentGroup=this,this.atoms.add(e,t)}if(e)if(this._duration.isZero){if(this.durationIsMultiplier)throw new Error("How can this be?");this._duration=this.totalChildDuration}else{const t=this.totalChildDuration.divby(n);this._duration=this._duration.times(t,!0)}return this}addAtoms(t=!1,...e){return this.insertAtomsAt(null,t,...e)}removeAtoms(t=!1,...e){const r=(t=t&&!this.durationIsMultiplier)?this.totalChildDuration:w;for(const t of e)if(t.parentGroup==this)this.atoms.remove(t),t.parentGroup=null;else if(null!=t.parentGroup)throw new Error("Atom cannot be removed as it does not belong to this group");if(t)if(this._duration.isZero){if(this.durationIsMultiplier)throw new Error("How can this be?");this._duration=this.totalChildDuration}else{const t=this.totalChildDuration.divby(r);this._duration=this._duration.times(t,!0)}return this}}const R=p.ZERO;class I{constructor(t){this.uuid=I.counter++,t=t||{},this.beatDuration=t.beatDuration||1,"cycle"in t&&(this.cycle=t.cycle),this.cycle&&!this.cycle.duration.isZero||(this.cycle=v.DEFAULT),this._rowStartOffsets=[],this._rowEndOffsets=[],this._rowDurations=[],this._totalLayoutDuration=R,this._totalBeats=0,this._beatLayouts=[],this.lineBreaks=t.lineBreaks||t.layout||[]}equals(t){return this.beatDuration==t.beatDuration&&this.cycle.equals(t.cycle)&&this.lineBreaksEqual(t._lineBreaks)}lineBreaksEqual(t){return this._lineBreaks.length==t.length&&this._lineBreaks.every((e,r)=>e==t[r])}debugValue(){var t;return{cycle:null===(t=this.cycle)||void 0===t?void 0:t.debugValue(),beatDuration:this.beatDuration,lineBreaks:this._lineBreaks}}getBeatLocation(t){const e=t.index%this.totalBeats;let r=0;for(let n=0;n<this._lineBreaks.length;n++){if(e<r+this._lineBreaks[n]){let i=R;if(e>r){const n=new y(this.cycle,t.barIndex,t.beatIndex,t.instance);let[,o]=n.prev;for(let t=r;t<e;t++)[,o]=n.prev,i=i.plus(o.timesNum(this.beatDuration))}return[n,e-r,i]}r+=this._lineBreaks[n]}throw new Error("Invalid beat index: "+t.index)}get lineBreaks(){return this._lineBreaks&&0!=this._lineBreaks.length||(this.lineBreaks=[this.cycle.beatCount]),this._lineBreaks}set lineBreaks(t){this._lineBreaks=t,this.refreshLayout()}get beatLayouts(){return(!this._beatLayouts||this._beatLayouts.length<this.lineBreaks.length)&&this.refreshLayout(),this._beatLayouts}get totalBeats(){return this.beatLayouts,this._totalBeats}get totalLayoutDuration(){return this.beatLayouts,this._totalLayoutDuration}refreshLayout(){const t=this.cycle.iterateBeats(),e=this.beatDuration;this._beatLayouts=this.lineBreaks.map((r,n)=>{const i=[];for(let n=0;n<r;n++){const r=t.next().value;r[1]=r[1].timesNum(e),i.push(r)}return i}),this._totalBeats=this.lineBreaks.reduce((t,e)=>t+e,0),this._rowDurations=this._beatLayouts.map(t=>t.reduce((t,e)=>t.plus(e[1]),R)),this._rowDurations.forEach((t,e)=>{this._rowStartOffsets[e]=0==e?R:this._rowStartOffsets[e-1].plus(t)}),this._rowEndOffsets=this._rowDurations.map((t,e)=>this._rowStartOffsets[e].plus(t)),this._totalLayoutDuration=this._rowDurations.reduce((t,e)=>t.plus(e),R)}}I.counter=0;class k extends u{constructor(){super(...arguments),this.uuid=k.idCounter++,this.lastUpdatedAt=0,this.rows=[],this.rowAligns=new Map,this.colAligns=new Map}debugValue(){return{rows:this.rows.map(t=>t.debugValue()),lastUpdatedAt:this.lastUpdatedAt}}get firstRow(){for(const t of this.rows)if(t.numCells>0)return t.rowIndex;return-1}get firstCol(){let t=-1;for(const e of this.rows){const r=e.firstCol;r>=0&&(t<0||r<t)&&(t=r)}return t}cellsInRow(t){const e=[],r=this.rows[t];if(r)for(const t of r.cells)(null==t?void 0:t.value)&&e.push(t);return e}cellsInCol(t){const e=[];for(const r of this.rows){const n=r.cellAt(t);(null==n?void 0:n.value)&&e.push(n)}return e}addRowAlign(t){this.rowAligns.set(t.uuid,t)}addColAlign(t){this.colAligns.set(t.uuid,t)}addRows(t=-1,e=1){t<0&&(t=this.rows.length);let r=this.rows[t]||null;const n=this.rows[t-1]||null;for(let i=e-1;i>=0;i--){const e=new B(this,t+i);this.rows.splice(t,0,e),null!=r&&e.defaultRowAlign.addSuccessor(r.defaultRowAlign),0==i&&t>0&&n.defaultRowAlign.addSuccessor(e.defaultRowAlign),r=e}for(let r=t+e;r<this.rows.length;r++)this.rows[r].rowIndex+=e;return this}getRow(t){return t>=this.rows.length&&this.addRows(-1,1+t-this.rows.length),this.rows[t]}setValue(t,e,r,n){var i,o;const s=this.getRow(t);if(n||(n=(t,e)=>new P(t,e)),null==r){const t=s.clearCellAt(e);return null!=t&&(null===(i=this.eventHub)||void 0===i||i.emit(L.CLEARED,this,{loc:t.location})),t}{const t=s.cellAt(e,n),i=t.value;return null===(o=this.eventHub)||void 0===o||o.emit(L.UPDATED,this,{loc:t.location,cell:t,oldValue:t.value}),t.value=r,i}}eventHubChanged(){console.log("Event Hub Changed for GridModel")}}var L;k.idCounter=0,function(t){t.ADDED="CellAdded",t.CLEARED="CellCleared",t.REMOVED="CellRemoved",t.UPDATED="CellUpdated",t.MOVED="CellMoved"}(L||(L={}));class P{constructor(t,e,r=null){this.gridRow=t,this.colIndex=e,this.value=r,this.uuid=P.idCounter++,this.rowAlign=t.defaultRowAlign}get rowAlign(){return this._rowAlign}set rowAlign(t){t.addCell(this),this._rowAlign=t}get colAlign(){return this._colAlign}set colAlign(t){t.addCell(this),this._colAlign=t}get location(){return this.gridRow.rowIndex+":"+this.colIndex}get grid(){return this.gridRow.grid}get rowIndex(){return this.gridRow.rowIndex}debugValue(){const t={r:this.gridRow.rowIndex,c:this.colIndex,value:this.value,y:this.rowAlign.coordOffset,h:this.rowAlign.maxLength};return this.colAlign&&(t.x=this.colAlign.coordOffset,t.w=this.colAlign.maxLength),t}}P.idCounter=0;class B{constructor(t,e){this.grid=t,this.rowIndex=e,this.cells=[],this.defaultRowAlign=new M,this.grid.addRowAlign(this.defaultRowAlign)}get firstCol(){var t;for(let e=0;e<this.cells.length;e++)if(null===(t=this.cells[e])||void 0===t?void 0:t.value)return e;return-1}get numCols(){return this.cells.length}get numCells(){let t=0;for(const e of this.cells)null!=e&&null!=e.value&&t++;return t}cellAt(t,e){let r=this.cells[t]||null;return!r&&e&&(this.cells[t]=r=e(this,t),r.gridRow=this,r.colIndex=t,r.rowAlign&&this.grid.addRowAlign(r.rowAlign),r.colAlign&&this.grid.addColAlign(r.colAlign)),r}clearCellAt(t){const e=this.cells[t]||null;return e&&(this.cells[t]=null),e}debugValue(){return{r:this.rowIndex,cells:this.cells.filter(t=>t).map(t=>null==t?void 0:t.debugValue())}}}class j{constructor(){this.uuid=j.idCounter++,this.needsLayout=!1,this._coordOffset=0,this._maxLength=0,this.paddingBefore=5,this.paddingAfter=5,this.cells=[],this.prevLines=[],this.nextLines=[]}get coordOffset(){return this._coordOffset}get maxLength(){return this._maxLength+this.paddingBefore+this.paddingAfter}setMaxLength(t){this._maxLength=t}setPadding(t,e){t>=0&&(this.paddingBefore=t),e>=0&&(this.paddingAfter=e)}addCell(t){return this.beforeAddingCell(t)&&this.cells.push(t),this}removeCell(t){if(this.beforeRemovingCell(t))for(let e=0;e<this.cells.length;e++)if(this.cells[e].uuid==t.uuid){this.cells.splice(e,1);break}return this}addSuccessor(t){for(const e of this.nextLines)if(e==t)return;this.nextLines.push(t),t.prevLines.push(this)}}j.idCounter=0;class M extends j{setOffset(t){this._coordOffset=t;for(const e of this.cells)if(e.value){const r=this.getCellView(e);this._maxLength<=0&&this.evalMaxLength(),r.setBounds(null,t,null,this.maxLength,!0)}}evalMaxLength(t=[]){this._maxLength=0;for(const t of this.cells)if(t.value){const e=this.getCellView(t);this._maxLength=Math.max(e.minSize.height,this._maxLength)}return this._maxLength}beforeAddingCell(t){return t.rowAlign&&t.rowAlign!=this&&t.rowAlign.removeCell(t),t.rowAlign!=this}beforeRemovingCell(t){return t.rowAlign==this}}p.ZERO;const D=p.ONE;class U{constructor(t,e,r,n,i,o,s,a,u){this.index=t,this.role=e,this.offset=r,this.duration=n,this.barIndex=i,this.beatIndex=o,this.instance=s,this.prevBeat=a,this.nextBeat=u,this.uuid=U.idCounter++,this.atomIsPlaceholder=!1}debugValue(){return{index:this.index,role:this.role.name,offset:this.offset.toString(),duration:this.duration.toString(),barIndex:this.barIndex,beatIndex:this.beatIndex,instance:this.instance,atom:this.atom.debugValue()}}get endOffset(){return this.offset.plus(this.duration)}get filled(){return this.remaining.isZero}get remaining(){return this.atom?this.duration.minus(this.atom.duration,!0):this.duration}add(t){return!(this.remaining.cmp(t.duration)<0||(this.atom?(this.atomIsPlaceholder||(this.atomIsPlaceholder=!0,this.atom=new N(this.atom).setDuration(D,!0)),this.atom.addAtoms(!0,t)):this.atom=t,0))}get preMarkers(){const t=[];let e=this.atom;for(;null!=e;){for(const r of e.markersBefore||[])t.push(r);e=e.TYPE==S.GROUP?e.atoms.first:null}return t}get postMarkers(){const t=[];let e=this.atom;for(;null!=e;)t.splice(0,0,...e.markersAfter||[]),e=e.TYPE==S.GROUP?e.atoms.last:null;return t}}U.idCounter=0;var F=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},$=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},V=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function z(t,e,r){var n=[],o={};return t.forEach(function(t){var s,a;if(!(e(t)in o))for(var u=t,l={},c=[[t,[]]];c.length>0;){for(var h=[],f=0;f<c.length;f++){var p=F(c[f],2),d=p[0],g=p[1];i(null!=d);var y=r(d),m=$([],F(g),!1);try{for(var v=(s=void 0,V(y)),b=v.next();!b.done;b=v.next()){var w=F(b.value,2),S=w[0],E=w[1];S==u?(m.push([E,S]),m.forEach(function(t,e){var r=F(t,2),n=(r[0],r[1]);return o[n]=!0}),n.push([u,m]),m=m.slice(0,m.length-1)):e(S)in l||(l[e(S)]=!0,h.push([S,$($([],F(m),!1),[[E,S]],!1)]))}}catch(t){s={error:t}}finally{try{b&&!b.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}}c=h}}),n}var G,q,W=(G=function(t,e){return G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},G(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}G(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),H=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},K=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},J=function(t){return t.key},Q=(function(){function t(t){this.root=new Q,this.keyFunc=t}t.prototype.add=function(t,e){void 0===e&&(e=0);for(var r=this.root,n=e;n<t.length;n++){var i=this.keyFunc(t[n]);if(r.children.has(i))r=r.children.get(i);else{var o=new Q;o.value=t[n],o.parent=r,r.children.set(i,o),r=o}}return r.isLeaf=!0,r},Object.defineProperty(t.prototype,"debugValue",{get:function(){return this.root.debugValue},enumerable:!1,configurable:!0})}(),function(){function t(){this.isLeaf=!1,this.value=null,this.parent=null,this.children=new Map}return Object.defineProperty(t.prototype,"debugValue",{get:function(){var t,e,r={value:this.value,children:{}};this.isLeaf&&(r.isLeaf=!0);try{for(var n=H(this.children.entries()),i=n.next();!i.done;i=n.next()){var o=K(i.value,2),s=o[0],a=o[1];r.children[s]=a.debugValue}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},enumerable:!1,configurable:!0}),t}()),Y=function(){function t(t){void 0===t&&(t=J),this._entries=[],this._entriesByKey={},this.keyFunc=t}return t.prototype.clear=function(){this._entries=[],this._entriesByKey={}},t.prototype.remove=function(t){var e=[];this._entriesByKey={};for(var r=!1,n=0;n<this._entries.length;n++){var i=this._entries[n];t(i)?r=!0:(i.id=e.length,e.push(i),this._entriesByKey[this.keyFunc(i)]=i)}return this._entries=e,r},Object.defineProperty(t.prototype,"entries",{get:function(){return this._entries},enumerable:!1,configurable:!0}),t.prototype.get=function(t){return i(t>=0&&t<this._entries.length),this._entries[t]},t.prototype.getByKey=function(t){return this._entriesByKey[t]||null},t.prototype.ensure=function(t,e){if(void 0===e&&(e=!1),this.has(t)){if(e)throw new Error("Entry ".concat(this.keyFunc(t)," already exists"));return this._entriesByKey[this.keyFunc(t)]}return this._entriesByKey[this.keyFunc(t)]=t,t.id=this._entries.length,this._entries.push(t),t},t.prototype.has=function(t){return this.keyFunc(t)in this._entriesByKey},Object.defineProperty(t.prototype,"size",{get:function(){return this._entries.length},enumerable:!1,configurable:!0}),t}(),X=function(){function t(t,e){void 0===e&&(e=!0),this.entries=new Set,this.hasNull=!1,this.grammar=t,this.enforceSymbolType=e}return Object.defineProperty(t.prototype,"debugString",{get:function(){return"<"+this.labels().sort().join(", ")+">"},enumerable:!1,configurable:!0}),t.prototype.labels=function(t){var e,r;void 0===t&&(t=!1);var n=[];try{for(var o=H(this.entries),s=o.next();!s.done;s=o.next()){var a=s.value,u=this.grammar.getSymById(a);i(null!=u),t&&u.isAuxiliary||n.push(u.label)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return this.hasNull&&n.push(""),n},t.prototype.addFrom=function(t,e){return void 0===e&&(e=!0),t.addTo(this,e)},t.prototype.addTo=function(t,e){var r,n;void 0===e&&(e=!0);var i=t.entries.size;try{for(var o=H(this.entries),s=o.next();!s.done;s=o.next()){var a=s.value;t.entries.add(a)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return e&&(t.hasNull=this.hasNull||t.hasNull),t.entries.size-i},t.prototype.has=function(t){return this.entries.has(t.id)},t.prototype.add=function(t){return i(null==this.enforceSymbolType||this.enforceSymbolType==t.isTerminal,"Terminal types being enforced: ".concat(this.enforceSymbolType)),this.entries.add(t.id),this},t.prototype.delete=function(t){return this.entries.delete(t.id)},Object.defineProperty(t.prototype,"size",{get:function(){return this.entries.size+(this.hasNull?1:0)},enumerable:!1,configurable:!0}),t}(),Z=function(){function t(t){this.grammar=t,this.refresh()}return Object.defineProperty(t.prototype,"nonterms",{get:function(){var t=this,e=[];return this.entries.forEach(function(r){var n=t.grammar.getSymById(r);i(null!=n&&!n.isTerminal),e.push(n)}),e},enumerable:!1,configurable:!0}),t.prototype.refresh=function(){var t=this;this.entries=new Set,this.visited={};var e=0;do{e=this.entries.size,this.grammar.allNonTerminals.forEach(function(e){return t.visit(e)})}while(e!=this.entries.size)},t.prototype.visit=function(t){var e,r;try{for(var n=H(this.grammar.rulesForNT(t)),i=n.next();!i.done;i=n.next()){var o=i.value;if(this.isStrNullable(o.rhs)){this.add(t);break}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.isNullable=function(t){return!t.isTerminal&&this.entries.has(t.id)},t.prototype.isStrNullable=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=null),null==r&&(r=t.length-1);for(var n=e;n<=r;n++)if(!this.isNullable(t.syms[n]))return!1;return!0},t.prototype.add=function(t){i(!t.isTerminal),this.entries.add(t.id)},t}(),tt=function(){function t(t){this.entries={},this._count=0,this.grammar=t}return t.prototype.refresh=function(){this.entries={},this._count=0},t.prototype.forEachTerm=function(t,e){var r=this,n=this.entriesFor(t);n.entries.forEach(function(t){var n=r.grammar.getSymById(t);i(null!=n&&n.isTerminal),e(n)}),n.hasNull&&e(null)},Object.defineProperty(t.prototype,"debugValue",{get:function(){var t={};for(var e in this.entries)t[this.grammar.getSymById(e).label]=this.entries[e].debugString;return t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){var t=0;for(var e in this.entries)t+=this.entries[e].size;return t},enumerable:!1,configurable:!0}),t.prototype.entriesFor=function(t){if(t.id in this.entries)return this.entries[t.id];var e=new X(this.grammar);return this.entries[t.id]=e,e},t.prototype.addNull=function(t){var e=this.entriesFor(t);return!e.hasNull&&(e.hasNull=!0,!0)},t.prototype.add=function(t,e,r){void 0===r&&(r=!0),t.isTerminal&&i(!1,"Should not be here");var n=this.entriesFor(t);if(e.isTerminal){if(n.has(e))return!1;n.add(e),this._count++}else{var o=this.entriesFor(e),s=this.entriesFor(t),a=o.addTo(s,r);this._count+=a}return!0},t}(),et=function(t){function e(e,r){var n=t.call(this,e)||this;return r||(r=new Z(e)),n.nullables=r,n.refresh(),n}return W(e,t),e.prototype.forEachTermIn=function(t,e,r){void 0===e&&(e=0);for(var n=t.syms,i={},o=!0,s=e;o&&s<n.length;s++){var a=n[s];if(a.isTerminal)r(a),o=!1;else{var u=a;this.forEachTerm(u,function(t){null==t||t.id in i||(i[t.id]=!0,r(t))}),this.nullables.isNullable(a)||(o=!1)}}o&&r(null)},e.prototype.refresh=function(){var e=this;t.prototype.refresh.call(this);var r=0;do{r=this.count,this.grammar.forEachRule(null,function(t){e.processRule(t)})}while(r!=this.count)},e.prototype.processRule=function(t){var e,r,n=this.nullables,i=!0;try{for(var o=H(t.rhs.syms),s=o.next();!s.done;s=o.next()){var a=s.value;if(this.add(t.nt,a,!1),a.isTerminal||!n.isNullable(a)){i=!1;break}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}i&&this.addNull(t.nt)},e}(tt),rt=function(t){function e(e,r){var n=t.call(this,e)||this;return n.firstSets=r||new et(e),n.refresh(),n}return W(e,t),Object.defineProperty(e.prototype,"nullables",{get:function(){return this.firstSets.nullables},enumerable:!1,configurable:!0}),e.prototype.refresh=function(){var e=this;t.prototype.refresh.call(this);var r=this.grammar;i(null!=r.startSymbol,"Select start symbol of the grammar"),this.add(r.startSymbol,r.Eof);var n=0;do{n=this.count,this.grammar.forEachRule(null,function(t){return e.processRule(t)})}while(n!=this.count)},e.prototype.processRule=function(t){for(var e=this,r=t.rhs.syms,n=this.firstSets,i=this.firstSets.nullables,o=function(i){var o=r[i];if(o.isTerminal)return"continue";n.forEachTermIn(t.rhs,i+1,function(t){null!=t&&e.add(o,t)})},s=0;s<r.length;s++)o(s);for(s=r.length-1;s>=0;s--)if(!r[s].isTerminal){for(var a=!0,u=s+1;u<r.length;u++){var l=r[u];if(l.isTerminal||!i.isNullable(l)){a=!1;break}}a&&this.add(r[s],t.nt)}},e}(tt),nt=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},it=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},ot=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},st=function(){function t(e,r,n,i){void 0===i&&(i=null),this.grammar=e,this.label=r,this.isTerminal=n,this.isAuxiliary=!1,this.auxType=null,this.precedence=1,this.assocLeft=!0,this.creationId=-1,this.isTerminal=n,this.label=r,this.id=null==i?t.idCounter--:i}return t.prototype.compareTo=function(t){return this.label.localeCompare(t.label)},t.prototype.equals=function(t){return this.label==t.label},t.prototype.toString=function(){return this.label},t.idCounter=-1,t}(),at=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.syms=t||[]}return t.prototype.append=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var i=nt(r),o=i.next();!o.done;o=i.next()){var s=o.value;this.syms.push(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return this},t.prototype.extend=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var i=nt(r),o=i.next();!o.done;o=i.next()){var s=o.value;this.append.apply(this,ot([],it(s.syms),!1))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return this},t.prototype.copy=function(){return new(t.bind.apply(t,ot([void 0],it(this.syms),!1)))},t.prototype.add=function(t){this.syms.push(t)},t.prototype.isTerminal=function(t){return this.syms[t].isTerminal},Object.defineProperty(t.prototype,"length",{get:function(){return this.syms.length},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this.syms.map(function(t){return t.toString()}).join(" ")},t.prototype.slice=function(e,r){return new(t.bind.apply(t,ot([void 0],it(this.syms.slice(e,r)),!1)))},t.prototype.splice=function(t,e){for(var r,n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return(r=this.syms).splice.apply(r,ot([t,e],it(n),!1)),this},t.prototype.compareTo=function(t){for(var e=0;e<this.syms.length&&e<t.syms.length;e++){var r=this.syms[e].compareTo(t.syms[e]);if(0!=r)return r}return this.syms.length-t.syms.length},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.containsAt=function(t,e){for(var r=0;r<e.length&&t+r<this.syms.length;r++)if(!this.syms[t+r].equals(e.syms[r]))return!1;return r==e.length},Object.defineProperty(t.prototype,"debugString",{get:function(){return this.syms.map(function(t){return t.label}).join(" ")},enumerable:!1,configurable:!0}),t}(),ut=function(){function t(t){this.value=t}return Object.defineProperty(t.prototype,"isFunction",{get:function(){return"string"==typeof this.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChildPosition",{get:function(){return"number"==typeof this.value},enumerable:!1,configurable:!0}),t}(),lt=function(){function t(t,e,r){if(void 0===r&&(r=null),this.nt=t,this.rhs=e,this.action=r,t.isTerminal)throw new Error("Cannot add rules to a terminal")}return Object.defineProperty(t.prototype,"debugString",{get:function(){return"".concat(this.nt.label," -> ").concat(this.rhs.debugString)},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.compareTo=function(t){i(!isNaN(this.id));var e=this.nt.compareTo(t.nt);return 0==e&&this.rhs.compareTo(t.rhs),e},t}(),ct=function(){function t(t){this.startSymbol=null,this.modified=!0,this.symbolSet=new Y(function(t){return t.label}),this.allRules=[],this._rulesForNT=null,this._followSets=null,this._hasNull=!1,this.auxNTCount=0,t=t||{},this.auxNTPrefix=t.auxNTPrefix||"$",this.Null=this.newTerm(""),this.Eof=this.newTerm("$end")}return t.make=function(e){var r=new t;return e(r),r},t.prototype.rulesForNT=function(t){var e,r;if(i(!t.isTerminal),null==this._rulesForNT){this._rulesForNT={};try{for(var n=nt(this.allRules),o=n.next();!o.done;o=n.next()){var s=o.value;s.nt.label in this._rulesForNT||(this._rulesForNT[s.nt.label]=[]),this._rulesForNT[s.nt.label].push(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}return t.label in this._rulesForNT||(this._rulesForNT[t.label]=[]),this._rulesForNT[t.label]},Object.defineProperty(t.prototype,"nullables",{get:function(){return this.firstSets.nullables},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstSets",{get:function(){return this.followSets.firstSets},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"followSets",{get:function(){return(this.modified||null==this._followSets)&&this.refresh(),i(null!=this._followSets),this._followSets},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"augStartRule",{get:function(){return this._AugStartRule},enumerable:!1,configurable:!0}),t.prototype.augmentStartSymbol=function(t){void 0===t&&(t="$accept"),i(null==this._AugStartRule,"Ensure this grammar has not yet been augmented."),i(null!=this.startSymbol,"Start symbol not yet set");var e=this.newNT(t);return this._AugStartRule=new lt(e,new at(this.startSymbol)),this.addRule(this._AugStartRule,0),this},t.prototype.refresh=function(){return this.symbolSet.entries.forEach(function(t,e){return t.id=e}),this._rulesForNT=null,this.allRules.forEach(function(t,e){t.id=e}),this._followSets=new rt(this),this.modified=!1,this},t.prototype.addTerminals=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var i=nt(r),o=i.next();!o.done;o=i.next()){var s=o.value;this.newTerm(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}},Object.defineProperty(t.prototype,"terminals",{get:function(){return this.symbolSet.entries.filter(function(t){return t.isTerminal})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allNonTerminals",{get:function(){return this.symbolSet.entries.filter(function(t){return!t.isTerminal})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nonTerminals",{get:function(){return this.symbolSet.entries.filter(function(t){return!t.isTerminal&&!t.isAuxiliary})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"auxNonTerminals",{get:function(){return this.symbolSet.entries.filter(function(t){return t.isAuxiliary})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allSymbols",{get:function(){return this.symbolSet.entries},enumerable:!1,configurable:!0}),t.prototype.forEachNT=function(t){var e,r;try{for(var n=nt(this.symbolSet.entries),i=n.next();!i.done;i=n.next()){var o=i.value;if(!o.isTerminal&&0==t(o))return}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.forEachRule=function(t,e){for(var r=null==t?this.allRules:this.rulesForNT(t)||[],n=0;n<r.length;n++)if(0==e(r[n],n))return!1;return!0},t.prototype.getRule=function(t,e){return"string"==typeof t&&(t=this.getSym(t)),i(null!=t),this.rulesForNT(t)[e]},t.prototype.findRule=function(t,e){return this.rulesForNT(t).findIndex(function(r){return r.nt==t&&r.rhs.equals(e)})},t.prototype.add=function(t,e,r){void 0===r&&(r=null);var n=null;return"string"==typeof t?null==(n=this.getSym(t))&&(n=this.newNT(t)):n=this.ensureSym(t),this.addRule(new lt(n,e,r))},t.prototype.addRule=function(t,e){if(void 0===e&&(e=-1),this.findRule(t.nt,t.rhs)>=0)throw new Error("Duplicate rule: "+t.debugString);return t.id=this.allRules.length,0==t.rhs.length&&(this._hasNull=!0),e<0?this.allRules.push(t):this.allRules.splice(e,0,t),this._rulesForNT=null,this.modified=!0,t},t.prototype.removeRules=function(t){return this.allRules=this.allRules.filter(function(e){return!t(e)}),this._rulesForNT=null,this.modified=!0,!0},t.prototype.removeSymbols=function(t){var e=!1,r=[];return this.allRules.forEach(function(n){if(!t(n.nt))if(0==n.rhs.length)r.push(n);else{var i=new(at.bind.apply(at,ot([void 0],it(n.rhs.syms.filter(function(e){return!t(e)})),!1)));e=e||n.rhs.length!=i.length,i.length>0&&r.push(new lt(n.nt,i))}}),this.allRules=r,e=this.symbolSet.remove(t)||e,this.modified=this.modified||e,e},t.prototype.getSymById=function(t){return this.symbolSet.get(t)},t.prototype.getSym=function(t){return this.symbolSet.getByKey(t)},t.prototype.ensureSym=function(t,e){void 0===e&&(e=!1);var r=this.symbolSet.ensure(t,e);return t==r?r.creationId<0&&(r.creationId=this.symbolSet.size):i(!e,"Should have already thrown error"),r},t.prototype.T=function(t,e){void 0===e&&(e=!1);var r=this.getSym(t);if(null!=r){if(e)throw new Error("Terminal ".concat(t," is already exists"));if(!r.isTerminal)throw new Error("Symbol (".concat(t,") already exists as a non-terminal"))}else r=new st(this,t,!0),r=this.ensureSym(r,!0);return r},t.prototype.NT=function(t,e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=this.getSym(t);if(null!=n){if(r)throw new Error("Non-terminal ".concat(t," is already exists"));if(n.isTerminal)throw new Error("Symbol (".concat(t,") already exists as a terminal"))}else(n=new st(this,t,!1)).isAuxiliary=e,n=this.ensureSym(n,!0),e||null!=this.startSymbol||(this.startSymbol=n);return n},t.prototype.newTerm=function(t){return this.T(t,!0)},t.prototype.newNT=function(t,e){return void 0===e&&(e=!1),this.NT(t,e,!0)},t.prototype.isTerminal=function(t){var e=this.getSym(t);return null!=e&&e.isTerminal},t.prototype.isNT=function(t){var e=this.getSym(t);return null!=e&&!e.isTerminal&&!e.isAuxiliary},t.prototype.isAuxNT=function(t){var e=this.getSym(t);return null!=e&&!e.isTerminal&&e.isAuxiliary},t.prototype.seq=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];if(1==r.length)return this.normalizeRule(r[0]);var i=new at;try{for(var o=nt(r),s=o.next();!s.done;s=o.next())for(var a=s.value,u=this.normalizeRule(a),l=0;l<u.length;l++)i.add(u.syms[l])}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return i},t.prototype.anyof=function(){for(var t=this,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return 1==e.length?this.normalizeRule(e[0]):new at(this.ensureAuxNT.apply(this,ot([],it(e.map(function(e){return t.normalizeRule(e)})),!1)))},t.prototype.opt=function(t){var e=this.anyof(t,new at),r=e.syms[0];return i(1==e.syms.length&&r.isAuxiliary,"NT must be an auxiliary symbol"),r.auxType="opt",e},t.prototype.atleast0=function(t,e){var r=this;void 0===e&&(e=!0);var n=this.normalizeRule(t),i=this.findAuxNT(function(e){var i=r.rulesForNT(e);if(2!=i.length)return!1;var o=0;if(0==i[0].rhs.length)o=1;else{if(0!=i[1].rhs.length)return!1;o=0}var s=i[o].rhs;return s.length==1+t.length&&(s.syms[0].equals(e)?s.containsAt(1,n):!!s.syms[s.length-1].equals(e)&&s.containsAt(0,n))});return null==i&&((i=this.newAuxNT()).auxType=e?"atleast0:left":"atleast0",this.add(i,new at),e?this.add(i,new at(i).extend(n)):this.add(i,n.copy().append(i))),new at(i)},t.prototype.atleast1=function(t,e){var r=this;void 0===e&&(e=!0);var n=this.normalizeRule(t),i=this.findAuxNT(function(e){var i=r.rulesForNT(e);if(2!=i.length)return!1;var o=0;if(i[0].rhs.equals(n))o=1;else{if(!i[1].rhs.equals(n))return!1;o=0}var s=i[o].rhs;return s.length==1+t.length&&(s.syms[0].equals(e)?s.containsAt(1,n):!!s.syms[s.length-1].equals(e)&&s.containsAt(0,n))});return null==i&&((i=this.newAuxNT()).auxType=e?"atleast1:left":"atleast1",this.add(i,n),e?this.add(i,new at(i).extend(n)):this.add(i,n.copy().append(i))),new at(i)},t.prototype.normalizeRule=function(t){if("string"==typeof t){var e=this.getSym(t);if(null==e)throw new Error("Invalid symbol: '".concat(t,"'"));return new at(e)}return t},t.prototype.newAuxNTName=function(){return this.auxNTPrefix+this.auxNTCount++},t.prototype.newAuxNT=function(t){return void 0===t&&(t=""),""==t&&(t=this.newAuxNTName()),this.newNT(t,!0)},t.prototype.ensureAuxNT=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=this.findAuxNTByRules.apply(this,ot([],it(r),!1));if(null==i){(i=this.newAuxNT()).auxType="anyof";try{for(var o=nt(r),s=o.next();!s.done;s=o.next()){var a=s.value;this.add(i,a)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}}return i},t.prototype.findAuxNT=function(t){var e,r;try{for(var n=nt(this.symbolSet.entries),i=n.next();!i.done;i=n.next()){var o=i.value;if(o.isAuxiliary&&t(o))return o}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return null},t.prototype.findAuxNTByRules=function(){for(var t=this,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this.findAuxNT(function(r){var n=t.rulesForNT(r);if(n.length!=e.length)return!1;for(var i=0;i<n.length;i++)if(!n[i].rhs.equals(e[i]))return!1;return!0})},t.prototype.print=function(t){void 0===t&&(t=null);var e=(t=t||{}).ruleSep||"->",r=t.includeSemiColon||!1,n=t.lambdaSymbol||"",i=[];return this.forEachRule(null,function(t,o){var s="".concat(t.nt.label," ").concat(e," ");t.rhs.length>0?s+=t.rhs.debugString:s+=n,r&&(s+=" ;"),i.push(s)}),i},Object.defineProperty(t.prototype,"debugValue",{get:function(){var t=[];return this.forEachRule(null,function(e,r){t.push("".concat(e.nt.label," -> ").concat(e.rhs.debugString))}),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"terminalDerivingSymbols",{get:function(){for(var t,e,r,n,i=new X(this,null),o=-1,s=!0;0!=o;){o=0;try{for(var a=(t=void 0,nt(this.allRules)),u=a.next();!u.done;u=a.next()){var l=u.value;s=!0;try{for(var c=(r=void 0,nt(l.rhs.syms)),h=c.next();!h.done;h=c.next()){var f=h.value;i.has(f)||(f.isTerminal?(i.add(f),o++):s=!1)}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}s&&!i.has(l.nt)&&(i.add(l.nt),o++)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}}return i},enumerable:!1,configurable:!0}),t.prototype.reachableSymbols=function(t){var e,r,n,o,s,a;void 0===t&&(t=null),null==t&&(t=this._AugStartRule?this._AugStartRule.nt:this.startSymbol),i(null!=t,"Start symbol does not exist");for(var u=new X(this,!1).add(t),l=[t];l.length>0;){var c=[];try{for(var h=(e=void 0,nt(l)),f=h.next();!f.done;f=h.next()){var p=f.value;try{for(var d=(n=void 0,nt(this.rulesForNT(p))),g=d.next();!g.done;g=d.next()){var y=g.value;try{for(var m=(s=void 0,nt(y.rhs.syms)),v=m.next();!v.done;v=m.next()){var b=v.value;b.isTerminal||u.has(b)||(c.push(b),u.add(b))}}catch(t){s={error:t}}finally{try{v&&!v.done&&(a=m.return)&&a.call(m)}finally{if(s)throw s.error}}}}catch(t){n={error:t}}finally{try{g&&!g.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(e)throw e.error}}l=c}return u},Object.defineProperty(t.prototype,"cycles",{get:function(){var t=this;return z(this.allNonTerminals,function(t){return t.label},function(e){var r=[];return t.forEachRule(e,function(n,i){n.rhs.syms.forEach(function(o,s){o.isTerminal||t.nullables.isStrNullable(n.rhs,0,s-1)&&t.nullables.isStrNullable(n.rhs,s+1)&&r.push([o,[e,i]])})}),r})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftRecursion",{get:function(){var t=this;return z(this.allNonTerminals,function(t){return t.id},function(e){var r=[];return t.forEachRule(e,function(e,n){e.rhs.syms.forEach(function(e,i){if(!e.isTerminal)return r.push([e,n]),t.nullables.isNullable(e)})}),r})},enumerable:!1,configurable:!0}),t}(),ht=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){t[t.WORD_CHAR=0]="WORD_CHAR",t[t.DIGITS=1]="DIGITS",t[t.SPACES=2]="SPACES"}(q||(q={}));var ft,pt,dt="0".charCodeAt(0),gt="9".charCodeAt(0),yt="a".charCodeAt(0),mt="z".charCodeAt(0),vt="A".charCodeAt(0),bt="Z".charCodeAt(0),wt="_".charCodeAt(0),St=function(){function t(){}return t.prototype.matches=function(t,e){var r=this.match(t);return e?!r:r},t}(),Et=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ht(e,t),e.prototype.match=function(t){if(t>=8192&&t<=8202)return!0;for(var e=0;e<14;e++)if(" \f\n\r\t\v  \u2028\u2029   \ufeff".charCodeAt(e)==t)return!0;return!1},e.prototype.reString=function(t){return t?"\\S":"\\s"},e}(St),Ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ht(e,t),e.prototype.match=function(t){return t>=dt&&t<=gt},e.prototype.reString=function(t){return t?"\\D":"\\d"},e}(St),_t=[new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ht(e,t),e.prototype.match=function(t){return t==wt||t>=dt&&t<=gt||t>=yt&&t<=mt||t>=vt&&t<=bt},e.prototype.reString=function(t){return t?"\\W":"\\w"},e}(St)),new Ct,new Et];!function(t){t[t.gc=0]="gc",t[t.General_Category=0]="General_Category",t[t.sc=1]="sc",t[t.Script=1]="Script",t[t.scx=2]="scx",t[t.Script_Extension=2]="Script_Extension",t[t.Any=3]="Any",t[t.ASCII=4]="ASCII",t[t.AHex=5]="AHex",t[t.ASCII_Hex_Digit=5]="ASCII_Hex_Digit",t[t.Alpha=6]="Alpha",t[t.Alphabetic=6]="Alphabetic",t[t.Bidi_M=7]="Bidi_M",t[t.Bidi_Mirrored=7]="Bidi_Mirrored",t[t.Bidi_C=8]="Bidi_C",t[t.Bidi_Control=8]="Bidi_Control",t[t.CI=9]="CI",t[t.Case_Ignorable=9]="Case_Ignorable",t[t.Cased=10]="Cased",t[t.CWCF=11]="CWCF",t[t.Changes_When_Casefolded=11]="Changes_When_Casefolded",t[t.CWCM=12]="CWCM",t[t.Changes_When_Casemapped=12]="Changes_When_Casemapped",t[t.CWL=13]="CWL",t[t.Changes_When_Lowercased=13]="Changes_When_Lowercased",t[t.CWKCF=14]="CWKCF",t[t.Changes_When_NFKC_Casefolded=14]="Changes_When_NFKC_Casefolded",t[t.CWT=15]="CWT",t[t.Changes_When_Titlecased=15]="Changes_When_Titlecased",t[t.CWU=16]="CWU",t[t.Changes_When_Uppercased=16]="Changes_When_Uppercased",t[t.Dash=17]="Dash",t[t.DI=18]="DI",t[t.Default_Ignorable_Code_Point=18]="Default_Ignorable_Code_Point",t[t.Dep=19]="Dep",t[t.Deprecated=19]="Deprecated",t[t.Dia=20]="Dia",t[t.Diacritic=20]="Diacritic",t[t.Emoji=21]="Emoji",t[t.Emoji_Component=22]="Emoji_Component",t[t.Emoji_Modifier=23]="Emoji_Modifier",t[t.Emoji_Modifier_Base=24]="Emoji_Modifier_Base",t[t.Emoji_Presentation=25]="Emoji_Presentation",t[t.Ext=26]="Ext",t[t.Extender=26]="Extender",t[t.Gr_Base=27]="Gr_Base",t[t.Grapheme_Base=27]="Grapheme_Base",t[t.Gr_Ext=28]="Gr_Ext",t[t.Grapheme_Extend=28]="Grapheme_Extend",t[t.Hex=29]="Hex",t[t.Hex_Digit=29]="Hex_Digit",t[t.IDSB=30]="IDSB",t[t.IDS_Binary_Operator=30]="IDS_Binary_Operator",t[t.IDST=31]="IDST",t[t.IDS_Trinary_Operator=31]="IDS_Trinary_Operator",t[t.IDC=32]="IDC",t[t.ID_Continue=32]="ID_Continue",t[t.IDS=33]="IDS",t[t.ID_Start=33]="ID_Start",t[t.Ideo=34]="Ideo",t[t.Ideographic=34]="Ideographic",t[t.Join_C=35]="Join_C",t[t.Join_Control=35]="Join_Control",t[t.LOE=36]="LOE",t[t.Logical_Order_Exception=36]="Logical_Order_Exception",t[t.Lower=37]="Lower",t[t.Lowercase=37]="Lowercase",t[t.Math=38]="Math",t[t.NChar=39]="NChar",t[t.Noncharacter_Code_Point=39]="Noncharacter_Code_Point",t[t.Pat_Syn=40]="Pat_Syn",t[t.Pattern_Syntax=40]="Pattern_Syntax",t[t.Pat_WS=41]="Pat_WS",t[t.Pattern_White_Space=41]="Pattern_White_Space",t[t.QMark=42]="QMark",t[t.Quotation_Mark=42]="Quotation_Mark",t[t.Radical=43]="Radical",t[t.RI=44]="RI",t[t.Regional_Indicator=44]="Regional_Indicator",t[t.STerm=45]="STerm",t[t.Sentence_Terminal=45]="Sentence_Terminal",t[t.SD=46]="SD",t[t.Soft_Dotted=46]="Soft_Dotted",t[t.Term=47]="Term",t[t.Terminal_Punctuation=47]="Terminal_Punctuation",t[t.UIdeo=48]="UIdeo",t[t.Unified_Ideograph=48]="Unified_Ideograph",t[t.Upper=49]="Upper",t[t.Uppercase=49]="Uppercase",t[t.VS=50]="VS",t[t.Variation_Selector=50]="Variation_Selector",t[t.space=51]="space",t[t.White_Space=51]="White_Space",t[t.XIDC=52]="XIDC",t[t.XID_Continue=52]="XID_Continue",t[t.XIDS=53]="XIDS",t[t.XID_Start=53]="XID_Start"}(ft||(ft={})),function(t){t[t.LC=0]="LC",t[t.Cased_Letter=0]="Cased_Letter",t[t.Pe=1]="Pe",t[t.Close_Punctuation=1]="Close_Punctuation",t[t.Pc=2]="Pc",t[t.Connector_Punctuation=2]="Connector_Punctuation",t[t.Cc=3]="Cc",t[t.cntrl=3]="cntrl",t[t.Control=3]="Control",t[t.Sc=4]="Sc",t[t.Currency_Symbol=4]="Currency_Symbol",t[t.Pd=5]="Pd",t[t.Dash_Punctuation=5]="Dash_Punctuation",t[t.Nd=6]="Nd",t[t.digit=6]="digit",t[t.Decimal_Number=6]="Decimal_Number",t[t.Me=7]="Me",t[t.Enclosing_Mark=7]="Enclosing_Mark",t[t.Pf=8]="Pf",t[t.Final_Punctuation=8]="Final_Punctuation",t[t.Cf=9]="Cf",t[t.Format=9]="Format",t[t.Pi=10]="Pi",t[t.Initial_Punctuation=10]="Initial_Punctuation",t[t.L=11]="L",t[t.Letter=11]="Letter",t[t.Nl=12]="Nl",t[t.Letter_Number=12]="Letter_Number",t[t.Zl=13]="Zl",t[t.Line_Separator=13]="Line_Separator",t[t.Ll=14]="Ll",t[t.Lowercase_Letter=14]="Lowercase_Letter",t[t.M=15]="M",t[t.Combining_Mark=15]="Combining_Mark",t[t.Mark=16]="Mark",t[t.Sm=17]="Sm",t[t.Math_Symbol=17]="Math_Symbol",t[t.Lm=18]="Lm",t[t.Modifier_Letter=18]="Modifier_Letter",t[t.Sk=19]="Sk",t[t.Modifier_Symbol=19]="Modifier_Symbol",t[t.Mn=20]="Mn",t[t.Nonspacing_Mark=20]="Nonspacing_Mark",t[t.N=21]="N",t[t.Number=21]="Number",t[t.Ps=22]="Ps",t[t.Open_Punctuation=22]="Open_Punctuation",t[t.C=23]="C",t[t.Other=23]="Other",t[t.Lo=24]="Lo",t[t.Other_Letter=24]="Other_Letter",t[t.No=25]="No",t[t.Other_Number=25]="Other_Number",t[t.Po=26]="Po",t[t.Other_Punctuation=26]="Other_Punctuation",t[t.So=27]="So",t[t.Other_Symbol=27]="Other_Symbol",t[t.Zp=28]="Zp",t[t.Paragraph_Separator=28]="Paragraph_Separator",t[t.Co=29]="Co",t[t.Private_Use=29]="Private_Use",t[t.P=30]="P",t[t.punct=30]="punct",t[t.Punctuation=30]="Punctuation",t[t.Z=31]="Z",t[t.Separator=31]="Separator",t[t.Zs=32]="Zs",t[t.Space_Separator=32]="Space_Separator",t[t.Mc=33]="Mc",t[t.Spacing_Mark=33]="Spacing_Mark",t[t.Cs=34]="Cs",t[t.Surrogate=34]="Surrogate",t[t.S=35]="S",t[t.Symbol=35]="Symbol",t[t.Lt=36]="Lt",t[t.Titlecase_Letter=36]="Titlecase_Letter",t[t.Cn=37]="Cn",t[t.Unassigned=37]="Unassigned",t[t.Lu=38]="Lu",t[t.Uppercase_Letter=38]="Uppercase_Letter"}(pt||(pt={}));var xt,Ot=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),At=function(){return At=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},At.apply(this,arguments)},Tt=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Nt=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Rt=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};!function(t){t[t.START_OF_INPUT=0]="START_OF_INPUT",t[t.END_OF_INPUT=1]="END_OF_INPUT",t[t.START_OF_WORD=2]="START_OF_WORD",t[t.END_OF_WORD=3]="END_OF_WORD",t[t.UNION=4]="UNION",t[t.CAT=5]="CAT",t[t.VAR=6]="VAR",t[t.BACK_NAMED_REF=7]="BACK_NAMED_REF",t[t.BACK_NUM_REF=8]="BACK_NUM_REF",t[t.QUANT=9]="QUANT",t[t.LOOK_AHEAD=10]="LOOK_AHEAD",t[t.LOOK_BACK=11]="LOOK_BACK",t[t.CHAR=12]="CHAR"}(xt||(xt={}));var It,kt=function(){function t(){this.parent=null,this.reString=null,this.groupIndex=-1,this.groupName=null,this.groupIsSilent=!1,this.ignoreCase=null,this.dotAll=null,this.multiline=null}return t.prototype.setOptions=function(t){return"dotAll"in t&&(this.dotAll=t.dotAll),"ignoreCase"in t&&(this.ignoreCase=t.ignoreCase),"groupIndex"in t&&(this.groupIndex=t.groupIndex),"multiline"in t&&(this.multiline=t.multiline),this},t.prototype.debugValue=function(){var t={};return this.dotAll&&(t.dotAll=!0),this.ignoreCase&&(t.ignoreCase=!0),this.multiline&&(t.multiline=!0),this.groupIndex>=0&&(t.groupIndex=this.groupIndex),t},Object.defineProperty(t.prototype,"isVariable",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toString",{get:function(){return null==this.reString&&(this.reString=this.evalREString()),this.reString},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"modifiers",{get:function(){var t="";return this.dotAll&&(t+="d"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.groupIndex>=0&&(t+="g:"+this.groupIndex),0==t.length?t:"<"+t+">"},enumerable:!1,configurable:!0}),t}(),Lt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=xt.START_OF_INPUT,e}return Ot(e,t),e.prototype.debugValue=function(){return"^"},e.prototype.reverse=function(){return this},e.prototype.evalREString=function(){return"^"},e}(kt),Pt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=xt.END_OF_INPUT,e}return Ot(e,t),e.prototype.debugValue=function(){return"$"},e.prototype.evalREString=function(){return"$"},e.prototype.reverse=function(){return this},e}(kt),Bt=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=xt.START_OF_WORD,e}Ot(e,t),e.prototype.debugValue=function(){return"\\b"},e.prototype.reverse=function(){return this},e.prototype.evalREString=function(){return"\\b"}}(kt),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=xt.END_OF_WORD,e}Ot(e,t),e.prototype.debugValue=function(){return"\\b"},e.prototype.reverse=function(){return this},e.prototype.evalREString=function(){return"\\b"}}(kt),function(t){function e(e,r,n){void 0===n&&(n=!1);var i=t.call(this)||this;return i.expr=e,i.cond=r,i.negate=n,i}return Ot(e,t),e}(kt)),jt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=xt.LOOK_AHEAD,e}return Ot(e,t),e.prototype.evalREString=function(){return"".concat(this.expr.toString,"(?").concat(this.negate?"!":"=").concat(this.cond.toString,")")},e.prototype.debugValue=function(){return["LookAhead",At(At({},t.prototype.debugValue.call(this)),{negate:this.negate,expr:this.expr.debugValue(),cond:this.cond.debugValue()})]},e.prototype.reverse=function(){return new Mt(this.expr.reverse(),this.cond.reverse(),this.negate)},e}(Bt),Mt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=xt.LOOK_BACK,e}return Ot(e,t),e.prototype.evalREString=function(){return"(?<".concat(this.negate?"!":"=").concat(this.cond.toString,")").concat(this.expr.toString)},e.prototype.debugValue=function(){return["LookBack",At(At({},t.prototype.debugValue.call(this)),{negate:this.negate,expr:this.expr.debugValue(),cond:this.cond.debugValue()})]},e.prototype.reverse=function(){return new jt(this.expr.reverse(),this.cond.reverse(),this.negate)},e}(Bt),Dt=function(t){function e(e,r,n,i){void 0===r&&(r=1),void 0===n&&(n=1),void 0===i&&(i=!0);var o=t.call(this)||this;return o.expr=e,o.minCount=r,o.maxCount=n,o.greedy=i,o.tag=xt.QUANT,o}return Ot(e,t),Object.defineProperty(e.prototype,"isUnlimited",{get:function(){return this.maxCount<0||this.maxCount==o},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isVariable",{get:function(){return this.minCount!=this.maxCount||!this.expr.isVariable},enumerable:!1,configurable:!0}),e.prototype.reverse=function(){return new e(this.expr.reverse(),this.minCount,this.maxCount,this.greedy)},e.prototype.evalREString=function(){var t="*";return 1==this.minCount&&this.isUnlimited?t="+":0==this.minCount&&this.isUnlimited?t="*":0==this.minCount&&1==this.maxCount?t="?":1==this.minCount&&1==this.maxCount||(t=this.minCount==this.maxCount?"{".concat(this.minCount,"}"):"{".concat(this.minCount,",").concat(this.isUnlimited?"":this.maxCount,"}")),"".concat(this.expr.toString).concat(t)},e.prototype.debugValue=function(){var e="*";return 1==this.minCount&&this.isUnlimited?e=this.greedy?"+?":"+":0==this.minCount&&this.isUnlimited?e=this.greedy?"*?":"*":0==this.minCount&&1==this.maxCount?e=this.greedy?"??":"?":1==this.minCount&&1==this.maxCount||(e=this.minCount==this.maxCount?"{".concat(this.minCount,"}")+(this.greedy?"?":""):"{".concat(this.minCount,",").concat(this.maxCount,"}")+(this.greedy?"?":"")),[e,t.prototype.debugValue.call(this),this.expr.debugValue()]},e}(kt),Ut=function(t){function e(){for(var e,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=t.call(this)||this;o.tag=xt.CAT,o.children=[];try{for(var s=Tt(n),a=s.next();!a.done;a=s.next()){var u=a.value;o.add(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return o}return Ot(e,t),Object.defineProperty(e.prototype,"isVariable",{get:function(){var t,e;try{for(var r=Tt(this.children),n=r.next();!n.done;n=r.next())if(n.value.isVariable)return!0}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return!1},enumerable:!1,configurable:!0}),e.prototype.evalREString=function(){var t=this.children.map(function(t){return t.toString}).join("");return this.children.length>1?"("+t+")":t},e.prototype.reverse=function(){var t=this.children.map(function(t){return t.reverse()});return t.reverse(),new(e.bind.apply(e,Rt([void 0],Nt(t),!1)))},e.prototype.add=function(t){var e,r;if(t.tag!=xt.CAT||t.groupIndex>=0)this.children.push(t);else try{for(var n=Tt(t.children),i=n.next();!i.done;i=n.next()){var o=i.value;this.add(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},e.prototype.debugValue=function(){return["Cat",At({},t.prototype.debugValue.call(this)),this.children.map(function(t){return t.debugValue()})]},e}(kt),Ft=function(t){function e(){for(var e,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=t.call(this)||this;o.tag=xt.UNION,o.options=[];try{for(var s=Tt(n),a=s.next();!a.done;a=s.next()){var u=a.value;o.add(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return o}return Ot(e,t),Object.defineProperty(e.prototype,"isVariable",{get:function(){var t,e;try{for(var r=Tt(this.options),n=r.next();!n.done;n=r.next())if(n.value.isVariable)return!0}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return!1},enumerable:!1,configurable:!0}),e.prototype.evalREString=function(){var t=this.options.map(function(t){return t.toString}).join("|");return this.options.length>1?"("+t+")":t},e.prototype.reverse=function(){var t=this.options.map(function(t){return t.reverse()});return new(e.bind.apply(e,Rt([void 0],Nt(t),!1)))},e.prototype.add=function(t){var e,r;if(t.tag!=xt.UNION||t.groupIndex>=0)this.options.push(t);else try{for(var n=Tt(t.options),i=n.next();!i.done;i=n.next()){var o=i.value;this.add(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},e.prototype.debugValue=function(){return["Union",At({},t.prototype.debugValue.call(this)),this.options.map(function(t){return t.debugValue()})]},e}(kt);!function(t){t[t.AnyChar=1]="AnyChar",t[t.SingleChar=2]="SingleChar",t[t.CharRange=3]="CharRange",t[t.PropertyEscape=4]="PropertyEscape",t[t.CharClass=5]="CharClass",t[t.Union=6]="Union",t[t.Intersection=7]="Intersection"}(It||(It={}));var $t=function(t){function e(e,r){void 0===r&&(r=!1);var n=t.call(this)||this;return n.op=e,n.neg=r,n.tag=xt.CHAR,n}return Ot(e,t),e.prototype.match=function(t){var e=this.matchChar(t);return e&&!this.neg||this.neg&&!e},e.prototype.reverse=function(){return this},e.prototype.debugValue=function(){return this.toString+this.modifiers},e}(kt),Vt=function(t){function e(e,r,n){void 0===r&&(r=!1),void 0===n&&(n=[]);var i=t.call(this,e,r)||this;return i.op=e,i.neg=r,i.args=n,i}return Ot(e,t),e.Any=function(t){return void 0===t&&(t=!1),new e(It.AnyChar,t)},e.Class=function(t,r){return void 0===r&&(r=!1),new e(It.CharClass,r,[t])},e.Single=function(t,r){return void 0===r&&(r=!1),"string"==typeof t&&(t=t.charCodeAt(0)),new e(It.SingleChar,r,[t])},e.PropertyEscape=function(t,r,n){return void 0===n&&(n=!1),"string"==typeof t&&(t=function(t){if(!((t=t.trim())in ft))throw new SyntaxError("Invalid property name: "+t);return ft[t]}(t)),"string"==typeof r&&(r=function(t){if(!((t=t.trim())in pt))throw new SyntaxError("Invalid property value: "+t);return pt[t]}(r)),new e(It.PropertyEscape,n,[t,r])},e.prototype.matchChar=function(t){var e=this.args;switch(this.op){case It.SingleChar:return t==this.args[0];case It.CharClass:return _t[e[0]].matches(t,!1);case It.PropertyEscape:throw new Error("Property Escape Matching - TBD");default:throw new Error("Custom Chars - TBD i: "+this.op)}return!1},e.prototype.compareTo=function(t){if(this.op!=t.op)return this.op-t.op;for(var e=0;e<this.args.length&&e<t.args.length;e++)if(this.args[e]!=t.args[e])return this.args[e]-t.args[e];return this.args.length-t.args.length},e.prototype.evalREString=function(){return this.op==It.AnyChar?".":this.op==It.SingleChar?(t=this.args[0],String.fromCharCode(t).replace("\n","\\n").replace("\0","\\0").replace("\r","\\r").replace("\t","\\t").replace("\f","\\f").replace("\b","\\b")):this.op==It.CharClass?_t[this.args[0]].reString(this.neg):this.op==It.PropertyEscape?this.neg?"\\P{":"\\p{}":"Custom "+this.args.join(" ");var t},e}($t),zt=function(t){function e(e,r,n){void 0===r&&(r=!1),void 0===n&&(n=[]);var i=t.call(this,e,r)||this;return i.op=e,i.neg=r,i.chars=n,i}return Ot(e,t),e.prototype.compareTo=function(t){if(this.op!=t.op)return this.op-t.op;for(var e=0;e<this.chars.length&&e<t.chars.length;e++){var r=this.chars[e].compareTo(t.chars[e]);if(0!=r)return r}return this.chars.length-t.chars.length},e.prototype.matchChar=function(t){var e=this.chars;switch(this.op){case It.CharRange:return t>=e[0].args[0]&&t<=e[1].args[0];case It.Union:for(var r=0;r<e.length;r++)if(e[r].match(t))return!0;return!1;case It.Intersection:for(r=0;r<e.length;r++)if(!e[r].match(t))return!1;return!0;default:throw new Error("Custom CharGroup - TBD i: "+this.op)}return!1},e.prototype.evalREString=function(){var t=this.chars.map(function(t){return t.debugValue()}).join("");return this.op==It.CharRange?"".concat(this.chars[0].toString,"-").concat(this.chars[1].toString):this.op==It.Union||this.op==It.Intersection?t.length>1?(this.neg?"[^":"[")+t+"]":t:"Custom "+this.chars.join(" ")},e.Range=function(t,r,n){return void 0===n&&(n=!1),new e(It.CharRange,n,[t,r])},e.Union=function(t,r){return void 0===t&&(t=!1),new e(It.Union,t,r)},e.Intersection=function(t,r){return void 0===t&&(t=!1),new e(It.Intersection,t,r)},e}($t),Gt=function(t){function e(e,r){void 0===r&&(r=!1);var n=t.call(this)||this;return n.name=e,n.reversed=r,n.tag=xt.VAR,n}return Ot(e,t),e.prototype.reverse=function(){return new e(this.name,!this.reversed)},e.prototype.evalREString=function(){return"<"+this.name+">"},e.prototype.debugValue=function(){return["V:"+this.name,At({},t.prototype.debugValue.call(this))]},e}(kt),qt=function(t){function e(e,r){void 0===r&&(r=!1);var n=t.call(this)||this;return n.name=e,n.reversed=r,n.tag=xt.BACK_NAMED_REF,n}return Ot(e,t),e.prototype.reverse=function(){return new e(this.name,!this.reversed)},e.prototype.evalREString=function(){return"\\k<"+this.name+">"},e.prototype.debugValue=function(){return At(At({},t.prototype.debugValue),{BackRef:this.name})},e}(kt),Wt=function(t){function e(e,r){void 0===r&&(r=!1);var n=t.call(this)||this;return n.num=e,n.reversed=r,n.tag=xt.BACK_NUM_REF,n}return Ot(e,t),e.prototype.reverse=function(){return new e(this.num,!this.reversed)},e.prototype.evalREString=function(){return"\\"+this.num},e.prototype.debugValue=function(){return"\\"+this.num},e}(kt),Ht=function(){function t(t,e){this.expr=t,this.skip=!1,e=e||{},this.tag=e.tag||null,0==e.priority?this.priority=0:this.priority=e.priority||10,0==e.matchIndex?this.matchIndex=0:this.matchIndex=e.matchIndex||-1,this.skip=e.skip||!1,this.activeStates=e.activeStates||null}return t.prototype.stateCanActivate=function(t){return null==this.activeStates||0==this.activeStates.size||this.activeStates.has("*")||this.activeStates.has(t)},Object.defineProperty(t.prototype,"needsSpecificStates",{get:function(){return null!=this.activeStates&&this.activeStates.size>0&&!this.activeStates.has("*")},enumerable:!1,configurable:!0}),t}(),Kt=function(){return Kt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Kt.apply(this,arguments)},Jt=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Qt=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};function Yt(t){return"\r"==t||"\n"==t||"\u2028"==t||"\u2029"==t}var Xt,Zt=function(t,e,r,n){void 0===t&&(t=10),void 0===e&&(e=-1),void 0===r&&(r=-1),void 0===n&&(n=-1),this.priority=t,this.matchIndex=e,this.start=r,this.end=n,this.groups=[],this.positions=[]};!function(t){t[t.Any=0]="Any",t[t.AnyNonNL=1]="AnyNonNL",t[t.Char=2]="Char",t[t.CIChar=3]="CIChar",t[t.Match=4]="Match",t[t.Noop=5]="Noop",t[t.Save=6]="Save",t[t.Split=7]="Split",t[t.Jump=8]="Jump",t[t.Begin=9]="Begin",t[t.RBegin=10]="RBegin",t[t.End=11]="End",t[t.StartingChar=12]="StartingChar",t[t.EndingChar=13]="EndingChar",t[t.MLStartingChar=14]="MLStartingChar",t[t.MLEndingChar=15]="MLEndingChar",t[t.StartOfWord=16]="StartOfWord",t[t.EndOfWord=17]="EndOfWord",t[t.GroupStart=18]="GroupStart",t[t.GroupEnd=19]="GroupEnd",t[t.EnsureState=20]="EnsureState"}(Xt||(Xt={}));var te=function(){function t(t,e){void 0===t&&(t="INITIAL"),void 0===e&&(e=!0),this.startCondition=t,this.scIsInclusive=e,this.instrs=[],this.stateMapping=new Map,this.registerState("INITIAL"),this.registerState(t)}return Object.defineProperty(t.prototype,"length",{get:function(){return this.instrs.length},enumerable:!1,configurable:!0}),t.prototype.registerState=function(t){return this.stateMapping.has(t)||this.stateMapping.set(t,this.stateMapping.size),this.stateMapping.get(t)||-1},t.prototype.add=function(t,e){var r;void 0===e&&(e=null);for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o=(r=new ee(t,e)).add.apply(r,Qt([],Jt(n),!1));return o.offset=this.instrs.length,this.instrs.push(o),o},t.with=function(e){var r=new t;return e(r),r},t.prototype.debugValue=function(t){return void 0===t&&(t=ie),t?this.instrs.map(function(e,r){return e.comment.trim().length>0?"L".concat(r,": ").concat(t(e)," # ").concat(e.comment):"L".concat(r,": ").concat(t(e))}):this.instrs.map(function(t,e){return"L".concat(e,": ").concat(t.debugValue)})},t}(),ee=function(){function t(t,e){void 0===e&&(e=null),this.opcode=t,this.char=e,this.offset=0,this.comment="",this.args=[],this.char=e}return t.prototype.add=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(t=this.args).push.apply(t,Qt([],Jt(e),!1)),this},Object.defineProperty(t.prototype,"debugValue",{get:function(){var t=this.comment.trim();return t.length>0&&(t=" # "+t),"".concat(this.opcode," ").concat(this.args.join(" ")," ").concat(this.char||""," ").concat(t)},enumerable:!1,configurable:!0}),t}(),re=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.offset=t,this.gen=e,this.parentId=-1,this.id=0,this.priority=0,this.groups=[],this.positions=[],this.registers={}}return t.prototype.regIncr=function(t){if(!(t in this.registers))throw new Error("Register at offset ".concat(t," is invalid"));this.registers[t]++},t.prototype.regAcquire=function(t){if(t in this.registers)throw new Error("Register at offset ".concat(t," already acquired. Release it first"));this.registers[t]=0},t.prototype.regRelease=function(t){if(!(t in this.registers))throw new Error("Register at offset ".concat(t," is invalid"));delete this.registers[t]},t.prototype.regValue=function(t){if(!(t in this.registers))throw new Error("Register at offset ".concat(t," is invalid"));return this.registers[t]},t}(),ne=function(){function t(t,e,r,n,i){void 0===e&&(e=0),void 0===r&&(r=-1),void 0===n&&(n=!0),void 0===i&&(i={}),this.prog=t,this.start=e,this.end=r,this.forward=n,this.threadCounter=0,this.currThreads=[],this.nextThreads=[],this.startPos=0,this.currState=0,this.gen=0,this.genForOffset={},r<0&&(r=t.length-1),this.end=r}return t.prototype.savePosition=function(t,e,r){for(;t.positions.length<=e;)t.positions.push(-1);t.positions[e]=r},t.prototype.jumpBy=function(t,e){return void 0===e&&(e=1),this.jumpTo(t,t.offset+e)},t.prototype.jumpTo=function(t,e){var r=new re(e,this.gen);return r.id=t.id,r.parentId=t.parentId,r.priority=t.priority,r.positions=t.positions,r.groups=t.groups,r.registers=t.registers,r},t.prototype.forkTo=function(t,e){var r=new re(e,this.gen);return r.id=++this.threadCounter,r.parentId=t.id,r.priority=t.priority,r.positions=Qt([],Jt(t.positions),!1),r.groups=Qt([],Jt(t.groups),!1),r.registers=Kt({},t.registers),r},t.prototype.startGroup=function(t,e,r){var n=this.forkTo(t,t.offset+1);return n.groups.push([e,r]),n},t.prototype.endGroup=function(t,e,r){var n=this.forkTo(t,t.offset+1);return n.groups.push([-e,r]),n},t.prototype.addThread=function(t,e,r,n){var i,o;if(void 0===n&&(n=0),!(t.offset<this.start||t.offset>this.end||this.genForOffset[t.offset-this.start]==this.gen)){this.genForOffset[t.offset-this.start]=this.gen;var s,a,u,l=this.prog.instrs[t.offset],c=l.opcode;switch(c){case Xt.Jump:u=this.jumpTo(t,l.args[0]),this.addThread(u,e,r,n);break;case Xt.Split:for(var h=0;h<l.args.length;h++){var f=l.args[h],p=0==h?this.jumpTo(t,f):this.forkTo(t,f);this.addThread(p,e,r,n)}break;case Xt.Save:u=this.jumpTo(t,t.offset+1),this.savePosition(u,l.args[0],r.index+n),this.tracer&&this.tracer.threadQueued(t,r.index+n),this.addThread(u,e,r,n);break;case Xt.GroupStart:u=this.startGroup(t,l.args[0],r.index+n),this.tracer&&this.tracer.threadQueued(t,r.index+n),this.addThread(u,e,r,n);break;case Xt.GroupEnd:u=this.endGroup(t,l.args[0],r.index+n),this.tracer&&this.tracer.threadQueued(t,r.index+n),this.addThread(u,e,r,n);break;case Xt.StartingChar:case Xt.MLStartingChar:a=this.prevCh(r),(0==r.index||c==Xt.MLStartingChar&&Yt(a))&&this.addThread(this.jumpBy(t,1),e,r,n);break;case Xt.EndingChar:case Xt.MLEndingChar:(""==(s=this.nextCh(r))||c==Xt.MLEndingChar&&Yt(s))&&this.addThread(this.jumpBy(t,1),e,r,n);break;case Xt.StartOfWord:case Xt.EndOfWord:break;case Xt.RBegin:var d=Jt(l.args,3),g=d[0],y=d[1],m=d[2],v=2*(1+g),b=t.positions[v],w=Jt(this.recurseMatch(r,b-1,l.offset+1,m,!1,1==y),2),S=w[0];w[1],S&&this.addThread(this.jumpTo(t,m+1),e,r,n);break;case Xt.Begin:var E=Jt(l.args,3),C=E[0],_=E[1],x=E[2];if(1==C)this.tracer&&this.tracer.threadQueued(t,r.index),e.push(t);else{var O=Jt(this.recurseMatch(r,r.index+1,l.offset+1,x,!0,1==_),2);S=O[0],O[1],S&&this.addThread(this.jumpTo(t,x+1),e,r,n)}break;case Xt.EnsureState:var A=l.args;try{for(var T=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(A),N=T.next();!N.done;N=T.next()){var R=N.value;if(this.currState==R){this.addThread(this.jumpBy(t,1),e,r,n);break}}}catch(t){i={error:t}}finally{try{N&&!N.done&&(o=T.return)&&o.call(T)}finally{if(i)throw i.error}}break;default:this.tracer&&this.tracer.threadQueued(t,r.index),e.push(t)}}},t.prototype.matchCurrPos=function(t,e,r){return void 0===r&&(r=!1),r?e.match(t.currChCodeLower)||e.match(t.currChCodeUpper):e.match(t.currChCode)},t.prototype.hasMore=function(t){return this.forward?t.hasMore:t.index>=0},t.prototype.nextCh=function(t){var e=t.index+(this.forward?1:-1);return t.charAt(e)},t.prototype.prevCh=function(t){return t.charAt(t.index-(this.forward?1:-1))},t.prototype.match=function(t){if(this.end<this.start)return null;this.startMatching(t);for(var e=null;this.currThreads.length>0;)e=this.stepChar(t,e);return null!=e&&(t.index=e.end),e},t.prototype.recurseMatch=function(e,r,n,i,o,s){void 0===o&&(o=!0),void 0===s&&(s=!1);var a=e.index;if(!e.canAdvance(o?1:-1))return[s,-1];e.index=r;var u=new t(this.prog,n,i,o).match(e),l=e.index;return e.index=a,[null!=u&&!s||null==u&&s,l]},t.prototype.startMatching=function(t){this.currThreads=[],this.nextThreads=[],this.gen++,this.addThread(new re(this.start,this.gen),this.currThreads,t),this.startPos=t.index},t.prototype.stepChar=function(t,e){void 0===e&&(e=null),this.gen++;for(var r=0;r<this.currThreads.length;r++){var n=this.currThreads[r],i=this.stepThread(t,n);if(null!=i&&(null==e||i.priority>e.priority||i.priority==e.priority&&i.end>e.end)){e=i;break}}return this.hasMore(t)&&t.advance(this.forward?1:-1),this.currThreads=this.nextThreads,this.nextThreads=[],e},t.prototype.stepThread=function(t,e){this.tracer&&this.tracer.threadStepped(e,t.index,this.gen);var r=null,n=this.prog.instrs[e.offset],o=n.opcode,s=(n.args,this.forward?1:-1),a=!1;switch(o){case Xt.RBegin:throw new Error("Invalid state. Reverse matches must be handled in addThread");case Xt.Begin:var u=Jt(n.args,3),l=u[0],c=u[1],h=u[2];i(1==l,"Plain lookahead cannot be here");var f=Jt(this.recurseMatch(t,t.index,n.offset+1,h,!0,1==c),2),p=f[0];f[1],p&&this.addThread(this.jumpTo(e,h+1),this.nextThreads,t);break;case Xt.End:var d=new Zt(-1,-1,this.startPos,t.index);return d.groups=e.groups,d.positions=e.positions,d;case Xt.Match:if(t.index>this.startPos){var g=n.args[0],y=n.args[1];(r=new Zt).start=this.startPos,r.end=t.index,r.priority=g,r.matchIndex=y,r.groups=e.groups,r.positions=e.positions}break;case Xt.Char:case Xt.CIChar:this.hasMore(t)&&(a=this.matchCurrPos(t,n.char,o==Xt.CIChar));break;case Xt.AnyNonNL:case Xt.Any:this.hasMore(t)&&(a=o==Xt.Any||!Yt(t.currCh))}return a&&this.addThread(this.jumpBy(e,1),this.nextThreads,t,s),r},t}();function ie(t){switch(t.opcode){case Xt.Match:return"Match ".concat(t.args[0]," ").concat(t.args[1]);case Xt.Char:case Xt.CIChar:return"".concat(Xt[t.opcode].toString()," ")+"".concat(t.char.debugValue());case Xt.Any:return".";case Xt.AnyNonNL:return"NL.";case Xt.StartingChar:return"^";case Xt.MLStartingChar:return"NL^";case Xt.EndingChar:return"$NL";case Xt.MLEndingChar:return"$NL_MultiLine";case Xt.Save:return"Save ".concat(t.args[0]);case Xt.GroupStart:return"GroupStart ".concat(t.args[0]);case Xt.GroupEnd:return"GroupEnd ".concat(t.args[0]);case Xt.Split:return"Split ".concat(t.args.join(", "));case Xt.Jump:return"Jump ".concat(t.args[0]);case Xt.Begin:return"Begin ".concat(t.args.join(" "));case Xt.RBegin:return"RBegin ".concat(t.args.join(" "));case Xt.End:return"End ".concat(t.args.join(" "));case Xt.EnsureState:return"EnsureState ".concat(t.args.join(" "));default:throw new Error("Invalid Opcode: "+t.opcode)}}var oe=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},se=function(){function t(t,e){void 0===e&&(e=null),this.regexResolver=t,this.listener=e,this.emitGroups=!1,this.emitPosition=!0}return t.prototype.compile=function(t){var e=this,r=new te,n=t.length<=1?new ee(Xt.Split):r.add(Xt.Split,null);return t.forEach(function(t,i){n.add(r.instrs.length);var o=null!=t.expr.ignoreCase&&t.expr.ignoreCase,s=null==t.expr.dotAll||t.expr.dotAll,a=null==t.expr.multiline||t.expr.multiline;if(t.needsSpecificStates&&null!=t.activeStates){var u=r.add(Xt.EnsureState,null);t.activeStates.forEach(function(t){var e=r.registerState(t);u.add(e)})}e.compileExpr(t.expr,r,o,s,a),r.add(Xt.Match,null).add(t.priority,t.matchIndex>=0?t.matchIndex:i)}),r},t.prototype.compileExpr=function(t,e,r,n,i){var o=e.length,s=e.length;if(t.groupIndex>=0&&(this.emitPosition&&e.add(Xt.Save).add(2*(1+t.groupIndex)),this.emitGroups&&e.add(Xt.GroupStart).add(1+t.groupIndex)),t.tag==xt.CHAR)this.compileChar(t,e,r,n,i);else if(t.tag==xt.START_OF_INPUT){var a=null==t.multiline?i:t.multiline;e.add(a?Xt.MLStartingChar:Xt.StartingChar)}else if(t.tag==xt.END_OF_INPUT)a=null==t.multiline?i:t.multiline,e.add(a?Xt.MLEndingChar:Xt.EndingChar);else if(t.tag==xt.START_OF_WORD)e.add(Xt.StartOfWord);else if(t.tag==xt.END_OF_WORD)e.add(Xt.EndOfWord);else if(t.tag==xt.CAT)this.compileCat(t,e,r,n,i);else if(t.tag==xt.UNION)this.compileUnion(t,e,r,n,i);else if(t.tag==xt.QUANT)this.compileQuant(t,e,r,n,i);else if(t.tag==xt.VAR)this.compileVar(t,e,r,n,i);else if(t.tag==xt.BACK_NAMED_REF)this.compileBackNamedRef(t,e,r,n,i);else if(t.tag==xt.BACK_NUM_REF)this.compileBackNumRef(t,e,r,n,i);else if(t.tag==xt.LOOK_AHEAD)this.compileLookAhead(t,e,r,n,i);else{if(t.tag!=xt.LOOK_BACK)throw new Error("Regex Type not yet supported: "+t.tag);this.compileLookBack(t,e,r,n,i)}return t.groupIndex>=0&&(this.emitGroups&&e.add(Xt.GroupEnd).add(1+t.groupIndex),this.emitPosition&&e.add(Xt.Save).add(2*(1+t.groupIndex)+1)),this.listener&&e.length>s&&this.listener(t,e,s,e.length-s),e.length-o},t.prototype.compileChar=function(t,e,r,n,i){t.op==It.AnyChar?e.add(n?Xt.Any:Xt.AnyNonNL):e.add(r?Xt.CIChar:Xt.Char).char=t},t.prototype.compileCat=function(t,e,r,n,i){var o,s;try{for(var a=oe(t.children),u=a.next();!u.done;u=a.next()){var l=u.value;this.compileExpr(l,e,r,n,i)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(o)throw o.error}}},t.prototype.compileBackNumRef=function(t,e,r,n,i){throw new Error("BackNumRef Not Implemented")},t.prototype.compileBackNamedRef=function(t,e,r,n,i){throw new Error("BackNameRef Not Implemented")},t.prototype.compileVar=function(t,e,r,n,i){var o=t.name.trim(),s=this.regexResolver?this.regexResolver(o):null;if(null==s)throw new Error("Cannot find expression: ".concat(o));this.compileExpr(s,e,r,n,i)},t.prototype.compileUnion=function(t,e,r,n,i){for(var o,s,a=e.add(Xt.Split),u=[],l=0;l<t.options.length;l++)a.add(e.length),this.compileExpr(t.options[l],e,r,n,i),l<t.options.length-1&&u.push(e.add(Xt.Jump));try{for(var c=oe(u),h=c.next();!h.done;h=c.next())h.value.add(e.length)}catch(t){o={error:t}}finally{try{h&&!h.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}},t.prototype.compileQuant=function(t,e,r,n,i){if(0==t.minCount&&t.maxCount==o)this.compileAtleast0(t.expr,e,t.greedy,r,n,i);else if(1==t.minCount&&t.maxCount==o)this.compileAtleast1(t.expr,e,t.greedy,r,n,i);else if(0==t.minCount&&1==t.maxCount)this.compileOptional(t.expr,e,t.greedy,r,n,i);else{for(var s=0;s<t.minCount;s++)this.compileExpr(t.expr,e,r,n,i);if(t.isUnlimited)this.compileAtleast0(t.expr,e,t.greedy,r,n,i);else for(s=t.minCount;s<t.maxCount;s++)this.compileOptional(t.expr,e,t.greedy,r,n,i)}},t.prototype.compileAtleast1=function(t,e,r,n,i,o){void 0===r&&(r=!0);var s=e.length;this.compileExpr(t,e,n,i,o);var a=e.add(Xt.Split),u=e.length;r?a.add(s,u):a.add(u,s)},t.prototype.compileAtleast0=function(t,e,r,n,i,o){var s=e.add(Xt.Split),a=s.offset,u=e.length;this.compileExpr(t,e,n,i,o),e.add(Xt.Jump).add(a);var l=e.length;r?s.add(u,l):s.add(l,u)},t.prototype.compileOptional=function(t,e,r,n,i,o){var s=e.add(Xt.Split),a=e.length;this.compileExpr(t,e,n,i,o);var u=e.length;r?s.add(a,u):s.add(u,a)},t.prototype.compileLookAhead=function(t,e,r,n,i){this.compileExpr(t.expr,e,r,n,i);var o=e.add(Xt.Begin).add(0,t.negate?1:0);this.compileExpr(t.cond,e,r,n,i);var s=e.add(Xt.End).add(o.offset);o.add(s.offset)},t.prototype.compileLookBack=function(t,e,r,n,o){this.compileExpr(t.expr,e,r,n,o),i(t.expr.groupIndex>=0,"LookBack Assertion requires expression to have a group Index");var s=e.add(Xt.RBegin).add(t.expr.groupIndex,t.negate?1:0);this.compileExpr(t.cond.reverse(),e,r,n,o);var a=e.add(Xt.End).add(s.offset);s.add(a.offset)},t}(),ae=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ue=function(t){function e(e,r,n,i,o){void 0===o&&(o=null);var s=this.constructor,a=t.call(this,e)||this;return a.offset=r,a.length=n,a.type=i,a.value=o,a.name="TokenizerError",Object.setPrototypeOf(a,s.prototype),a}return ae(e,t),e}(Error),le=function(t){function e(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=t.call(this,"Found Token: ".concat((null==e?void 0:e.tag)||"EOF"," (").concat((null==e?void 0:e.value)||"","), Expected: ").concat(r.join(", ")))||this;return i.foundToken=e,i.name="UnexpectedTokenError",i.expectedTokens=r,i}return ae(e,t),e}(Error),ce=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),he=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},fe=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},pe=function(t){function e(e,r){void 0===r&&(r=!0);var n=t.call(this,r)||this;return n.forward=r,n._rawInput=e,n.input=fe([],he(e),!1),n}return ce(e,t),e.prototype.push=function(t){var e;this._rawInput+=t,(e=this.input).push.apply(e,fe([],he(t),!1))},e.prototype.substring=function(t,e){return this._rawInput.substring(t,e)},e.prototype.hasIndex=function(t){return t>=0&&t<this.input.length},e.prototype.charAt=function(t){return t<0||t>=this.input.length?"":this.input[t]},e}(function(){function t(t){void 0===t&&(t=!0),this.forward=t,this.index=0}return t.prototype.advance=function(t){void 0===t&&(t=1);var e=this.forward?this.index+t:this.index-t;return this.index=e,!0},t.prototype.canAdvance=function(t){void 0===t&&(t=1);var e=this.forward?this.index+t:this.index-t;return this.hasIndex(e)},Object.defineProperty(t.prototype,"hasMore",{get:function(){var t=this.forward?this.index:this.index-1;return this.hasIndex(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currCh",{get:function(){return this.charAt(this.index)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"prevCh",{get:function(){return this.charAt(this.index-(this.forward?1:-1))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextCh",{get:function(){var t=this.index+(this.forward?1:-1);return this.charAt(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currChCode",{get:function(){return this.hasMore?this.currCh.charCodeAt(0):-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currChCodeLower",{get:function(){return this.hasMore?this.currCh.toLowerCase().charCodeAt(0):-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currChCodeUpper",{get:function(){return this.hasMore?this.currCh.toUpperCase().charCodeAt(0):-1},enumerable:!1,configurable:!0}),t.prototype.charCodeAt=function(t){return this.hasIndex(t)?this.charAt(t).charCodeAt(0):-1},t.prototype.charCodeAtLower=function(t){return this.hasIndex(t)?this.charAt(t).toLowerCase().charCodeAt(0):-1},t.prototype.charCodeAtUpper=function(t){return this.hasIndex(t)?this.charAt(t).toUpperCase().charCodeAt(0):-1},t}()),de=function(){function t(){}return t.advanceAfter=function(e,r,n){void 0===n&&(n=!0);var i=t.advanceTo(e,r,n);return i>=0&&(i+=r.length,e.index=i),i},t.advanceTo=function(e,r,n){void 0===n&&(n=!0);for(var i=e.index;e.hasMore;){var o=e.index;if(t.matches(e,r)){var s=e.index;e.index=o;var a=0;if(n)for(var u=s-1;u>=0&&"\\"==e.charAt(u);u--)a++;if(a%2==0)return e.index}e.advance(1)}throw e.index=i,new Error("Unexpected end of input before (".concat(r,")"))},t.matches=function(t,e,r){void 0===r&&(r=!0);for(var n=t.index,i=0,o=!0;i<e.length;i++){if(e[i]!=t.currCh){o=!1;break}t.advance(1)}return r&&o||(t.index=n),o},t}(),ge=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ye=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},me=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},ve=function(){function t(e,r,n,i){this.tag=e,this.matchIndex=r,this.start=n,this.end=i,this.id=t.idCounter++,this.value=null,this.groups={},this.positions={}}return t.prototype.isOneOf=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var i=ge(r),o=i.next();!o.done;o=i.next()){var s=o.value;if(this.tag==s)return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return!1},t.idCounter=0,t}(),be=function(){function t(t,e){this.nextToken=t,this.tokenizerContext=e,this.buffer=[]}return t.prototype.next=function(t){var e=this.peek(t);return null!=e&&this.consume(),e},t.prototype.peek=function(t,e){for(void 0===e&&(e=0);this.buffer.length<=e;){var r=this.nextToken(t,this.tokenizerContext);if(null==r)return null;this.buffer.push(r)}return this.buffer[e]},t.prototype.match=function(t,e,r,n,i){void 0===r&&(r=!1),void 0===n&&(n=!0);var o=this.peek(t);if(null!=o){if(!e(o)){if(r)throw new le(o);return null}i&&null!=i&&i(o),n&&this.consume()}else if(r)throw new ue("Unexpected end of input",-1,0,"UnexpectedEndOfInput");return o},t.prototype.consume=function(){this.buffer.splice(0,1)},t.prototype.consumeIf=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.match(t,function(t){return t.isOneOf.apply(t,me([],ye(e),!1))})},t.prototype.expectToken=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.match(t,function(t){return t.isOneOf.apply(t,me([],ye(e),!1))},!0,!0)},t.prototype.ensureToken=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.match(t,function(t){return t.isOneOf.apply(t,me([],ye(e),!1))},!0,!1)},t.prototype.nextMatches=function(t){for(var e,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=this.peek(t);if(null==o)return null;try{for(var s=ge(n),a=s.next();!a.done;a=s.next()){var u=a.value;if(o.tag==u)return o}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return null},t}(),we=function(){function t(){this.value=-1}return t.prototype.next=function(){return++this.value},Object.defineProperty(t.prototype,"current",{get:function(){return this.value},enumerable:!1,configurable:!0}),t}();function Se(t){return" "==t||"\t"==t||"\n"==t||"\r"==t}var Ee=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Ce=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},_e=function(){function t(t,e){this.pattern=t,this.counter=new we,this.unicode=(null==e?void 0:e.unicode)||!1}return t.prototype.reduceLeft=function(t){var e=1==t.length?t[0]:new(Ut.bind.apply(Ut,Ce([void 0],Ee(t),!1)));return t.splice(0),e},t.prototype.throwError=function(t){throw new SyntaxError("Error in JS RE '".concat(this.pattern,"': ").concat(t))},t.prototype.parse=function(t,e){void 0===t&&(t=0),void 0===e&&(e=-1);var r=this.pattern,n=[];for(e<0&&(e=r.length-1);t<=e;){var i=r[t];if("."==i)n.push(Vt.Any()),t++;else if("\\"==i&&r[t+1]>="1"&&r[t+1]<="9"){t++;for(var o="";t<=e&&r[t]>="0"&&r[t]<="9";)o+=r[t++];var s=parseInt(o);s>this.counter.current+1&&this.throwError("Invalid reference: "+s),n.push(new Wt(s))}else if("\\"==i&&"k"==r[t+1]&&"<"==r[t+2]){for(var a=t+=3;a<=e&&">"!=r[a];)a++;a>e&&this.throwError("Expected '>' found EOI");var u=r.substring(t,a);""==u.trim()&&this.throwError("Expected name"),n.push(new qt(u)),t=a+1}else if("["==i){for(var l=t+1;l<=e&&"]"!=r[l];)"\\"==r[l]&&l++,l++;l>e&&this.throwError("Expected ']' found EOI"),n.push(this.parseCharGroup(t+1,l-1)),t=l+1}else if("^"==i)n.push(new Lt),t++;else if("$"==i)n.push(new Pt),t++;else if("|"==i){if(t+1<=e){var c=this.reduceLeft(n),h=this.parse(t+1,e);return new Ft(c,h)}t=e+1}else if("("==i)t=this.parseGroup(n,t,e);else if(")"==i||"]"==i||"}"==i)this.throwError("Unmatched ".concat(i,". Try using \\").concat(i));else if("*"==r[t]||"?"==r[t]||"+"==r[t]||"{"==r[t])t=this.parseQuant(n,t,e);else{var f=Ee(this.parseChar(t,e),2),p=f[0],d=f[1];n.push(p),t+=d}}return n.length,1==n.length?n[0]:new(Ut.bind.apply(Ut,Ce([void 0],Ee(n),!1)))},t.prototype.parseGroup=function(t,e,r){for(var n=e+1,i=0,o=this.pattern;n<=r&&(")"!=o[n]||i>0);)"("==o[n]?i++:")"==o[n]&&i--,"\\"==o[n]&&n++,n++;var s;if(n>r&&this.throwError("Expected ')' found EOI"),"?"==o[++e])if(":"==o[++e])t.push(this.parse(e+1,n-1));else if("<"==o[e]&&"!"!=o[e+1]&&"="!=o[e+1]){for(var a=this.counter.next(),u="",l=e+1;l<=r&&">"!=o[l];)u+=o[l],l++;(s=this.parse(l+1,n-1)).groupIndex=a,u.length>0&&(s.groupName=u)}else{var c=!0;"<"==o[e]&&(e++,c=!1);var h="!"==o[e++],f=this.parse(e,n-1);if(!c){var p=this.parse(n+1,r);return p.groupIndex<0&&(p.groupIndex=this.counter.next(),p.groupIsSilent=!0),t.push(new Mt(p,f,h)),r+1}t.length;var d=new jt(this.reduceLeft(t),f,h);t.push(d)}else a=this.counter.next(),h=!1,"^"==o[e]&&(h=!0,e++),(s=this.parse(e,n-1)).groupIndex>=0&&(s=new Ut(s)),s.groupIndex=a,t.push(s);return n+1},t.prototype.parseCharGroup=function(t,e){var r=[],n=t,i=!1,o=this.pattern;for("^"==o[n]&&(i=!0,n++);n<=e;){var s=Ee(this.parseChar(n,e),2),a=s[0];if((n+=s[1])<o.length&&"-"==o[n])if("]"==o[++n]||"["==o[n])r.push(a),r.push(Vt.Single("-"));else if(n<=e){var u=Ee(this.parseChar(n,e),2),l=u[0],c=u[1];a.op==It.SingleChar&&l.op==It.SingleChar||this.throwError("Char range cannot start or end in a char class"),l.args[0]<a.args[0]&&this.throwError("End cannot be less than start"),r.push(zt.Range(a,l)),n+=c}else this.throwError("Unterminated char class");else r.push(a)}return zt.Union(i,r)},t.prototype.parseChar=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),"\\"==this.pattern[t]?this.parseEscapeChar(t,e):this.parseSingleChar(t,e)},t.prototype.parseSingleChar=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var r=this.pattern.charCodeAt(t);return[Vt.Single(r),1]},t.prototype.parsePropertyEscape=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var r=this.pattern;r[t]+1!="{"&&this.throwError("Invalid property escape");for(var n=t+=2,i=-1;n<=e&&"}"!=r[n];)"="==r[n]&&(i=n),n++;n>e&&this.throwError("Invalid property escape");var o=r.substring(t,n),s="General_Category",a=o;if(i>=0){var u=o.split("=");2!=u.length&&this.throwError("Invalid property escape"),s=u[0].trim(),a=u[1].trim()}return[Vt.PropertyEscape(s,a),2+n+1-t]},t.prototype.parseEscapeChar=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var r=this.pattern;i("\\"==r[t],"Expected '\\'"),++t>e&&this.throwError("Encounted unexpected end of input after \\");var n=r[t];if(this.unicode&&"p"==n||"P"==n)return this.parsePropertyEscape(t,e);switch(n){case"w":return[Vt.Class(q.WORD_CHAR),2];case"W":return[Vt.Class(q.WORD_CHAR,!0),2];case"d":return[Vt.Class(q.DIGITS),2];case"D":return[Vt.Class(q.DIGITS,!0),2];case"s":return[Vt.Class(q.SPACES),2];case"S":return[Vt.Class(q.SPACES,!0),2];case"0":return r[t+1]>="0"&&r[t+1]<="9"&&this.unicode&&this.throwError("Invalid decimal escape"),[Vt.Single("\0"),2];case"r":return[Vt.Single("\r"),2];case"n":return[Vt.Single("\n"),2];case"f":return[Vt.Single("\f"),2];case"b":return[Vt.Single("\b"),2];case"v":return[Vt.Single("\v"),2];case"t":return[Vt.Single("\t"),2];case"c":(this.unicode||t>=e)&&this.throwError("Invalid char sequence at ".concat(t,", ").concat(e));var o=r.charCodeAt(t+1)%32;return[Vt.Single(o),3];case"x":++t>=e&&this.throwError("Invalid hex sequence at ".concat(t,", ").concat(e));var s=r.substring(t,t+2),a=parseInt(s,16);return i(!isNaN(a),"Invalid hex sequence: '".concat(s,"'")),[Vt.Single(a),4];case"u":++t>e-3&&this.throwError("Invalid unicode sequence at ".concat(t));var u=r.substring(t,t+4),l=parseInt(u,16);return isNaN(l)&&this.throwError("Invalid unicode sequence: '".concat(u,"'")),[Vt.Single(l),6];case"^":case"$":case".":case"*":case"+":case"?":case"\\":case"'":case'"':case"(":case")":case"[":case"]":case"{":case"}":case"|":case"/":return[Vt.Single(n),2];default:return this.unicode&&this.throwError("Invalid escape character: "+n),[Vt.Single(n),2]}},t.prototype.parseQuant=function(t,e,r){var n=this.pattern,i=n[e-1],s=1,a=1;if("*"==n[e])s=0,a=o;else if("+"==n[e])s=Math.min(s,1),a=o;else if("?"==n[e])s=0,a=Math.max(a,1);else{if("{"!=n[e])throw new Error("Here?");var u=n.indexOf("}",e+1);(u<=e||u>r)&&this.throwError("Unexpected end of input while looking for '}'");var l=n.substring(e+1,u).trim(),c=l.split(",").map(function(t){return parseInt(t.trim())});if(e=u,1==c.length){if(isNaN(c[0])){if(l.trim().length>0)return t.push(new Gt(l.trim())),e+1;this.throwError("Invalid quantifier: /".concat(l,"/"))}s=a=c[0]}else 2==c.length?(s=isNaN(c[0])?0:c[0])>(a=isNaN(c[1])?o:c[1])&&this.throwError("Invalid Quant /".concat(l,"/: Min must be <= Max")):c.length>2&&this.throwError('Invalid quantifier spec: "{'.concat(l,'}"'))}t.length<=0&&this.throwError("Quantifier cannot appear before an expression");var h=t[t.length-1];h.tag!=xt.QUANT||"*"!=i&&"?"!=i&&"+"!=i&&"}"!=i||this.throwError("Nothing to repeat"),!this.unicode||h.tag!=xt.LOOK_AHEAD&&h.tag!=xt.LOOK_BACK||this.throwError("Cannot have quantifier on assertion in unicode mode");var f=t[t.length-1]=new Dt(h);return f.minCount=s,f.maxCount=a,++e<=r&&"?"==n[e]&&f.greedy&&(e++,f.greedy=!1),e},t}(),xe=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Oe=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};function Ae(t,e){for(var r=t.index,n=0;n<e.length;n++){if(t.currCh!=e.charAt(n))return t.index=r,!1;t.advance(1)}return!0}var Te=function(){function t(){this.counter=new we}return t.prototype.parse=function(t,e,r){void 0===e&&(e=!1),void 0===r&&(r=0);for(var n=[];t.hasMore;){var o=t.currCh;if(Ae(t,"."))n.push(Vt.Any());else if(Ae(t,"^"))(s=new Lt).multiline=!0,n.push(s);else if(Ae(t,"$")){var s;(s=new Pt).multiline=!0,n.push(s)}else{if(Ae(t,"|")){var a=this.reduceLeft(n),u=this.parse(t,e,r);return new Ft(a,u)}if("["==o)n.push(this.parseCharGroup(t));else if("*"==o||"?"==o||"+"==o||"{"==o)this.parseQuant(t,n);else if(e&&Se(o))t.advance(1);else if(e&&Ae(t,"/*")){for(;"*"!=t.currCh||"/"!=t.nextCh;)t.hasMore||this.throwError(t,"Unterminated comment"),t.advance(1);t.advance(2)}else{if(Ae(t,"{-}"))throw new Error("Intersection Not yet supported");if(Ae(t,"{+}"))throw new Error("Union Not yet supported");if(Ae(t,"("))if(Ae(t,"?"))if(Ae(t,"#")){for(;t.hasMore&&")"!=t.currCh;)t.advance(1);i(Ae(t,")"),"Expected ')'")}else{for(var l=!1,c=!1,h=e,f=!1;t.hasMore&&":"!=t.currCh;)"i"==t.currCh?l=!f:"s"==t.currCh?c=!f:"x"==t.currCh?h=!f:"-"==t.currCh&&(f=!0),t.advance(1);i(Ae(t,":"),"Expected ':'");var p=this.counter.next();(d=this.parse(t,h,r+1)).groupIndex>=0&&(d=new Ut(d)),d.dotAll=c,d.ignoreCase=l,d.groupIndex=p,n.push(d),i(Ae(t,")"),"Expected ')'")}else{var d;p=this.counter.next(),(d=this.parse(t,e,r+1)).groupIndex>=0&&(d=new Ut(d)),d.groupIndex=p,n.push(d),i(Ae(t,")"),"Expected ')'")}else{if(")"==o){0==r&&this.throwError(t,"Unmatched ".concat(o,". Try using \\").concat(o));break}if("]"==o||"}"==o)this.throwError(t,"Unmatched ".concat(o,". Try using \\").concat(o));else{if(Ae(t,"/"))return a=this.reduceLeft(n),u=this.parse(t,e,r),new jt(a,u,!1);if(Ae(t,'"')){for(;'"'!=t.currCh;)t.hasMore||this.throwError(t,"Unterminated string"),n.push(this.parseChar(t));t.advance(1)}else n.push(this.parseChar(t))}}}}}return 1==n.length?n[0]:new(Ut.bind.apply(Ut,Oe([void 0],xe(n),!1)))},t.prototype.parseQuant=function(t,e){var r=1,n=1;if(Ae(t,"*"))r=0,n=o;else if(Ae(t,"+"))r=Math.min(r,1),n=o;else if(Ae(t,"?"))r=0,n=Math.max(n,1);else if(Ae(t,"{")){for(var i=!1,s="",a="";t.hasMore&&"}"!=t.currCh;)","==t.currCh?i=!0:i?a+=t.currCh:s+=t.currCh,t.advance(1);t.hasMore||this.throwError(t,"Invalid property escape"),s=s.trim(),a=a.trim(),t.advance(1);var u=parseInt(s),l=parseInt(a);if(i)(r=isNaN(u)?0:u)>(n=isNaN(l)?o:l)&&this.throwError(t,"Invalid Quant /".concat(s,",").concat(a,"/: Min must be <= Max"));else if(isNaN(u)){if(s.length>0)return void e.push(new Gt(s));this.throwError(t,"Invalid quantifier: /".concat(s,"/")),r=n=1}else r=n=u}else this.throwError(t,"Expected '{', '*', '?' or '+', Found: "+t.currCh);e.length<=0&&this.throwError(t,"Quantifier cannot appear before an expression");var c,h=e[e.length-1];h.tag==xt.QUANT&&h.groupIndex<0?((c=h).minCount=Math.min(r,c.minCount),c.maxCount=Math.max(n,c.maxCount)):((c=e[e.length-1]=new Dt(h)).minCount=r,c.maxCount=n),c.greedy&&Ae(t,"?")&&(c.greedy=!1)},t.prototype.parseCharGroup=function(t){var e=[];i(Ae(t,"["),"Expected '['");for(var r=Ae(t,"^");"]"!=t.currCh;){var n=this.parseChar(t);if(Ae(t,"-"))if(t.hasMore)if("]"==t.currCh||"["==t.currCh)e.push(n),e.push(Vt.Single("-"));else{var o=this.parseChar(t);n.op==It.SingleChar&&o.op==It.SingleChar||this.throwError(t,"Char range cannot start or end in a char class"),o.args[0]<n.args[0]&&this.throwError(t,"End cannot be less than start"),e.push(zt.Range(n,o))}else this.throwError(t,"Unterminated char class");else e.push(n)}return i(Ae(t,"]"),"']' expected"),zt.Union(r,e)},t.prototype.parseChar=function(t){return"\\"==t.currCh?this.parseEscapeChar(t):this.parseSingleChar(t)},t.prototype.parseSingleChar=function(t){var e=t.currCh;return t.advance(1),Vt.Single(e)},t.prototype.parsePropertyEscape=function(t){i(Ae(t,"\\{"),"Invalid property escape"),t.advance(2);for(var e=!1,r="",n="";t.hasMore&&"}"!=t.currCh;)"="==t.currCh?e=!0:e?n+=t.currCh:r+=t.currCh,t.advance(1);return t.hasMore||this.throwError(t,"Invalid property escape"),r=r.trim(),n=n.trim(),e||(n=r,r="General_Category"),t.advance(1),Vt.PropertyEscape(r,n)},t.prototype.parseEscapeChar=function(t){if(i(Ae(t,"\\"),"Expected '\\'"),t.hasMore||this.throwError(t,"Encounted unexpected end of input after \\"),Ae(t,"w"))return Vt.Class(q.WORD_CHAR);if(Ae(t,"W"))return Vt.Class(q.WORD_CHAR,!0);if(Ae(t,"d"))return Vt.Class(q.DIGITS);if(Ae(t,"D"))return Vt.Class(q.DIGITS,!0);if(Ae(t,"s"))return Vt.Class(q.SPACES);if(Ae(t,"S"))return Vt.Class(q.SPACES,!0);if(Ae(t,"0"))return Vt.Single("\0");if(Ae(t,"r"))return Vt.Single("\r");if(Ae(t,"n"))return Vt.Single("\n");if(Ae(t,"f"))return Vt.Single("\f");if(Ae(t,"b"))return Vt.Single("\b");if(Ae(t,"v"))return Vt.Single("\v");if(Ae(t,"t"))return Vt.Single("\t");if(Ae(t,"\\"))return Vt.Single("\\");if(Ae(t,"'"))return Vt.Single("'");if(Ae(t,'"'))return Vt.Single('"');if(Ae(t,"x")){t.hasMore||this.throwError(t,"Invalid hex sequence at ".concat(t.index));var e=t.currCh+t.nextCh,r=parseInt(e,16);return i(!isNaN(r),"Invalid hex sequence: '".concat(e,"'")),t.advance(2),Vt.Single(r)}if(Ae(t,"u")){t.canAdvance(3)||this.throwError(t,"Invalid unicode sequence at ".concat(t.index));var n=t.substring(t.index,t.index+4),o=parseInt(n,16);return isNaN(o)&&this.throwError(t,"Invalid unicode sequence: '".concat(n,"'")),t.advance(4),Vt.Single(o)}var s=t.currCh;return t.advance(1),Vt.Single(s)},t.prototype.reduceLeft=function(t){var e=1==t.length?t[0]:new(Ut.bind.apply(Ut,Oe([void 0],xe(t),!1)));return t.splice(0),e},t.prototype.throwError=function(t,e){throw new Error(e)},t}();function Ne(t,e){var r;return"string"==typeof t?((r=new Ht(Ie(t,e),e)).pattern=t,r):"RegExp"==t.constructor.name?((r=new Ht(Ie(t,e),e)).pattern=t.source,r):new Ht(t,e)}function Re(t){var e=new Te;try{var r=e.parse(new pe(t));return null==r.dotAll&&(r.dotAll=!1),null==r.multiline&&(r.multiline=!1),r}catch(e){throw console.log("Error in FLEX RE: ",t),e}}function Ie(t,e){e=e||{};var r="string"!=typeof t,n="string"==typeof t?t:t.source;r&&(e.unicode=t.unicode);var i=new _e(n,e).parse();return"string"!=typeof t&&(i.dotAll=t.dotAll,i.ignoreCase=t.ignoreCase,i.multiline=t.multiline),i}function ke(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return Re(String.raw.apply(String,function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}([t],function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}(e),!1)))}var Le,Pe,Be,je,Me,De,Ue=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fe=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},$e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.idCounter=0,e}return Ue(e,t),e.prototype.next=function(t,e){if(!t.hasMore)return null;var r=t.index,n=t.currCh,i=this.vm.match(t);if(null==i){var o=null;if(o=t.index==r+1?new ue("Unexpected Character: ".concat(n),r,1,"UnexpectedCharacter",n):new ue("Unexpected Symbol: ".concat(t.substring(r,t.index)),r,t.index-r,"UnexpectedLexeme"),this.onError&&(o=this.onError(o,t,r)),null!=o)throw o;return this.next(t,e)}var s=this.allRules[i.matchIndex],a=function(t,e,r){for(var n,i,o=new ve(t,e.matchIndex,e.start,e.end),s=0;s<e.positions.length;s+=2)e.positions[s]>=0&&(o.positions[Math.floor(s/2)]=[e.positions[s],e.positions[s+1]]);try{for(var a=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e.groups),u=a.next();!u.done;u=a.next()){var l=Fe(u.value,2),c=l[0],h=l[1],f=Math.abs(c);f in o.groups||(o.groups[f]=[]),o.groups[f].push(h)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return null!=r&&(o.value=r.substring(e.start,e.end)),o}(s.tag,i,t);a.id=this.idCounter++;var u=this.onMatchHandlers[i.matchIndex];if(u||(u=this.matchHandlersByValue[s.tag]),u){if(null==(a=u(s,t,a,e)))return this.next(t,e)}else if(s.skip)return this.next(t,e);return a},e.prototype.tokenize=function(t,e){void 0===e&&(e=null);var r=[];"string"==typeof t&&(t=new pe(t));for(var n=this.next(t,e);n;){r.push(n);try{n=this.next(t,e)}catch(t){r.push({tag:"ERROR",start:t.offset,end:t.offset+t.length,value:t.message});break}}return r},e}(function(){function t(){var t=this;this._prog=null,this._vm=null,this.onError=null,this.allRules=[],this.onMatchHandlers=[],this.matchHandlersByValue={},this.variables=new Map,this.compiler=new se(function(e){var r,n=t.variables.get(e)||null;if(null==n&&(n=(null===(r=t.findRuleByValue(e))||void 0===r?void 0:r.expr)||null),null==n)throw new Error("Invalid regex reference: ".concat(e));return n})}return t.prototype.getVar=function(t){return this.variables.get(t)||null},t.prototype.addVar=function(t,e){var r=this.variables.get(t)||null;return r=null==r?e:new Ft(r,e),this.variables.set(t,e),this},t.prototype.findRuleByValue=function(t){return this.allRules.find(function(e){return e.tag==t})||null},t.prototype.add=function(t,e,r){return void 0===r&&(r=null),"function"==typeof e&&(r=e,e=null),this.addRule(Ne(t,e),r)},t.prototype.addRule=function(t,e){return void 0===e&&(e=null),t.matchIndex=this.allRules.length,this.allRules.push(t),this.onMatchHandlers.push(e),this._prog=null,this._vm=null,this},t.prototype.on=function(t,e){return this.matchHandlersByValue[t]=e,this},Object.defineProperty(t.prototype,"prog",{get:function(){if(null==this._prog){var t=this.sortRules();this._prog=this.compiler.compile(t)}return this._prog},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vm",{get:function(){return null==this._vm&&(this._vm=new ne(this.prog)),this._vm},enumerable:!1,configurable:!0}),t.prototype.sortRules=function(){var t=this.allRules.map(function(t){return t});return t.sort(function(t,e){return t.priority!=e.priority?e.priority-t.priority:t.matchIndex-e.matchIndex}),t},t}()),Ve=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},ze=(function(){function t(t){this.peekedToken=null,this.literals=[],this.matchers=[],"string"==typeof t&&(t=new pe(t)),this.tape=t}t.prototype.addMatcher=function(t,e){return void 0===e&&(e=!1),this.matchers.push([t,e]),this},t.prototype.addLiteral=function(t,e){var r=this.literals.findIndex(function(e){return e[0]==t});if(r<0)return this.literals.push([t,e]),this.literals.length-1;if(this.literals[r][1]!=e)throw new Error("Literal '".concat(t,"' already registered as ").concat(e));return r},t.prototype.nextToken=function(){if(!this.tape.hasMore)return null;for(var t=this.tape.index,e=0;e<this.literals.length;e++){var r=Ve(this.literals[e],2),n=r[0],i=r[1];if(de.matches(this.tape,n)){var o=new ve(i,e,t,this.tape.index);return o.value=n,o}}for(e=0;e<this.matchers.length;e++){var s=Ve(this.matchers[e],2),a=s[0],u=s[1],l=a(this.tape,t);if(null!=l)return u?this.nextToken():(l.start=t,l.end=this.tape.index,l)}throw new ue("Invalid Character",this.tape.index,1,"InvalidCharacter",this.tape.currCh)}}(),function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}),Ge=ke(Le||(Le=ze(['["]([^"\\\n]|\\.|\\\n)*["]'],['["]([^"\\\\\\n]|\\\\.|\\\\\\n)*["]']))),qe=ke(Pe||(Pe=ze(["[']([^'\\\n]|\\.|\\\n)*[']"],["[']([^'\\\\\\n]|\\\\.|\\\\\\n)*[']"]))),We=(String.raw(Be||(Be=ze(["/([^\\/]|\\.)*/([imus]*)"],["/([^\\\\/]|\\\\.)*/([imus]*)"]))),String.raw(je||(je=ze(["/(.+?(?<!\\))/([imus]*)"],["/(.+?(?<!\\\\))/([imus]*)"])))),He=function(){return He=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},He.apply(this,arguments)},Ke=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},Je=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},Qe=function(t){return"number"==typeof t?""+t:t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")};!function(t){t.STRING="STRING",t.REGEX="REGEX",t.NUMBER="NUMBER",t.SPACES="SPACES",t.IDENT="IDENT",t.PCT_IDENT="PCT_IDENT",t.STAR="STAR",t.PLUS="PLUS",t.QMARK="QMARK",t.PIPE="PIPE",t.DOLLAR_NUM="DOLLAR_NUM",t.DOLLAR_IDENT="DOLLAR_IDENT",t.OPEN_PAREN="OPEN_PAREN",t.CLOSE_PAREN="CLOSE_PAREN",t.OPEN_BRACE="OPEN_BRACE",t.CLOSE_BRACE="CLOSE_BRACE",t.OPEN_SQ="OPEN_SQ",t.CLOSE_SQ="CLOSE_SQ",t.COMMENT="COMMENT",t.ARROW="ARROW",t.COLCOLHYPHEN="COLCOLHYPHEN",t.COLON="COLON",t.SEMI_COLON="SEMI_COLON"}(Me||(Me={})),function(t){t.GRAMMAR="GRAMMAR",t.DECL="DECL",t.RULE="RULE",t.PROD_NULL="PROD_NULL",t.PROD_STR="PROD_STR",t.PROD_UNION="PROD_UNION",t.PROD_NAME="PROD_NAME",t.PROD_STRING="PROD_STRING",t.PROD_NUM="PROD_NUM",t.PROD_IDENT="PROD_IDENT",t.PROD_STAR="PROD_STAR",t.PROD_PLUS="PROD_PLUS",t.PROD_OPTIONAL="PROD_OPTIONAL",t.IDENT="IDENT",t.ERROR="ERROR",t.COMMENT="COMMENT"}(De||(De={}));var Ye=function(){function t(t,e){this.leftRecursive=!1,this.generatedTokenizer=new $e,this.regexSyntax="js",e=e||{},this.symbolsByLabel={},this.grammar=e.grammar||new ct,this.leftRecursive=!("leftRecursive"in e)||e.leftRecursive||!1,this.newSymbolCallback=e.newSymbolCallback||null,this.tokenHandlers=e.tokenHandlers||{},this.parse(t)}return t.prototype.symbolForLabel=function(t){return this.symbolsByLabel[t]||null},t.prototype.registerSymbol=function(t,e){i(!(t in this.symbolsByLabel),"".concat(t," is already registered")),this.symbolsByLabel[t]=e},t.prototype.ensureSymbol=function(t,e){var r=this.symbolForLabel(t);return null!=r||(this.newSymbolCallback&&(r=this.newSymbolCallback(t,e)||null),null==r&&(r=e?this.grammar.newTerm(t):this.grammar.newNT(t)),this.registerSymbol(t,r)),r},t.prototype.parse=function(t){var e,r=this,n=((e=new $e).add(/->/,{tag:Me.ARROW}),e.add(/\[/,{tag:Me.OPEN_SQ}),e.add(/\]/,{tag:Me.CLOSE_SQ}),e.add(/\(/,{tag:Me.OPEN_PAREN}),e.add(/\)/,{tag:Me.CLOSE_PAREN}),e.add(/\{/,{tag:Me.OPEN_BRACE}),e.add(/\}/,{tag:Me.CLOSE_BRACE}),e.add(/\*/,{tag:Me.STAR}),e.add(/\+/,{tag:Me.PLUS}),e.add(/\?/,{tag:Me.QMARK}),e.add(/;/,{tag:Me.SEMI_COLON}),e.add(/:/,{tag:Me.COLON}),e.add(/\|/,{tag:Me.PIPE}),e.add(/\s+/m,{tag:Me.SPACES},function(){return null}),e.add(/\/\*.*?\*\//s,{tag:Me.COMMENT},function(){return null}),e.add(/\/\/.*$/m,{tag:Me.COMMENT},function(){return null}),e.add(qe,{tag:Me.STRING},function(t,e,r){return r.value=e.substring(r.start+1,r.end-1),r}),e.add(Ge,{tag:Me.STRING},function(t,e,r){return r.value=e.substring(r.start+1,r.end-1),r}),e.add(We,{tag:Me.REGEX},function(t,e,r){var n=e.substring(r.positions[1][0],r.positions[1][1]),i=e.substring(r.positions[3][0],r.positions[3][1]);return r.value=[n,i],r}),e.add(/\d+/,{tag:Me.NUMBER},function(t,e,r){return r.value=parseInt(e.substring(r.start,r.end)),r}),e.add(/%([\w][\w\d_]*)/,{tag:Me.PCT_IDENT},function(t,e,r){return r.value=e.substring(r.start+1,r.end),r}),e.add(/\$\d+/,{tag:Me.DOLLAR_NUM},function(t,e,r){return r.value=parseInt(e.substring(r.start+1,r.end)),r}),e.add(/\$([\w][\w\d_]*)/,{tag:Me.DOLLAR_IDENT},function(t,e,r){return r.value=e.substring(r.start+1,r.end),r}),e.add(/[\w][\w\d_]*/,{tag:Me.IDENT}),e);this.tokenizer=new be(function(t,e){return n.next(t,r)},this),this.parseGrammar(new pe(t))},t.prototype.parseRegex=function(t,e,r,n){if(void 0===r&&(r=0),void 0===n&&(n=""),""==n&&(n=this.regexSyntax),"js"==n){var i=this.tokenizer.expectToken(t,Me.STRING,Me.NUMBER,Me.REGEX),o=void 0;if(e&&0!=e.length||(e="/"+i.value[0]+"/"+i.value[1]),i.tag==Me.STRING||i.tag==Me.NUMBER)o=Ne(Qe(i.value),{tag:e,priority:r+20});else{if(i.tag!=Me.REGEX)throw new le(i);var s=i.value[0];i.value[1].length>0&&(s=new RegExp(i.value[0],i.value[1])),o=Ne(s,{tag:e,priority:r+10})}return o}for(var a="";t.hasMore&&"\n"!=t.currCh;)a+=t.currCh,t.advance();return a=a.trim(),e&&0!=e.length||(e="/"+a+"/"),new Ht(Re(a),{tag:e,priority:r})},t.prototype.parseGrammar=function(t){for(var e=this.tokenizer.peek(t);null!=e;){if(e.tag==Me.IDENT)this.parseDecl(t);else{if(e.tag!=Me.PCT_IDENT)throw new SyntaxError("Declaration must start with IDENT or PCT_IDENT. Found: '".concat(e.value,"' instead."));this.tokenizer.next(t),this.parseDirective(t,e.value)}e=this.tokenizer.peek(t)}},t.prototype.parseDirective=function(t,e){var r=this;if("start"==e){var n=this.tokenizer.expectToken(t,Me.IDENT);this.grammar.startSymbol=this.ensureSymbol(n.value,!1)}else if("resyntax"==e){if("js"!=(n=this.tokenizer.expectToken(t,Me.IDENT)).value&&"flex"!=n.value)throw new SyntaxError("Invalid regex syntax: "+n.value);this.regexSyntax=n.value}else if(e.startsWith("skip")){var i=this.parseRegex(t,"",30,e.endsWith("flex")?"flex":""),o=this.parseTokenHandler(t);o?this.generatedTokenizer.addRule(i,function(t,e,n){return o(t,e,n,r),null}):this.generatedTokenizer.addRule(i,function(){return null})}else{if(!e.startsWith("token")&&!e.startsWith("define"))throw new Error("Invalid directive: "+e);var s=e.startsWith("define"),a=this.tokenizer.expectToken(t,Me.IDENT,Me.STRING),u=a.value;if(a.tag!=Me.STRING&&a.tag!=Me.NUMBER||(u='"'.concat(a.value,'"')),i=this.parseRegex(t,u,0,e.endsWith("flex")?"flex":""),s)this.generatedTokenizer.addVar(u,i.expr);else{var l=this.parseTokenHandler(t);this.generatedTokenizer.addRule(i,l),this.ensureSymbol(u,!0)}}},t.prototype.parseTokenHandler=function(t){var e=this;if(!this.tokenizer.consumeIf(t,Me.OPEN_BRACE))return null;var r=this.tokenizer.expectToken(t,Me.IDENT);return this.tokenizer.expectToken(t,Me.CLOSE_BRACE),function(t,n,i,o){var s=e.tokenHandlers[r.value];if(!s)throw new Error("Handler method not found: "+r.value);return s(i,n,o)}},t.prototype.parseDecl=function(t){var e,r,n=this.tokenizer.expectToken(t,Me.IDENT);if(this.tokenizer.consumeIf(t,Me.ARROW,Me.COLON)){var i=this.ensureSymbol(n.value,!1);if(i.isTerminal)i.isTerminal=!1;else if(i.isAuxiliary)throw new Error("NT is already auxiliary and cannot be reused.");try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.parseProductions(t,this.grammar,i)),s=o.next();!s.done;s=o.next()){var a=Ke(s.value,2),u=a[0],l=a[1];this.grammar.add(i,u,l)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}this.tokenizer.expectToken(t,Me.SEMI_COLON)}},t.prototype.parseProductions=function(t,e,r){for(var n=[];null!=this.tokenizer.peek(t);){var i=this.parseProd(t,e);if(n.push(i),!this.tokenizer.consumeIf(t,Me.PIPE)&&this.tokenizer.nextMatches(t,Me.CLOSE_SQ,Me.CLOSE_PAREN,Me.SEMI_COLON))break}return n},t.prototype.parseProd=function(t,e){for(var r=new at;!this.tokenizer.nextMatches(t,Me.CLOSE_PAREN,Me.CLOSE_SQ,Me.SEMI_COLON,Me.PIPE,Me.OPEN_BRACE);){var n=null;if(this.tokenizer.consumeIf(t,Me.OPEN_PAREN))0==(i=this.parseProductions(t,e,null)).length||(n=1==i.length?i[0][0]:e.anyof.apply(e,Je([],Ke(i.map(function(t){return t[0]})),!1))),this.tokenizer.expectToken(t,Me.CLOSE_PAREN);else if(this.tokenizer.consumeIf(t,Me.OPEN_SQ)){var i;0==(i=this.parseProductions(t,e,null)).length||(n=1==i.length?e.opt(i[0][0]):e.opt(e.anyof.apply(e,Je([],Ke(i.map(function(t){return t[0]})),!1)))),this.tokenizer.expectToken(t,Me.CLOSE_SQ)}else{if(!this.tokenizer.nextMatches(t,Me.IDENT,Me.STRING,Me.NUMBER,Me.REGEX))throw new le(this.tokenizer.peek(t));var o=this.tokenizer.next(t),s=o.value;if(o.tag==Me.STRING||o.tag==Me.NUMBER){s='"'.concat(o.value,'"');var a=Ne(Qe(o.value),{tag:s,priority:20});this.generatedTokenizer.addRule(a)}else if(o.tag==Me.REGEX){s="/"+o.value[0]+"/"+o.value[1];var u=o.value[0];o.value[1].length>0&&(u=new RegExp(o.value[0],o.value[1])),a=Ne(u,{tag:s,priority:10}),this.generatedTokenizer.addRule(a)}var l=this.ensureSymbol(s,!0);n=new at(l)}if(null==n)throw new Error("Could not determine node");this.tokenizer.consumeIf(t,Me.STAR)?n=e.atleast0(n,this.leftRecursive):this.tokenizer.consumeIf(t,Me.PLUS)?n=e.atleast1(n,this.leftRecursive):this.tokenizer.consumeIf(t,Me.QMARK)&&(n=e.opt(n)),r.extend(n)}var c=null;if(this.tokenizer.consumeIf(t,Me.OPEN_BRACE)){var h=this.tokenizer.expectToken(t,Me.DOLLAR_NUM,Me.IDENT);c=new ut(h.value),this.tokenizer.expectToken(t,Me.CLOSE_BRACE)}return[r,c]},t}(),Xe=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ze=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},tr=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},er=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.parent=null,e}return Xe(e,t),e.prototype.add=function(e,r){return void 0===r&&(r=-1),t.prototype.add.call(this,e,r),e.parent=this,this},e.prototype.splice=function(e,r){for(var n,i,o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];try{for(var a=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(o),u=a.next();!u.done;u=a.next())u.value.parent=this}catch(t){n={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return t.prototype.splice.apply(this,tr([e,r],Ze(o),!1))},e}(function(){function t(t,e,r){for(var n=[],i=3;i<arguments.length;i++)n[i-3]=arguments[i];this.id=t,this.sym=e,this.value=r,this.children=[],this.children=n||[]}return Object.defineProperty(t.prototype,"childCount",{get:function(){return this.children.length},enumerable:!1,configurable:!0}),t.prototype.childAt=function(t){return t<0?this.children[this.children.length+t]:this.children[t]},Object.defineProperty(t.prototype,"isTerminal",{get:function(){return this.sym.isTerminal},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){if(void 0===e&&(e=-1),this.isTerminal)throw new Error("Cannot add children (".concat(t.sym.label,") to a terminal node: ").concat(this.sym.label));return e<0?this.children.push(t):this.children.splice(e,0,t),this},t.prototype.splice=function(t,e){for(var r,n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return(r=this.children).splice.apply(r,tr([t,e],Ze(n),!1)),this},Object.defineProperty(t.prototype,"reprString",{get:function(){return this.debugValue(!1).join("\n")},enumerable:!1,configurable:!0}),t.prototype.debugValue=function(t){if(void 0===t&&(t=!0),t){var e=[this.sym.label];return this.value&&e.push(this.value),this.children.length>0&&e.push(this.children.map(function(e){return e.debugValue(t)})),e}var r=[];return this.value,r.push(null==this.value?this.sym.label:this.sym.label+" - "+this.value),this.children.forEach(function(e){return e.debugValue(t).forEach(function(t){return r.push(" "+t)})}),r},t}()),rr=function(){function t(){}return t.prototype.setTokenizer=function(t){return this.tokenbuffer=new be(t,null),this},t.prototype.getSym=function(t){var e=this.grammar.getSym(t.tag);if(null==e)throw new Error("Invalid token tag: "+t.tag+", Value: "+t.value);return e},t}(),nr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xe(e,t),e.prototype.parse=function(t,e){return void 0===e&&(e=null),"string"==typeof t&&(t=new pe(t)),this.parseInput(t,e)},e}(rr);function ir(t,e,r){return void 0===r&&(r=!0),e.debugString}!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Xe(e,t),e.prototype.parse=function(t,e){return void 0===e&&(e=null),"string"==typeof t&&(t=new pe(t)),this.parseInput(t,e)}}(rr);var or,sr,ar=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ur=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},lr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},cr=(function(){function t(t){this.grammar=t,this.refresh()}t.prototype.refresh=function(){var t=this;return this.entries=new Map,this.grammar.followSets.refresh(),this.grammar.forEachRule(null,function(e,r){t.processRule(e,r)}),function(t,e){void 0===e&&(e=!0);var r="";t.forEachNT(function(n){e&&n.isAuxiliary||(r+=n.label+" -> ",r+=function(t,e,r){void 0===r&&(r=!0);for(var n="",i=" ",o=0;o<e.length;o++)o>0&&(r||(n+="\n",n+=i),n+=" | "),n+=ir(0,e[o].rhs,r);return r||(n+="\n",n+=i),n+" ;"}(0,t.rulesForNT(n),e)+"\n\n")})}(this.grammar,!1),this.grammar.cycles,this.grammar.leftRecursion,this},Object.defineProperty(t.prototype,"count",{get:function(){var t,e,r,n,i=0;try{for(var o=ur(this.entries.values()),s=o.next();!s.done;s=o.next()){var a=s.value;try{for(var u=(r=void 0,ur(a.values())),l=u.next();!l.done;l=u.next())i+=l.value.length}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return i},enumerable:!1,configurable:!0}),t.prototype.ensureEntry=function(t,e){i(!t.isTerminal&&e.isTerminal);var r=this.entries.get(t.id);r||(r=new Map,this.entries.set(t.id,r));var n=r.get(e.id);return n||(n=[],r.set(e.id,n)),n},t.prototype.add=function(t,e,r){var n=this.ensureEntry(t,e);return n.findIndex(function(t){return t.equals(r)})<0&&n.push(r),1==n.length},t.prototype.get=function(t,e){return this.ensureEntry(t,e)},t.prototype.forEachEntry=function(t){var e,r,n,o;try{for(var s=ur(this.entries.keys()),a=s.next();!a.done;a=s.next()){var u=a.value,l=this.entries.get(u)||null;i(null!=l);var c=this.grammar.getSymById(u);i(null!=c);try{for(var h=(n=void 0,ur(l.keys())),f=h.next();!f.done;f=h.next()){var p=f.value,d=this.grammar.getSymById(p);if(i(null!=d),0==t(c,d,l.get(p)||[]))return}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}},Object.defineProperty(t.prototype,"debugValue",{get:function(){var t={};return this.forEachEntry(function(e,r,n){var i,o;t[e.label]=t[e.label]||{},t[e.label][r.label]=t[e.label][r.label]||[];var s=t[e.label][r.label];try{for(var a=ur(n),u=a.next();!u.done;u=a.next()){var l=u.value;s.push(l.debugString)}}catch(t){i={error:t}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}),t},enumerable:!1,configurable:!0}),t.prototype.processRule=function(t,e){var r=this,n=this.grammar.firstSets,o=!1;n.forEachTermIn(t.rhs,0,function(e){null==e?o=!0:r.add(t.nt,e,t)}),o&&this.grammar.followSets.forEachTerm(t.nt,function(e){i(null!=e,"Follow sets cannot have null"),r.add(t.nt,e,t)})}}(),function(){function t(t){this.idCounter=0,this.parseTable=t,this.stack=[];var e=t.grammar;i(null!=e.startSymbol,"Start symbol not selected"),this.docNode=this.push(e.Eof,new er(this.idCounter++,new st(e,"<DOC>",!1),null)),this.rootNode=this.push(e.startSymbol),this.docNode.add(this.rootNode)}return Object.defineProperty(t.prototype,"debugString",{get:function(){return"Stack: ["+this.stack.map(function(t){return t[0].label}).join(", ")+"]"},enumerable:!1,configurable:!0}),t.prototype.push=function(t,e){return void 0===e&&(e=null),e||(e=new er(this.idCounter++,t,null)),this.stack.push([t,e]),e},t.prototype.top=function(){return this.stack[this.stack.length-1]},t.prototype.pop=function(){return 0==this.stack.length&&i(!1,"Stacks are empty"),this.stack.pop()},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0==this.stack.length},enumerable:!1,configurable:!0}),t}()),hr=(function(t){function e(e){var r=t.call(this)||this;return r.parseTable=e,i(null!=e.grammar.startSymbol,"Start symbol not selected"),r}ar(e,t),Object.defineProperty(e.prototype,"grammar",{get:function(){return this.parseTable.grammar},enumerable:!1,configurable:!0}),e.prototype.parseInput=function(t,e){var r,n;void 0===e&&(e=null),this.stack=new cr(this.parseTable);var o,s,a,u=this.tokenbuffer,l=this.stack,c=this.grammar;do{o=u.peek(t),s=(r=lr(l.top(),2))[0],a=r[1];var h=null==o?c.Eof:this.getSym(o),f=null==o?null:o.value;if(s.isTerminal)s==h?this.consumeTokenAndPop(t,h,o):this.processInvalidToken(h,o);else{var p=this.parseTable.get(s,h);if(1!=p.length)console.log("TopItem: ",s),console.log("nextSym: ",h),this.processInvalidReductions(a,s,h,f,p);else{var d=lr(this.stack.pop(),2),g=d[0],y=d[1];i(y==a),i(g==p[0].nt),i(y.sym==g),this.popSymAndPushRule(y,p[0])}}s=(n=lr(l.top(),2))[0],a=n[1]}while(s!=c.Eof);return l.rootNode},e.prototype.popSymAndPushRule=function(t,e){for(var r=e.rhs.syms.length-1;r>=0;r--){var n=e.rhs.syms[r],i=this.stack.push(n);t.add(i,0)}},e.prototype.consumeTokenAndPop=function(t,e,r){var n=lr(this.stack.top(),2),o=n[0],s=n[1];i(o==e),i(s.sym==e),s.value=r.value,this.tokenbuffer.next(t),this.stack.pop()},e.prototype.processInvalidToken=function(t,e){throw new Error("Invalid token: "+t.label)},e.prototype.processInvalidReductions=function(t,e,r,n,i){throw new Error("Invalid # reductions ".concat(i.length," found ").concat(e.label," -> ").concat(r.label))}}(nr),function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}()),fr=function(t){function e(e,r,n){void 0===n&&(n=null);var i=this.constructor,o=t.call(this,e)||this;return o.type=r,o.value=n,Object.setPrototypeOf(o,i.prototype),o}return hr(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return this.constructor.name},enumerable:!1,configurable:!0}),e}(Error),pr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),dr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},gr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yr=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};(sr=or||(or={}))[sr.ACCEPT=0]="ACCEPT",sr[sr.SHIFT=1]="SHIFT",sr[sr.REDUCE=2]="REDUCE",sr[sr.GOTO=3]="GOTO";var mr=function(){function t(){this.gotoState=null,this.rule=null}return t.prototype.toString=function(){return this.tag==or.ACCEPT?"Acc":this.tag==or.SHIFT?"S"+this.gotoState:this.tag==or.REDUCE?"R "+this.rule.id:""+this.gotoState},t.prototype.equals=function(t){return this.tag==t.tag&&this.gotoState==t.gotoState&&this.rule==t.rule},t.Shift=function(e){var r=new t;return r.tag=or.SHIFT,r.gotoState=e,r},t.Reduce=function(e){var r=new t;return r.tag=or.REDUCE,r.rule=e,r},t.Goto=function(e){var r=new t;return r.tag=or.GOTO,r.gotoState=e,r},t.Accept=function(){var e=new t;return e.tag=or.ACCEPT,e},t}(),vr=function(){function t(t){this.grammar=t,this.conflictActions={},this.actions={}}return Object.defineProperty(t.prototype,"hasConflicts",{get:function(){return Object.keys(this.conflictActions).length>0},enumerable:!1,configurable:!0}),t.prototype.getActions=function(t,e,r){var n;if(void 0===r&&(r=!1),t in this.actions)n=this.actions[t];else{if(!r)return[];n=this.actions[t]={}}return e.id in n?n[e.id]:r?n[e.id]=[]:[]},t.prototype.addAction=function(t,e,r){var n=this.getActions(t,e,!0);return n.findIndex(function(t){return t.equals(r)})<0&&n.push(r),n.length>1&&(this.conflictActions[t]=this.conflictActions[t]||{},this.conflictActions[t][e.label]=!0),this},Object.defineProperty(t.prototype,"debugValue",{get:function(){var t={};for(var e in this.actions)for(var r in t[e]={},this.actions[e]){var n=this.grammar.getSymById(r),i=this.actions[e][n.id]||[];i.length>0&&(t[e][n.label]=i.map(function(t){return t.toString()}))}return t},enumerable:!1,configurable:!0}),t}(),br=function(){function t(){this.stateStack=[],this.nodeStack=[]}return t.prototype.push=function(t,e){this.stateStack.push(t),this.nodeStack.push(e)},t.prototype.top=function(t){return void 0===t&&(t=0),[this.stateStack[this.stateStack.length-1-t],this.nodeStack[this.nodeStack.length-1-t]]},t.prototype.pop=function(){var t=this.top();return this.stateStack.pop(),this.nodeStack.pop(),t},t.prototype.popN=function(t){void 0===t&&(t=1);var e=this.stateStack.length;this.stateStack.splice(e-t,t),this.nodeStack.splice(e-t,t)},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0==this.stateStack.length||0==this.nodeStack.length},enumerable:!1,configurable:!0}),t}(),wr=function(t){function e(e,r){void 0===r&&(r={});var n=t.call(this)||this;return n.parseTable=e,n}return pr(e,t),Object.defineProperty(e.prototype,"grammar",{get:function(){return this.parseTable.grammar},enumerable:!1,configurable:!0}),e.prototype.parseInput=function(t,e){var r,n,o;e=e||{},this.tokenbuffer.tokenizerContext=e.tokenizerContext,0!=e.buildParseTree&&(e.buildParseTree=!0),0!=e.copySingleChild&&(e.copySingleChild=!0);var s=0,a=new br;a.push(0,new er(s++,this.grammar.augStartRule.nt,null));var u=this.tokenbuffer,l=this.grammar,c=null;function h(t){if(null==e?void 0:e.actionResolver)return e.actionResolver(t,a,u);if(t.length>1)throw new Error("Multiple actions found.");return t[0]}function f(){try{return u.peek(t)}catch(r){if(!(null==e?void 0:e.onTokenError)||!(null==e?void 0:e.onTokenError(r,t)))throw r;return f()}}for(;;){var p=f();if(null==p){if(a.isEmpty)break}else e.onNextToken&&(p=e.onNextToken(p));var d=null==p?l.Eof:this.getSym(p),g=null==p?null:p.value,y=dr(a.top(),2),m=y[0],v=(y[1],this.parseTable.getActions(m,d));if(null==v||0==v.length)throw new fr("Unexpected Token: '".concat(d.label,"'"),"UnexpectedToken",{state:m,token:p,nextSym:d});var b=h(v);if(b.tag==or.ACCEPT)break;if(b.tag==or.SHIFT){u.next(t);var w=new er(s++,d,g);a.push(b.gotoState,w)}else{i(null!=b.rule,"Nonterm and ruleindex must be provided for a reduction action");var S=b.rule.rhs.length;if(w=new er(s++,b.rule.nt,null),e.buildParseTree)for(var E=S-1;E>=0;E--){var C=a.top(E)[1];if(e.beforeAddingChildNode)try{for(var _=(r=void 0,gr(e.beforeAddingChildNode(w,C))),x=_.next();!x.done;x=_.next()){var O=x.value;w.add(O)}}catch(t){r={error:t}}finally{try{x&&!x.done&&(n=_.return)&&n.call(_)}finally{if(r)throw r.error}}else null!=C&&w.add(C)}if(b.rule.action)if(b.rule.action.isFunction){var A=b.rule.action.value,T=e.ruleHandlers[A];if(!T)throw new Error("Action handler not found: "+A);w.value=T.apply(void 0,yr([b.rule,w],dr(w.children),!1))}else w.value=w.children[b.rule.action.value-1].value;else e.onReduction?w=e.onReduction(w,b.rule):1==w.children.length&&e.copySingleChild&&(w.value=w.children[0].value);a.popN(S),m=(o=dr(a.top(),2))[0],o[1];var N=h(this.parseTable.getActions(m,b.rule.nt));i(null!=N&&null!=N.gotoState,"Top item does not have an action."),a.push(N.gotoState,w),c=w}}return c},e}(nr),Sr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Er=function(){return Er=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Er.apply(this,arguments)},Cr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},_r=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},xr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Or=function(){function t(t,e){void 0===e&&(e=0),this.id=0,this.rule=t,this.position=e}return t.prototype.advance=function(){return i(this.position<this.rule.rhs.length),new t(this.rule,this.position+1)},t.prototype.copy=function(){return new t(this.rule,this.position)},Object.defineProperty(t.prototype,"key",{get:function(){return i(!isNaN(this.rule.id),"Rule's ID is not yet set."),this.rule.id+":"+this.position},enumerable:!1,configurable:!0}),t.prototype.compareTo=function(t){var e=this.rule.id-t.rule.id;return 0==e&&(e=this.position-t.position),e},t.prototype.equals=function(t){return 0==this.compareTo(t)},Object.defineProperty(t.prototype,"debugString",{get:function(){var t=this.rule,e=this.position,r=t.rhs.syms.slice(0,e).join(" "),n=t.rhs.syms.slice(e).join(" ");return"".concat(t.id," - ").concat(t.nt," -> ").concat(r," • ").concat(n)},enumerable:!1,configurable:!0}),t}(),Ar=function(){function t(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.id=0,this._key=null,this._lookaheads={},this._hasLookAheads=!1,this.itemGraph=t,this.values=e}return t.prototype.copy=function(){var e=new(t.bind.apply(t,_r([void 0,this.itemGraph],Cr(this.values),!1)));return e._lookaheads=Er({},this._lookaheads),e._hasLookAheads=this._hasLookAheads,e},t.prototype.addLookAhead=function(t,e){var r,n;t.id in this._lookaheads||(this._lookaheads[t.id]=[]);try{for(var i=xr(this._lookaheads[t.id]),o=i.next();!o.done;o=i.next())if(o.value==e)return!1}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this._hasLookAheads=!0,this._key=null,this._lookaheads[t.id].push(e),this._lookaheads[t.id].sort(function(t,e){return t.id-e.id}),!0},t.prototype.clearLookAheads=function(){this._lookaheads={}},t.prototype.getLookAheads=function(t){return this._lookaheads[t.id]||[]},Object.defineProperty(t.prototype,"key",{get:function(){return null==this._key&&(this._key=this.revalKey()),this._key},enumerable:!1,configurable:!0}),t.prototype.revalKey=function(){var t=this;return this.hasLookAheads?(this.values.sort(),this.values.map(function(e){return e+"["+(t._lookaheads[e]||[]).map(function(t){return t.id}).join(",")+"]"}).join("/")):(this.values.sort(),this.values.join("/"))},t.prototype.has=function(t){return this.values.indexOf(t)>=0},t.prototype.equals=function(t){return this.key==t.key},t.prototype.add=function(t){return this.has(t)||(this.values.push(t),this._key=null),this},Object.defineProperty(t.prototype,"size",{get:function(){return this.values.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugString",{get:function(){return this.debugValue.join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasLookAheads",{get:function(){return this._hasLookAheads},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugValue",{get:function(){var t,e=this;return this.hasLookAheads?((t=this.values.map(function(t){return e.itemGraph.items.get(t)})).sort(function(t,e){return t.compareTo(e)}),t.map(function(t){var r=e.getLookAheads(t).map(function(t){return t.label}).sort(function(t,e){return t.localeCompare(e)}).join(", ");return r.length>0?"".concat(t.debugString," / ( ").concat(r," )"):t.debugString})):((t=this.values.map(function(t){return e.itemGraph.items.get(t)})).sort(function(t,e){return t.compareTo(e)}),t.map(function(t){return t.debugString}))},enumerable:!1,configurable:!0}),t}(),Tr=function(){function t(t){this.grammar=t,this.gotoSets={},this.items=new Y,this.itemSets=new Y}return t.prototype.startItem=function(){return i(null!=this.grammar.startSymbol,"Start symbol must be set"),i(null!=(this.grammar.augStartRule||null),"Grammar is not augmented"),this.items.ensure(new Or(this.grammar.augStartRule))},t.prototype.reset=function(){this.grammar.refresh(),this.gotoSets={},this.items.clear(),this.itemSets.clear(),this.startSet()},t.prototype.refresh=function(){return this.reset(),this.grammar.refresh(),this.evalGotoSets(),this},t.prototype.evalGotoSets=function(){for(var t,e,r=this.itemSets,n=0;n<r.size;n++){var i=r.get(n);try{for(var o=(t=void 0,xr(this.grammar.allSymbols)),s=o.next();!s.done;s=o.next()){var a=s.value;if(a!=this.grammar.Null){var u=this.goto(i,a);u.size>0&&this.setGoto(i,a,u)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}}},t.prototype.goto=function(t,e){var r,n,i=this.newItemSet();try{for(var o=xr(t.values),s=o.next();!s.done;s=o.next()){var a=s.value,u=this.items.get(a),l=u.rule;u.position<l.rhs.length&&l.rhs.syms[u.position]==e&&this.advanceItemAndAdd(u,t,i)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this.closure(i)},t.prototype.advanceItemAndAdd=function(t,e,r){var n,i,o=this.items.ensure(t.advance());r.add(o.id);try{for(var s=xr(e.getLookAheads(t)),a=s.next();!a.done;a=s.next()){var u=a.value;r.addLookAhead(o,u)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}},t.prototype.newItemSet=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new(Ar.bind.apply(Ar,_r([void 0,this],Cr(t.map(function(t){return t.id})),!1)))},Object.defineProperty(t.prototype,"size",{get:function(){return this.itemSets.size},enumerable:!1,configurable:!0}),t.prototype.ensureGotoSet=function(t){return t.id in this.gotoSets||(this.gotoSets[t.id]={}),this.gotoSets[t.id]},t.prototype.setGoto=function(t,e,r){this.ensureGotoSet(t)[e.id]=r},t.prototype.getGoto=function(t,e){return(this.gotoSets[t.id]||{})[e.id]||null},t.prototype.forEachGoto=function(t,e){var r=this.gotoSets[t.id]||{};for(var n in r)if(0==e(this.grammar.getSymById(n),r[n]))break},t.prototype.gotoSetFor=function(t){return this.gotoSets[t.id]||{}},Object.defineProperty(t.prototype,"debugValue",{get:function(){var t=this,e={};return this.itemSets.entries.forEach(function(r){e[r.id]={items:[],goto:{}},e[r.id].items=r.debugValue;var n=t.gotoSets[r.id];for(var i in n){var o=t.grammar.getSymById(i);e[r.id].goto=e[r.id].goto||{},e[r.id].goto[o.label]=n[i].id}}),e},enumerable:!1,configurable:!0}),t}(),Nr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.startSet=function(){var t=this.startItem(),e=this.newItemSet(t);return this.closure(e)},e.prototype.closure=function(t){for(var e,r,n=new(Ar.bind.apply(Ar,_r([void 0,this],Cr(t.values),!1))),i=0;i<n.values.length;i++){var o=n.values[i],s=this.items.get(o),a=s.rule;if(s.position<a.rhs.length){var u=a.rhs.syms[s.position];if(!u.isTerminal)try{for(var l=(e=void 0,xr(this.grammar.rulesForNT(u))),c=l.next();!c.done;c=l.next()){var h=c.value,f=this.items.ensure(new Or(h,0));n.add(f.id)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}}}return 0==n.size?n:this.itemSets.ensure(n)},e}(Tr),Rr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.startSet=function(){var t=this.startItem(),e=this.newItemSet(t);return e.addLookAhead(t,this.grammar.Eof),this.closure(e)},e.prototype.closure=function(t){for(var e=this,r=t.copy(),n=function(t){var n,o,s=r.values[t],a=i.items.get(s);if(a.position>=a.rule.rhs.length)return"continue";var u=a.rule.rhs,l=u.syms[a.position];if(l.isTerminal)return"continue";try{for(var c=(n=void 0,xr(r.getLookAheads(a))),h=c.next();!h.done;h=c.next()){var f=h.value,p=u.copy().append(f);i.grammar.firstSets.forEachTermIn(p,a.position+1,function(t){var n,i;if(null!=t){var o=e.grammar.rulesForNT(l);try{for(var s=(n=void 0,xr(o)),a=s.next();!a.done;a=s.next()){var u=a.value,c=e.items.ensure(new Or(u,0));r.add(c.id),r.addLookAhead(c,t)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}}})}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}},i=this,o=0;o<r.values.length;o++)n(o);return 0==r.size?r:this.itemSets.ensure(r)},e}(Tr),Ir=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};function Lr(t,e){switch(void 0===e&&(e="lr1"),e){case"lr1":return[jr(n=new Rr(r=t).refresh(),r),n];case"lalr":return function(t){var e=kr(Pr(t),2),r=e[0],n=e[1];if(!r.hasConflicts)return[r,n];var o=function(t,e){var r=new ct;function n(t,n){var i="[".concat(t,":").concat(n.label,"]"),o=r.ensureSym(new st(r,i,n.isTerminal),!1);return 0!=t||e.startSymbol!=n||e.startSymbol==o||n.isTerminal||(r.startSymbol=o),o}for(var o in t.gotoSets){var s=t.gotoSets[o];for(var a in s){var u=e.getSymById(a);n(o,u)}}function l(e,r,o){var s=e,a=o.rhs.syms.map(function(e,r){var o=n(s,e),a=t.gotoSets[s][e.id]||null;return i(null!=a,"Next set transition *must* be valid"),s=a.id,o});return new(at.bind.apply(at,function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}([void 0],kr(a),!1)))}for(var o in t.gotoSets){s=t.gotoSets[o];var c=function(t){var i=e.getSymById(t),s=o;if(!i.isTerminal){var a=n(s,i);e.forEachRule(i,function(t,e){var n=l(s,0,t),i=new lt(a,n);r.addRule(i)})}};for(var a in s)c(a)}return r}(n,t),s={};for(var a in n.gotoSets)for(var u in n.gotoSets[a]){var l=n.gotoSets[a][u];l.id in s||(s[l.id]={}),u in s[l.id]||(s[l.id][u]=new Set),s[l.id][u].add(a)}for(var a in r.conflictActions){var c=n.itemSets.get(a);Mr(t,o,n,c,s)}return[jr(n,t),n]}(t)}var r,n;return Pr(t)}function Pr(t){var e=function(t){var e,r,n=new Nr(t).refresh();try{for(var i=Ir(n.itemSets.entries),o=i.next();!o.done;o=i.next())Br(t,n,o.value)}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}(t);return[jr(e,t),e]}function Br(t,e,r){var n,o,s=function(n){var o=e.items.get(n),s=o.rule;o.position>=s.rhs.length&&t.followSets.forEachTerm(s.nt,function(t){null!=t&&(i(t.isTerminal),r.addLookAhead(o,t))})};try{for(var a=Ir(r.values),u=a.next();!u.done;u=a.next())s(u.value)}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}}function jr(t,e){var r,n,i=new vr(e),o=function(r){var n,o,s,a;try{for(var u=(n=void 0,Ir(r.values)),l=u.next();!l.done;l=u.next()){var c=l.value,h=t.items.get(c),f=h.rule;if(h.position<f.rhs.length){var p=f.rhs.syms[h.position];if(p.isTerminal){var d=t.getGoto(r,p);d&&i.addAction(r.id,p,mr.Shift(d.id))}}else if(!f.nt.equals(e.augStartRule.nt)){var g=r.getLookAheads(h);try{for(var y=(s=void 0,Ir(g)),m=y.next();!m.done;m=y.next()){var v=m.value;i.addAction(r.id,v,mr.Reduce(f))}}catch(t){s={error:t}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(s)throw s.error}}}}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}t.forEachGoto(r,function(t,e){null==t||t.isTerminal||i.addAction(r.id,t,mr.Goto(e.id))});var b=t.items.ensure(new Or(e.augStartRule,1));r.addLookAhead(b,e.Eof),r.has(b.id)&&i.addAction(r.id,e.Eof,mr.Accept())};try{for(var s=Ir(t.itemSets.entries),a=s.next();!a.done;a=s.next())o(a.value)}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return i}function Mr(t,e,r,n,o){var s,a;function u(t,e,n,s){if(e<0)i(null!=(r.gotoSets[n][t.nt.id]||null),"Transition on rule.nt missing from start state"),s.add(n);else{var a=t.rhs.syms[e],l=o[n][a.id]||null;i(null!=l,"Prev set should not be null"),l.forEach(function(r){return u(t,e-1,r,s)})}}n.clearLookAheads();var l=function(o){var s=r.items.get(o),a=s.rule;if(s.position>=a.rhs.length){var l=new Set;u(a,a.rhs.length-1,n.id,l),l.forEach(function(r){var o="[".concat(r,":").concat(a.nt.label,"]"),u=e.getSym(o);i(null!=u,"Augmented grammar symbol [p:A] not found"),e.followSets.forEachTerm(u,function(r){if(null!=r&&r!=e.Eof){i(r.isTerminal);var o=r.label.substring(r.label.indexOf(":")+1,r.label.length-1).trim(),a=t.getSym(o);i(null!=a,"T (".concat(o,") in [r:T] cannot be null")),n.addLookAhead(s,a)}})})}};try{for(var c=Ir(n.values),h=c.next();!h.done;h=c.next())l(h.value)}catch(t){s={error:t}}finally{try{h&&!h.done&&(a=c.return)&&a.call(c)}finally{if(s)throw s.error}}}var Dr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};const Ur=Symbol.for("yaml.alias"),Fr=Symbol.for("yaml.document"),$r=Symbol.for("yaml.map"),Vr=Symbol.for("yaml.pair"),zr=Symbol.for("yaml.scalar"),Gr=Symbol.for("yaml.seq"),qr=Symbol.for("yaml.node.type"),Wr=t=>!!t&&"object"==typeof t&&t[qr]===Ur,Hr=t=>!!t&&"object"==typeof t&&t[qr]===Fr,Kr=t=>!!t&&"object"==typeof t&&t[qr]===$r,Jr=t=>!!t&&"object"==typeof t&&t[qr]===Vr,Qr=t=>!!t&&"object"==typeof t&&t[qr]===zr,Yr=t=>!!t&&"object"==typeof t&&t[qr]===Gr;function Xr(t){if(t&&"object"==typeof t)switch(t[qr]){case $r:case Gr:return!0}return!1}function Zr(t){if(t&&"object"==typeof t)switch(t[qr]){case Ur:case $r:case zr:case Gr:return!0}return!1}const tn=t=>(Qr(t)||Xr(t))&&!!t.anchor,en=Symbol("break visit"),rn=Symbol("skip children"),nn=Symbol("remove node");function on(t,e){const r=ln(e);Hr(t)?sn(null,t.contents,r,Object.freeze([t]))===nn&&(t.contents=null):sn(null,t,r,Object.freeze([]))}function sn(t,e,r,n){const i=cn(t,e,r,n);if(Zr(i)||Jr(i))return hn(t,n,i),sn(t,i,r,n);if("symbol"!=typeof i)if(Xr(e)){n=Object.freeze(n.concat(e));for(let t=0;t<e.items.length;++t){const i=sn(t,e.items[t],r,n);if("number"==typeof i)t=i-1;else{if(i===en)return en;i===nn&&(e.items.splice(t,1),t-=1)}}}else if(Jr(e)){n=Object.freeze(n.concat(e));const t=sn("key",e.key,r,n);if(t===en)return en;t===nn&&(e.key=null);const i=sn("value",e.value,r,n);if(i===en)return en;i===nn&&(e.value=null)}return i}async function an(t,e){const r=ln(e);Hr(t)?await un(null,t.contents,r,Object.freeze([t]))===nn&&(t.contents=null):await un(null,t,r,Object.freeze([]))}async function un(t,e,r,n){const i=await cn(t,e,r,n);if(Zr(i)||Jr(i))return hn(t,n,i),un(t,i,r,n);if("symbol"!=typeof i)if(Xr(e)){n=Object.freeze(n.concat(e));for(let t=0;t<e.items.length;++t){const i=await un(t,e.items[t],r,n);if("number"==typeof i)t=i-1;else{if(i===en)return en;i===nn&&(e.items.splice(t,1),t-=1)}}}else if(Jr(e)){n=Object.freeze(n.concat(e));const t=await un("key",e.key,r,n);if(t===en)return en;t===nn&&(e.key=null);const i=await un("value",e.value,r,n);if(i===en)return en;i===nn&&(e.value=null)}return i}function ln(t){return"object"==typeof t&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function cn(t,e,r,n){return"function"==typeof r?r(t,e,n):Kr(e)?r.Map?.(t,e,n):Yr(e)?r.Seq?.(t,e,n):Jr(e)?r.Pair?.(t,e,n):Qr(e)?r.Scalar?.(t,e,n):Wr(e)?r.Alias?.(t,e,n):void 0}function hn(t,e,r){const n=e[e.length-1];if(Xr(n))n.items[t]=r;else if(Jr(n))"key"===t?n.key=r:n.value=r;else{if(!Hr(n)){const t=Wr(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}n.contents=r}}on.BREAK=en,on.SKIP=rn,on.REMOVE=nn,an.BREAK=en,an.SKIP=rn,an.REMOVE=nn;const fn={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},pn=t=>t.replace(/[!,[\]{}]/g,t=>fn[t]);class dn{constructor(t,e){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},dn.defaultYaml,t),this.tags=Object.assign({},dn.defaultTags,e)}clone(){const t=new dn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new dn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:dn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},dn.defaultTags)}return t}add(t,e){this.atNextDocument&&(this.yaml={explicit:dn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},dn.defaultTags),this.atNextDocument=!1);const r=t.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(2!==r.length&&(e(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[t,n]=r;return this.tags[t]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==r.length)return e(0,"%YAML directive should contain exactly one part"),!1;const[t]=r;return"1.1"===t||"1.2"===t?(this.yaml.version=t,!0):(e(6,`Unsupported YAML version ${t}`,/^\d+\.\d+$/.test(t)),!1)}default:return e(0,`Unknown directive ${n}`,!0),!1}}tagName(t,e){if("!"===t)return"!";if("!"!==t[0])return e(`Not a valid tag: ${t}`),null;if("<"===t[1]){const r=t.slice(2,-1);return"!"===r||"!!"===r?(e(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(">"!==t[t.length-1]&&e("Verbatim tags must end with a >"),r)}const[,r,n]=t.match(/^(.*!)([^!]*)$/s);n||e(`The ${t} tag has no suffix`);const i=this.tags[r];if(i)try{return i+decodeURIComponent(n)}catch(t){return e(String(t)),null}return"!"===r?t:(e(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[e,r]of Object.entries(this.tags))if(t.startsWith(r))return e+pn(t.substring(r.length));return"!"===t[0]?t:`!<${t}>`}toString(t){const e=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let n;if(t&&r.length>0&&Zr(t.contents)){const e={};on(t.contents,(t,r)=>{Zr(r)&&r.tag&&(e[r.tag]=!0)}),n=Object.keys(e)}else n=[];for(const[i,o]of r)"!!"===i&&"tag:yaml.org,2002:"===o||t&&!n.some(t=>t.startsWith(o))||e.push(`%TAG ${i} ${o}`);return e.join("\n")}}function gn(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const e=JSON.stringify(t);throw new Error(`Anchor must not contain whitespace or control characters: ${e}`)}return!0}function yn(t,e,r,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let e=0,r=n.length;e<r;++e){const r=n[e],i=yn(t,n,String(e),r);void 0===i?delete n[e]:i!==r&&(n[e]=i)}else if(n instanceof Map)for(const e of Array.from(n.keys())){const r=n.get(e),i=yn(t,n,e,r);void 0===i?n.delete(e):i!==r&&n.set(e,i)}else if(n instanceof Set)for(const e of Array.from(n)){const r=yn(t,n,e,e);void 0===r?n.delete(e):r!==e&&(n.delete(e),n.add(r))}else for(const[e,r]of Object.entries(n)){const i=yn(t,n,e,r);void 0===i?delete n[e]:i!==r&&(n[e]=i)}return t.call(e,r,n)}function mn(t,e,r){if(Array.isArray(t))return t.map((t,e)=>mn(t,String(e),r));if(t&&"function"==typeof t.toJSON){if(!r||!tn(t))return t.toJSON(e,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n),r.onCreate=t=>{n.res=t,delete r.onCreate};const i=t.toJSON(e,r);return r.onCreate&&r.onCreate(i),i}return"bigint"!=typeof t||r?.keep?t:Number(t)}dn.defaultYaml={explicit:!1,version:"1.2"},dn.defaultTags={"!!":"tag:yaml.org,2002:"};class vn{constructor(t){Object.defineProperty(this,qr,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:e,maxAliasCount:r,onAnchor:n,reviver:i}={}){if(!Hr(t))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:t,keep:!0,mapAsMap:!0===e,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},s=mn(this,"",o);if("function"==typeof n)for(const{count:t,res:e}of o.anchors.values())n(e,t);return"function"==typeof i?yn(i,{"":s},"",s):s}}class bn extends vn{constructor(t){super(Ur),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,e){let r,n;e?.aliasResolveCache?r=e.aliasResolveCache:(r=[],on(t,{Node:(t,e)=>{(Wr(e)||tn(e))&&r.push(e)}}),e&&(e.aliasResolveCache=r));for(const t of r){if(t===this)break;t.anchor===this.source&&(n=t)}return n}toJSON(t,e){if(!e)return{source:this.source};const{anchors:r,doc:n,maxAliasCount:i}=e,o=this.resolve(n,e);if(!o){const t=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(t)}let s=r.get(o);if(s||(mn(o,null,e),s=r.get(o)),void 0===s?.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(s.count+=1,0===s.aliasCount&&(s.aliasCount=wn(n,o,r)),s.count*s.aliasCount>i))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return s.res}toString(t,e,r){const n=`*${this.source}`;if(t){if(gn(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const t=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(t)}if(t.implicitKey)return`${n} `}return n}}function wn(t,e,r){if(Wr(e)){const n=e.resolve(t),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}if(Xr(e)){let n=0;for(const i of e.items){const e=wn(t,i,r);e>n&&(n=e)}return n}if(Jr(e)){const n=wn(t,e.key,r),i=wn(t,e.value,r);return Math.max(n,i)}return 1}const Sn=t=>!t||"function"!=typeof t&&"object"!=typeof t;class En extends vn{constructor(t){super(zr),this.value=t}toJSON(t,e){return e?.keep?this.value:mn(this.value,t,e)}toString(){return String(this.value)}}function Cn(t,e,r){if(Hr(t)&&(t=t.contents),Zr(t))return t;if(Jr(t)){const e=r.schema[$r].createNode?.(r.schema,null,r);return e.items.push(t),e}(t instanceof String||t instanceof Number||t instanceof Boolean||"undefined"!=typeof BigInt&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:o,schema:s,sourceObjects:a}=r;let u;if(n&&t&&"object"==typeof t){if(u=a.get(t),u)return u.anchor??(u.anchor=i(t)),new bn(u.anchor);u={anchor:null,node:null},a.set(t,u)}e?.startsWith("!!")&&(e="tag:yaml.org,2002:"+e.slice(2));let l=function(t,e,r){if(e){const t=r.filter(t=>t.tag===e),n=t.find(t=>!t.format)??t[0];if(!n)throw new Error(`Tag ${e} not found`);return n}return r.find(e=>e.identify?.(t)&&!e.format)}(t,e,s.tags);if(!l){if(t&&"function"==typeof t.toJSON&&(t=t.toJSON()),!t||"object"!=typeof t){const e=new En(t);return u&&(u.node=e),e}l=t instanceof Map?s[$r]:Symbol.iterator in Object(t)?s[Gr]:s[$r]}o&&(o(l),delete r.onTagObj);const c=l?.createNode?l.createNode(r.schema,t,r):"function"==typeof l?.nodeClass?.from?l.nodeClass.from(r.schema,t,r):new En(t);return e?c.tag=e:l.default||(c.tag=l.tag),u&&(u.node=c),c}function _n(t,e,r){let n=r;for(let t=e.length-1;t>=0;--t){const r=e[t];if("number"==typeof r&&Number.isInteger(r)&&r>=0){const t=[];t[r]=n,n=t}else n=new Map([[r,n]])}return Cn(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}En.BLOCK_FOLDED="BLOCK_FOLDED",En.BLOCK_LITERAL="BLOCK_LITERAL",En.PLAIN="PLAIN",En.QUOTE_DOUBLE="QUOTE_DOUBLE",En.QUOTE_SINGLE="QUOTE_SINGLE";class xn extends vn{constructor(t,e){super(t),Object.defineProperty(this,"schema",{value:e,configurable:!0,enumerable:!1,writable:!0})}clone(t){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(e.schema=t),e.items=e.items.map(e=>Zr(e)||Jr(e)?e.clone(t):e),this.range&&(e.range=this.range.slice()),e}addIn(t,e){if((t=>null==t||"object"==typeof t&&!!t[Symbol.iterator]().next().done)(t))this.add(e);else{const[r,...n]=t,i=this.get(r,!0);if(Xr(i))i.addIn(n,e);else{if(void 0!==i||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,_n(this.schema,n,e))}}}deleteIn(t){const[e,...r]=t;if(0===r.length)return this.delete(e);const n=this.get(e,!0);if(Xr(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${r}`)}getIn(t,e){const[r,...n]=t,i=this.get(r,!0);return 0===n.length?!e&&Qr(i)?i.value:i:Xr(i)?i.getIn(n,e):void 0}hasAllNullValues(t){return this.items.every(e=>{if(!Jr(e))return!1;const r=e.value;return null==r||t&&Qr(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[e,...r]=t;if(0===r.length)return this.has(e);const n=this.get(e,!0);return!!Xr(n)&&n.hasIn(r)}setIn(t,e){const[r,...n]=t;if(0===n.length)this.set(r,e);else{const t=this.get(r,!0);if(Xr(t))t.setIn(n,e);else{if(void 0!==t||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,_n(this.schema,n,e))}}}}const On=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function An(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const Tn=(t,e,r)=>t.endsWith("\n")?An(r,e):r.includes("\n")?"\n"+An(r,e):(t.endsWith(" ")?"":" ")+r,Nn="flow",Rn="block",In="quoted";function kn(t,e,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){if(!i||i<0)return t;i<o&&(o=0);const u=Math.max(1+o,1+i-e.length);if(t.length<=u)return t;const l=[],c={};let h,f,p=i-e.length;"number"==typeof n&&(n>i-Math.max(2,o)?l.push(0):p=i-n);let d=!1,g=-1,y=-1,m=-1;r===Rn&&(g=Ln(t,g,e.length),-1!==g&&(p=g+u));for(let n;n=t[g+=1];){if(r===In&&"\\"===n){switch(y=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}m=g}if("\n"===n)r===Rn&&(g=Ln(t,g,e.length)),p=g+e.length+u,h=void 0;else{if(" "===n&&f&&" "!==f&&"\n"!==f&&"\t"!==f){const e=t[g+1];e&&" "!==e&&"\n"!==e&&"\t"!==e&&(h=g)}if(g>=p)if(h)l.push(h),p=h+u,h=void 0;else if(r===In){for(;" "===f||"\t"===f;)f=n,n=t[g+=1],d=!0;const e=g>m+1?g-2:y-1;if(c[e])return t;l.push(e),c[e]=!0,p=e+u,h=void 0}else d=!0}f=n}if(d&&a&&a(),0===l.length)return t;s&&s();let v=t.slice(0,l[0]);for(let n=0;n<l.length;++n){const i=l[n],o=l[n+1]||t.length;0===i?v=`\n${e}${t.slice(0,o)}`:(r===In&&c[i]&&(v+=`${t[i]}\\`),v+=`\n${e}${t.slice(i+1,o)}`)}return v}function Ln(t,e,r){let n=e,i=e+1,o=t[i];for(;" "===o||"\t"===o;)if(e<i+r)o=t[++e];else{do{o=t[++e]}while(o&&"\n"!==o);n=e,i=e+1,o=t[i]}return n}const Pn=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Bn=t=>/^(%|---|\.\.\.)/m.test(t);function jn(t,e){const r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Bn(t)?" ":"");let s="",a=0;for(let t=0,e=r[t];e;e=r[++t])if(" "===e&&"\\"===r[t+1]&&"n"===r[t+2]&&(s+=r.slice(a,t)+"\\ ",t+=1,a=t,e="\\"),"\\"===e)switch(r[t+1]){case"u":{s+=r.slice(a,t);const e=r.substr(t+2,4);switch(e){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:"00"===e.substr(0,2)?s+="\\x"+e.substr(2):s+=r.substr(t,6)}t+=5,a=t+1}break;case"n":if(n||'"'===r[t+2]||r.length<i)t+=1;else{for(s+=r.slice(a,t)+"\n\n";"\\"===r[t+2]&&"n"===r[t+3]&&'"'!==r[t+4];)s+="\n",t+=2;s+=o," "===r[t+2]&&(s+="\\"),t+=1,a=t+1}break;default:t+=1}return s=a?s+r.slice(a):r,n?s:kn(s,o,In,Pn(e,!1))}function Mn(t,e){if(!1===e.options.singleQuote||e.implicitKey&&t.includes("\n")||/[ \t]\n|\n[ \t]/.test(t))return jn(t,e);const r=e.indent||(Bn(t)?" ":""),n="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&\n${r}`)+"'";return e.implicitKey?n:kn(n,r,Nn,Pn(e,!1))}function Dn(t,e){const{singleQuote:r}=e.options;let n;if(!1===r)n=jn;else{const e=t.includes('"'),i=t.includes("'");n=e&&!i?Mn:i&&!e?jn:r?Mn:jn}return n(t,e)}let Un;try{Un=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{Un=/\n+(?!\n|$)/g}function Fn({comment:t,type:e,value:r},n,i,o){const{blockQuote:s,commentString:a,lineWidth:u}=n.options;if(!s||/\n[\t ]+$/.test(r))return Dn(r,n);const l=n.indent||(n.forceBlockIndent||Bn(r)?" ":""),c="literal"===s||"folded"!==s&&e!==En.BLOCK_FOLDED&&(e===En.BLOCK_LITERAL||!function(t,e,r){if(!e||e<0)return!1;const n=e-r,i=t.length;if(i<=n)return!1;for(let e=0,r=0;e<i;++e)if("\n"===t[e]){if(e-r>n)return!0;if(r=e+1,i-r<=n)return!1}return!0}(r,u,l.length));if(!r)return c?"|\n":">\n";let h,f;for(f=r.length;f>0;--f){const t=r[f-1];if("\n"!==t&&"\t"!==t&&" "!==t)break}let p=r.substring(f);const d=p.indexOf("\n");-1===d?h="-":r===p||d!==p.length-1?(h="+",o&&o()):h="",p&&(r=r.slice(0,-p.length),"\n"===p[p.length-1]&&(p=p.slice(0,-1)),p=p.replace(Un,`$&${l}`));let g,y=!1,m=-1;for(g=0;g<r.length;++g){const t=r[g];if(" "===t)y=!0;else{if("\n"!==t)break;m=g}}let v=r.substring(0,m<g?m+1:g);v&&(r=r.substring(v.length),v=v.replace(/\n+/g,`$&${l}`));let b=(y?l?"2":"1":"")+h;if(t&&(b+=" "+a(t.replace(/ ?[\r\n]+/g," ")),i&&i()),!c){const t=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`);let i=!1;const o=Pn(n,!0);"folded"!==s&&e!==En.BLOCK_FOLDED&&(o.onOverflow=()=>{i=!0});const a=kn(`${v}${t}${p}`,l,Rn,o);if(!i)return`>${b}\n${l}${a}`}return`|${b}\n${l}${v}${r=r.replace(/\n+/g,`$&${l}`)}${p}`}function $n(t,e,r,n){const{implicitKey:i,inFlow:o}=e,s="string"==typeof t.value?t:Object.assign({},t,{value:String(t.value)});let{type:a}=t;a!==En.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=En.QUOTE_DOUBLE);const u=t=>{switch(t){case En.BLOCK_FOLDED:case En.BLOCK_LITERAL:return i||o?Dn(s.value,e):Fn(s,e,r,n);case En.QUOTE_DOUBLE:return jn(s.value,e);case En.QUOTE_SINGLE:return Mn(s.value,e);case En.PLAIN:return function(t,e,r,n){const{type:i,value:o}=t,{actualString:s,implicitKey:a,indent:u,indentStep:l,inFlow:c}=e;if(a&&o.includes("\n")||c&&/[[\]{},]/.test(o))return Dn(o,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||c||!o.includes("\n")?Dn(o,e):Fn(t,e,r,n);if(!a&&!c&&i!==En.PLAIN&&o.includes("\n"))return Fn(t,e,r,n);if(Bn(o)){if(""===u)return e.forceBlockIndent=!0,Fn(t,e,r,n);if(a&&u===l)return Dn(o,e)}const h=o.replace(/\n+/g,`$&\n${u}`);if(s){const t=t=>t.default&&"tag:yaml.org,2002:str"!==t.tag&&t.test?.test(h),{compat:r,tags:n}=e.doc.schema;if(n.some(t)||r?.some(t))return Dn(o,e)}return a?h:kn(h,u,Nn,Pn(e,!1))}(s,e,r,n);default:return null}};let l=u(a);if(null===l){const{defaultKeyType:t,defaultStringType:r}=e.options,n=i&&t||r;if(l=u(n),null===l)throw new Error(`Unsupported default string type ${n}`)}return l}function Vn(t,e,r,n){if(Jr(t))return t.toString(e,r,n);if(Wr(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i;const o=Zr(t)?t:e.doc.createNode(t,{onTagObj:t=>i=t});i??(i=function(t,e){if(e.tag){const r=t.filter(t=>t.tag===e.tag);if(r.length>0)return r.find(t=>t.format===e.format)??r[0]}let r,n;if(Qr(e)){n=e.value;let i=t.filter(t=>t.identify?.(n));if(i.length>1){const t=i.filter(t=>t.test);t.length>0&&(i=t)}r=i.find(t=>t.format===e.format)??i.find(t=>!t.format)}else n=e,r=t.find(t=>t.nodeClass&&n instanceof t.nodeClass);if(!r)throw new Error(`Tag not resolved for ${n?.constructor?.name??(null===n?"null":typeof n)} value`);return r}(e.doc.schema.tags,o));const s=function(t,e,{anchors:r,doc:n}){if(!n.directives)return"";const i=[],o=(Qr(t)||Xr(t))&&t.anchor;o&&gn(o)&&(r.add(o),i.push(`&${o}`));const s=t.tag??(e.default?null:e.tag);return s&&i.push(n.directives.tagString(s)),i.join(" ")}(o,i,e);s.length>0&&(e.indentAtStart=(e.indentAtStart??0)+s.length+1);const a="function"==typeof i.stringify?i.stringify(o,e,r,n):Qr(o)?$n(o,e,r,n):o.toString(e,r,n);return s?Qr(o)||"{"===a[0]||"["===a[0]?`${s} ${a}`:`${s}\n${e.indent}${a}`:a}const zn="<<",Gn={identify:t=>t===zn||"symbol"==typeof t&&t.description===zn,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new En(Symbol(zn)),{addToJSMap:qn}),stringify:()=>zn};function qn(t,e,r){if(r=t&&Wr(r)?r.resolve(t.doc):r,Yr(r))for(const n of r.items)Wn(t,e,n);else if(Array.isArray(r))for(const n of r)Wn(t,e,n);else Wn(t,e,r)}function Wn(t,e,r){const n=t&&Wr(r)?r.resolve(t.doc):r;if(!Kr(n))throw new Error("Merge sources must be maps or map aliases");const i=n.toJSON(null,t,Map);for(const[t,r]of i)e instanceof Map?e.has(t)||e.set(t,r):e instanceof Set?e.add(t):Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0});return e}function Hn(t,e,{key:r,value:n}){if(Zr(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(((t,e)=>(Gn.identify(e)||Qr(e)&&(!e.type||e.type===En.PLAIN)&&Gn.identify(e.value))&&t?.doc.schema.tags.some(t=>t.tag===Gn.tag&&t.default))(t,r))qn(t,e,n);else{const i=mn(r,"",t);if(e instanceof Map)e.set(i,mn(n,i,t));else if(e instanceof Set)e.add(i);else{const o=function(t,e,r){if(null===e)return"";if("object"!=typeof e)return String(e);if(Zr(t)&&r?.doc){const e=function(t){const e=Object.assign({blockQuote:!0,commentString:On,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,{});let r;switch(e.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:e.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof e.indent?" ".repeat(e.indent):" ",inFlow:r,options:e}}(r.doc);e.anchors=new Set;for(const t of r.anchors.keys())e.anchors.add(t.anchor);e.inFlow=!0,e.inStringifyKey=!0;const o=t.toString(e);if(!r.mapKeyWarned){let t=JSON.stringify(o);t.length>40&&(t=t.substring(0,36)+'..."'),i=`Keys with collection values will be stringified due to JS Object restrictions: ${t}. Set mapAsMap: true to use object keys.`,"debug"!==(n=r.doc.options.logLevel)&&"warn"!==n||console.warn(i),r.mapKeyWarned=!0}return o}var n,i;return JSON.stringify(e)}(r,i,t),s=mn(n,o,t);o in e?Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):e[o]=s}}return e}function Kn(t,e,r){const n=Cn(t,void 0,r),i=Cn(e,void 0,r);return new Jn(n,i)}class Jn{constructor(t,e=null){Object.defineProperty(this,qr,{value:Vr}),this.key=t,this.value=e}clone(t){let{key:e,value:r}=this;return Zr(e)&&(e=e.clone(t)),Zr(r)&&(r=r.clone(t)),new Jn(e,r)}toJSON(t,e){return Hn(e,e?.mapAsMap?new Map:{},this)}toString(t,e,r){return t?.doc?function({key:t,value:e},r,n,i){const{allNullValues:o,doc:s,indent:a,indentStep:u,options:{commentString:l,indentSeq:c,simpleKeys:h}}=r;let f=Zr(t)&&t.comment||null;if(h){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(Xr(t)||!Zr(t)&&"object"==typeof t)throw new Error("With simple keys, collection cannot be used as a key value")}let p=!h&&(!t||f&&null==e&&!r.inFlow||Xr(t)||(Qr(t)?t.type===En.BLOCK_FOLDED||t.type===En.BLOCK_LITERAL:"object"==typeof t));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(h||!o),indent:a+u});let d,g,y,m=!1,v=!1,b=Vn(t,r,()=>m=!0,()=>v=!0);if(!p&&!r.inFlow&&b.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(o||null==e)return m&&n&&n(),""===b?"?":p?`? ${b}`:b}else if(o&&!h||null==e&&p)return b=`? ${b}`,f&&!m?b+=Tn(b,r.indent,l(f)):v&&i&&i(),b;m&&(f=null),p?(f&&(b+=Tn(b,r.indent,l(f))),b=`? ${b}\n${a}:`):(b=`${b}:`,f&&(b+=Tn(b,r.indent,l(f)))),Zr(e)?(d=!!e.spaceBefore,g=e.commentBefore,y=e.comment):(d=!1,g=null,y=null,e&&"object"==typeof e&&(e=s.createNode(e))),r.implicitKey=!1,p||f||!Qr(e)||(r.indentAtStart=b.length+1),v=!1,c||!(u.length>=2)||r.inFlow||p||!Yr(e)||e.flow||e.tag||e.anchor||(r.indent=r.indent.substring(2));let w=!1;const S=Vn(e,r,()=>w=!0,()=>v=!0);let E=" ";if(f||d||g)E=d?"\n":"",g&&(E+=`\n${An(l(g),r.indent)}`),""!==S||r.inFlow?E+=`\n${r.indent}`:"\n"===E&&y&&(E="\n\n");else if(!p&&Xr(e)){const t=S[0],n=S.indexOf("\n"),i=-1!==n,o=r.inFlow??e.flow??0===e.items.length;if(i||!o){let e=!1;if(i&&("&"===t||"!"===t)){let r=S.indexOf(" ");"&"===t&&-1!==r&&r<n&&"!"===S[r+1]&&(r=S.indexOf(" ",r+1)),(-1===r||n<r)&&(e=!0)}e||(E=`\n${r.indent}`)}}else""!==S&&"\n"!==S[0]||(E="");return b+=E+S,r.inFlow?w&&n&&n():y&&!w?b+=Tn(b,r.indent,l(y)):v&&i&&i(),b}(this,t,e,r):JSON.stringify(this)}}function Qn(t,e,r){return(e.inFlow??t.flow?Xn:Yn)(t,e,r)}function Yn({comment:t,items:e},r,{blockItemPrefix:n,flowChars:i,itemIndent:o,onChompKeep:s,onComment:a}){const{indent:u,options:{commentString:l}}=r,c=Object.assign({},r,{indent:o,type:null});let h=!1;const f=[];for(let t=0;t<e.length;++t){const i=e[t];let s=null;if(Zr(i))!h&&i.spaceBefore&&f.push(""),Zn(r,f,i.commentBefore,h),i.comment&&(s=i.comment);else if(Jr(i)){const t=Zr(i.key)?i.key:null;t&&(!h&&t.spaceBefore&&f.push(""),Zn(r,f,t.commentBefore,h))}h=!1;let a=Vn(i,c,()=>s=null,()=>h=!0);s&&(a+=Tn(a,o,l(s))),h&&s&&(h=!1),f.push(n+a)}let p;if(0===f.length)p=i.start+i.end;else{p=f[0];for(let t=1;t<f.length;++t){const e=f[t];p+=e?`\n${u}${e}`:"\n"}}return t?(p+="\n"+An(l(t),u),a&&a()):h&&s&&s(),p}function Xn({items:t},e,{flowChars:r,itemIndent:n}){const{indent:i,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=e;n+=o;const u=Object.assign({},e,{indent:n,inFlow:!0,type:null});let l=!1,c=0;const h=[];for(let r=0;r<t.length;++r){const i=t[r];let o=null;if(Zr(i))i.spaceBefore&&h.push(""),Zn(e,h,i.commentBefore,!1),i.comment&&(o=i.comment);else if(Jr(i)){const t=Zr(i.key)?i.key:null;t&&(t.spaceBefore&&h.push(""),Zn(e,h,t.commentBefore,!1),t.comment&&(l=!0));const r=Zr(i.value)?i.value:null;r?(r.comment&&(o=r.comment),r.commentBefore&&(l=!0)):null==i.value&&t?.comment&&(o=t.comment)}o&&(l=!0);let s=Vn(i,u,()=>o=null);r<t.length-1&&(s+=","),o&&(s+=Tn(s,n,a(o))),!l&&(h.length>c||s.includes("\n"))&&(l=!0),h.push(s),c=h.length}const{start:f,end:p}=r;if(0===h.length)return f+p;if(!l){const t=h.reduce((t,e)=>t+e.length+2,2);l=e.options.lineWidth>0&&t>e.options.lineWidth}if(l){let t=f;for(const e of h)t+=e?`\n${o}${i}${e}`:"\n";return`${t}\n${i}${p}`}return`${f}${s}${h.join(" ")}${s}${p}`}function Zn({indent:t,options:{commentString:e}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){const i=An(e(n),t);r.push(i.trimStart())}}function ti(t,e){const r=Qr(e)?e.value:e;for(const n of t)if(Jr(n)){if(n.key===e||n.key===r)return n;if(Qr(n.key)&&n.key.value===r)return n}}class ei extends xn{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super($r,t),this.items=[]}static from(t,e,r){const{keepUndefined:n,replacer:i}=r,o=new this(t),s=(t,s)=>{if("function"==typeof i)s=i.call(e,t,s);else if(Array.isArray(i)&&!i.includes(t))return;(void 0!==s||n)&&o.items.push(Kn(t,s,r))};if(e instanceof Map)for(const[t,r]of e)s(t,r);else if(e&&"object"==typeof e)for(const t of Object.keys(e))s(t,e[t]);return"function"==typeof t.sortMapEntries&&o.items.sort(t.sortMapEntries),o}add(t,e){let r;r=Jr(t)?t:t&&"object"==typeof t&&"key"in t?new Jn(t.key,t.value):new Jn(t,t?.value);const n=ti(this.items,r.key),i=this.schema?.sortMapEntries;if(n){if(!e)throw new Error(`Key ${r.key} already set`);Qr(n.value)&&Sn(r.value)?n.value.value=r.value:n.value=r.value}else if(i){const t=this.items.findIndex(t=>i(r,t)<0);-1===t?this.items.push(r):this.items.splice(t,0,r)}else this.items.push(r)}delete(t){const e=ti(this.items,t);return!!e&&this.items.splice(this.items.indexOf(e),1).length>0}get(t,e){const r=ti(this.items,t),n=r?.value;return(!e&&Qr(n)?n.value:n)??void 0}has(t){return!!ti(this.items,t)}set(t,e){this.add(new Jn(t,e),!0)}toJSON(t,e,r){const n=r?new r:e?.mapAsMap?new Map:{};e?.onCreate&&e.onCreate(n);for(const t of this.items)Hn(e,n,t);return n}toString(t,e,r){if(!t)return JSON.stringify(this);for(const t of this.items)if(!Jr(t))throw new Error(`Map items must all be pairs; found ${JSON.stringify(t)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),Qn(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:e})}}const ri={collection:"map",default:!0,nodeClass:ei,tag:"tag:yaml.org,2002:map",resolve:(t,e)=>(Kr(t)||e("Expected a mapping for this tag"),t),createNode:(t,e,r)=>ei.from(t,e,r)};class ni extends xn{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Gr,t),this.items=[]}add(t){this.items.push(t)}delete(t){const e=ii(t);return"number"==typeof e&&this.items.splice(e,1).length>0}get(t,e){const r=ii(t);if("number"!=typeof r)return;const n=this.items[r];return!e&&Qr(n)?n.value:n}has(t){const e=ii(t);return"number"==typeof e&&e<this.items.length}set(t,e){const r=ii(t);if("number"!=typeof r)throw new Error(`Expected a valid index, not ${t}.`);const n=this.items[r];Qr(n)&&Sn(e)?n.value=e:this.items[r]=e}toJSON(t,e){const r=[];e?.onCreate&&e.onCreate(r);let n=0;for(const t of this.items)r.push(mn(t,String(n++),e));return r}toString(t,e,r){return t?Qn(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:e}):JSON.stringify(this)}static from(t,e,r){const{replacer:n}=r,i=new this(t);if(e&&Symbol.iterator in Object(e)){let t=0;for(let o of e){if("function"==typeof n){const r=e instanceof Set?o:String(t++);o=n.call(e,r,o)}i.items.push(Cn(o,void 0,r))}}return i}}function ii(t){let e=Qr(t)?t.value:t;return e&&"string"==typeof e&&(e=Number(e)),"number"==typeof e&&Number.isInteger(e)&&e>=0?e:null}const oi={collection:"seq",default:!0,nodeClass:ni,tag:"tag:yaml.org,2002:seq",resolve:(t,e)=>(Yr(t)||e("Expected a sequence for this tag"),t),createNode:(t,e,r)=>ni.from(t,e,r)},si={identify:t=>"string"==typeof t,default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:(t,e,r,n)=>$n(t,e=Object.assign({actualString:!0},e),r,n)},ai={identify:t=>null==t,createNode:()=>new En(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new En(null),stringify:({source:t},e)=>"string"==typeof t&&ai.test.test(t)?t:e.options.nullStr},ui={identify:t=>"boolean"==typeof t,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new En("t"===t[0]||"T"===t[0]),stringify:({source:t,value:e},r)=>t&&ui.test.test(t)&&e===("t"===t[0]||"T"===t[0])?t:e?r.options.trueStr:r.options.falseStr};function li({format:t,minFractionDigits:e,tag:r,value:n}){if("bigint"==typeof n)return String(n);const i="number"==typeof n?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let o=Object.is(n,-0)?"-0":JSON.stringify(n);if(!t&&e&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(o)){let t=o.indexOf(".");t<0&&(t=o.length,o+=".");let r=e-(o.length-t-1);for(;r-- >0;)o+="0"}return o}const ci={identify:t=>"number"==typeof t,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>"nan"===t.slice(-3).toLowerCase()?NaN:"-"===t[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:li},hi={identify:t=>"number"==typeof t,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():li(t)}},fi=t=>"bigint"==typeof t||Number.isInteger(t),pi=(t,e,r,{intAsBigInt:n})=>n?BigInt(t):parseInt(t.substring(e),r);function di(t,e,r){const{value:n}=t;return fi(n)&&n>=0?r+n.toString(e):li(t)}const gi=[ri,oi,si,ai,ui,{identify:t=>fi(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,r)=>pi(t,2,8,r),stringify:t=>di(t,8,"0o")},{identify:fi,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,r)=>pi(t,0,10,r),stringify:li},{identify:t=>fi(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,r)=>pi(t,2,16,r),stringify:t=>di(t,16,"0x")},ci,hi,{identify:t=>"number"==typeof t,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new En(parseFloat(t)),r=t.indexOf(".");return-1!==r&&"0"===t[t.length-1]&&(e.minFractionDigits=t.length-r-1),e},stringify:li}];function yi(t){return"bigint"==typeof t||Number.isInteger(t)}const mi=({value:t})=>JSON.stringify(t),vi=[ri,oi].concat([{identify:t=>"string"==typeof t,default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:mi},{identify:t=>null==t,createNode:()=>new En(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:mi},{identify:t=>"boolean"==typeof t,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>"true"===t,stringify:mi},{identify:yi,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),stringify:({value:t})=>yi(t)?t.toString():JSON.stringify(t)},{identify:t=>"number"==typeof t,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:mi}],{default:!0,tag:"",test:/^/,resolve:(t,e)=>(e(`Unresolved plain scalar ${JSON.stringify(t)}`),t)}),bi={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if("function"==typeof atob){const e=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(e.length);for(let t=0;t<e.length;++t)r[t]=e.charCodeAt(t);return r}return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:r},n,i,o){if(!r)return"";const s=r;let a;if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let t="";for(let e=0;e<s.length;++e)t+=String.fromCharCode(s[e]);a=btoa(t)}if(e??(e=En.BLOCK_LITERAL),e!==En.QUOTE_DOUBLE){const t=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),r=Math.ceil(a.length/t),i=new Array(r);for(let e=0,n=0;e<r;++e,n+=t)i[e]=a.substr(n,t);a=i.join(e===En.BLOCK_LITERAL?"\n":" ")}return $n({comment:t,type:e,value:a},n,i,o)}};function wi(t,e){if(Yr(t))for(let r=0;r<t.items.length;++r){let n=t.items[r];if(!Jr(n)){if(Kr(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");const t=n.items[0]||new Jn(new En(null));if(n.commentBefore&&(t.key.commentBefore=t.key.commentBefore?`${n.commentBefore}\n${t.key.commentBefore}`:n.commentBefore),n.comment){const e=t.value??t.key;e.comment=e.comment?`${n.comment}\n${e.comment}`:n.comment}n=t}t.items[r]=Jr(n)?n:new Jn(n)}}else e("Expected a sequence for this tag");return t}function Si(t,e,r){const{replacer:n}=r,i=new ni(t);i.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let t of e){let s,a;if("function"==typeof n&&(t=n.call(e,String(o++),t)),Array.isArray(t)){if(2!==t.length)throw new TypeError(`Expected [key, value] tuple: ${t}`);s=t[0],a=t[1]}else if(t&&t instanceof Object){const e=Object.keys(t);if(1!==e.length)throw new TypeError(`Expected tuple with one key, not ${e.length} keys`);s=e[0],a=t[s]}else s=t;i.items.push(Kn(s,a,r))}return i}const Ei={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:wi,createNode:Si};class Ci extends ni{constructor(){super(),this.add=ei.prototype.add.bind(this),this.delete=ei.prototype.delete.bind(this),this.get=ei.prototype.get.bind(this),this.has=ei.prototype.has.bind(this),this.set=ei.prototype.set.bind(this),this.tag=Ci.tag}toJSON(t,e){if(!e)return super.toJSON(t);const r=new Map;e?.onCreate&&e.onCreate(r);for(const t of this.items){let n,i;if(Jr(t)?(n=mn(t.key,"",e),i=mn(t.value,n,e)):n=mn(t,"",e),r.has(n))throw new Error("Ordered maps must not include duplicate keys");r.set(n,i)}return r}static from(t,e,r){const n=Si(t,e,r),i=new this;return i.items=n.items,i}}Ci.tag="tag:yaml.org,2002:omap";const _i={collection:"seq",identify:t=>t instanceof Map,nodeClass:Ci,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const r=wi(t,e),n=[];for(const{key:t}of r.items)Qr(t)&&(n.includes(t.value)?e(`Ordered maps must not include duplicate keys: ${t.value}`):n.push(t.value));return Object.assign(new Ci,r)},createNode:(t,e,r)=>Ci.from(t,e,r)};function xi({value:t,source:e},r){return e&&(t?Oi:Ai).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}const Oi={identify:t=>!0===t,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new En(!0),stringify:xi},Ai={identify:t=>!1===t,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new En(!1),stringify:xi},Ti={identify:t=>"number"==typeof t,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>"nan"===t.slice(-3).toLowerCase()?NaN:"-"===t[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:li},Ni={identify:t=>"number"==typeof t,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():li(t)}},Ri={identify:t=>"number"==typeof t,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new En(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(-1!==r){const n=t.substring(r+1).replace(/_/g,"");"0"===n[n.length-1]&&(e.minFractionDigits=n.length)}return e},stringify:li},Ii=t=>"bigint"==typeof t||Number.isInteger(t);function ki(t,e,r,{intAsBigInt:n}){const i=t[0];if("-"!==i&&"+"!==i||(e+=1),t=t.substring(e).replace(/_/g,""),n){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`}const e=BigInt(t);return"-"===i?BigInt(-1)*e:e}const o=parseInt(t,r);return"-"===i?-1*o:o}function Li(t,e,r){const{value:n}=t;if(Ii(n)){const t=n.toString(e);return n<0?"-"+r+t.substr(1):r+t}return li(t)}const Pi={identify:Ii,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>ki(t,2,2,r),stringify:t=>Li(t,2,"0b")},Bi={identify:Ii,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>ki(t,1,8,r),stringify:t=>Li(t,8,"0")},ji={identify:Ii,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>ki(t,0,10,r),stringify:li},Mi={identify:Ii,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>ki(t,2,16,r),stringify:t=>Li(t,16,"0x")};class Di extends ei{constructor(t){super(t),this.tag=Di.tag}add(t){let e;e=Jr(t)?t:t&&"object"==typeof t&&"key"in t&&"value"in t&&null===t.value?new Jn(t.key,null):new Jn(t,null),ti(this.items,e.key)||this.items.push(e)}get(t,e){const r=ti(this.items,t);return!e&&Jr(r)?Qr(r.key)?r.key.value:r.key:r}set(t,e){if("boolean"!=typeof e)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof e);const r=ti(this.items,t);r&&!e?this.items.splice(this.items.indexOf(r),1):!r&&e&&this.items.push(new Jn(t))}toJSON(t,e){return super.toJSON(t,e,Set)}toString(t,e,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),e,r);throw new Error("Set items must all have null values")}static from(t,e,r){const{replacer:n}=r,i=new this(t);if(e&&Symbol.iterator in Object(e))for(let t of e)"function"==typeof n&&(t=n.call(e,t,t)),i.items.push(Kn(t,null,r));return i}}Di.tag="tag:yaml.org,2002:set";const Ui={collection:"map",identify:t=>t instanceof Set,nodeClass:Di,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,r)=>Di.from(t,e,r),resolve(t,e){if(Kr(t)){if(t.hasAllNullValues(!0))return Object.assign(new Di,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function Fi(t,e){const r=t[0],n="-"===r||"+"===r?t.substring(1):t,i=t=>e?BigInt(t):Number(t),o=n.replace(/_/g,"").split(":").reduce((t,e)=>t*i(60)+i(e),i(0));return"-"===r?i(-1)*o:o}function $i(t){let{value:e}=t,r=t=>t;if("bigint"==typeof e)r=t=>BigInt(t);else if(isNaN(e)||!isFinite(e))return li(t);let n="";e<0&&(n="-",e*=r(-1));const i=r(60),o=[e%i];return e<60?o.unshift(0):(e=(e-o[0])/i,o.unshift(e%i),e>=60&&(e=(e-o[0])/i,o.unshift(e))),n+o.map(t=>String(t).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Vi={identify:t=>"bigint"==typeof t||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:r})=>Fi(t,r),stringify:$i},zi={identify:t=>"number"==typeof t,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Fi(t,!1),stringify:$i},Gi={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(Gi.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,i,o,s,a]=e.map(Number),u=e[7]?Number((e[7]+"00").substr(1,3)):0;let l=Date.UTC(r,n-1,i,o||0,s||0,a||0,u);const c=e[8];if(c&&"Z"!==c){let t=Fi(c,!1);Math.abs(t)<30&&(t*=60),l-=6e4*t}return new Date(l)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},qi=[ri,oi,si,ai,Oi,Ai,Pi,Bi,ji,Mi,Ti,Ni,Ri,bi,Gn,_i,Ei,Ui,Vi,zi,Gi];new Map([["core",gi],["failsafe",[ri,oi,si]],["json",vi],["yaml11",qi],["yaml-1.1",qi]]),Error;const Wi=Symbol("break visit"),Hi=Symbol("skip children"),Ki=Symbol("remove item");function Ji(t,e){"type"in t&&"document"===t.type&&(t={start:t.start,value:t.value}),Qi(Object.freeze([]),t,e)}function Qi(t,e,r){let n=r(e,t);if("symbol"==typeof n)return n;for(const i of["key","value"]){const o=e[i];if(o&&"items"in o){for(let e=0;e<o.items.length;++e){const n=Qi(Object.freeze(t.concat([[i,e]])),o.items[e],r);if("number"==typeof n)e=n-1;else{if(n===Wi)return Wi;n===Ki&&(o.items.splice(e,1),e-=1)}}"function"==typeof n&&"key"===i&&(n=n(e,t))}}return"function"==typeof n?n(e,t):n}var Yi;Ji.BREAK=Wi,Ji.SKIP=Hi,Ji.REMOVE=Ki,Ji.itemAtPath=(t,e)=>{let r=t;for(const[t,n]of e){const e=r?.[t];if(!e||!("items"in e))return;r=e.items[n]}return r},Ji.parentCollection=(t,e)=>{const r=Ji.itemAtPath(t,e.slice(0,-1)),n=e[e.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")},new Set("0123456789ABCDEFabcdef"),new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),new Set(",[]{}"),new Set(" ,[]{}\n\r\t"),p.ONE,function(t){t.Kampitham="Kampitham",t.Nokku="Nokku",t.Spuritham="Spuritham",t.Prathyagatham="Prathyagatham",t.Aahaatam_Raavi="Raavi",t.Aahaatam_Kandippu="Kandippu",t.Vaali="Vaali",t.Odukkal="Odukkal",t.Jaaru_Eetra="EetraJaaru",t.Jaaru_Irakka="IrakkaJaaru",t.Orikkai="Orikkai"}(Yi||(Yi={}));class Xi{constructor(){this.shapeId=Xi.idCounter++,this._x=null,this._y=null,this._width=null,this._height=null,this.parentShape=null,this.children=[]}get bbox(){return this._bbox||(this._bbox=this.refreshBBox()),this._bbox}get minSize(){return this._minSize||(this._minSize=this.refreshMinSize()),this._minSize}invalidateBounds(){this._minSize=null,this._bbox=null}setBounds(t,e,r,n,i=!1){null!=t&&(isNaN(t)?this._x=null:this._x=t),null!=e&&(isNaN(e)?this._y=null:this._y=e),null!=r&&(isNaN(r)?this._width=null:this._width=r),null!=n&&(isNaN(n)?this._height=null:this._height=n);const[o,s,a,u]=this.updateBounds(t,e,r,n);return null!=o&&(isNaN(o)?this._x=null:this._x=o),null!=s&&(isNaN(s)?this._y=null:this._y=s),null!=a&&(isNaN(a)?this._width=null:this._width=a),null!=u&&(isNaN(u)?this._height=null:this._height=u),i&&this.refreshLayout(),[o,s,a,u]}get hasX(){return null!=this._x&&!isNaN(this._x)}get hasY(){return null!=this._y&&!isNaN(this._y)}get hasWidth(){return null!=this._width&&!isNaN(this._width)}get hasHeight(){return null!=this._height&&!isNaN(this._height)}get x(){return this._x||0}set x(t){this.setBounds(null==t?NaN:t,null,null,null)}get y(){return null!=this._y?this._y:0}set y(t){this.setBounds(null,null==t?NaN:t,null,null)}get width(){return null!=this._width?this._width:0}set width(t){this.setBounds(null,null,null==t?NaN:t,null)}get height(){return null!=this._height?this._height:0}set height(t){this.setBounds(null,null,null,null==t?NaN:t)}refreshLayout(){}}Xi.idCounter=0;const Zi=p.ONE,[to]=(Zi.timesNum(2),function(t,e){void 0===e&&(e=null);var r=Dr(function(t,e){void 0===e&&(e=null);var r=Dr(function(t,e){var r=new ct((e=e||{}).grammar||{}),n=new Ye(t,He(He({},e),{grammar:r})),i=n.generatedTokenizer.next.bind(n.generatedTokenizer);return(e.debug||"").split("|").findIndex(function(t){return"all"==t||"lexer"==t})>=0&&console.log("Prog: \n","".concat(n.generatedTokenizer.vm.prog.debugValue().join("\n"))),[r,i]}(t,e=e||{}),2),n=r[0],i=r[1];n.augmentStartSymbol();var o=Dr(Lr(n,e.type),2);return[o[0],i,o[1]]}(t,e),3),n=r[0],i=r[1],o=r[2],s=new wr(n);return(e.tokenizer||i)&&s.setTokenizer(e.tokenizer||i),(e.debug||"").split("|").findIndex(function(t){return"all"==t||"parser"==t})>=0&&function(t,e){var r=t.grammar,n=t.parseTable;console.log("===============================\nGrammar (as default): \n",r.debugValue.map(function(t,e){return"".concat(e+1," - ").concat(t)}),"===============================\nGrammar (as Bison): \n",r.debugValue.map(function(t,e){return"".concat(t.replace("->",":")," ; \n")}).join(""),"===============================\nParseTable: \n",JSON.stringify(function(t,e){var r={},n=t.debugValue,i=null==e?void 0:e.debugValue;for(var o in n){var s=n[o];if(e){var a=i[o];r[o]={items:a.items,actions:s,goto:a.goto}}else r[o]=s}return r}(n,e),null,4),"===============================\nConflicts: \n",n.conflictActions)}(s,o),[s,i,o]}(String.raw`
3
3
  %define IdentChar /[^%!@$#&\^|\[\]={}()<>+\-,;~: \t\f\r\n\v\\\.\'\"]/
4
4
 
5
5
  %token BSLASH "\\"
@@ -54,8 +54,13 @@
54
54
 
55
55
  Embedding -> SINGLE_LINE_RAW_STRING | MULTI_LINE_RAW_STRING ;
56
56
 
57
- Command -> BSLASH_IDENT CommandParams ? { newCommand } ;
57
+ Command -> BSLASH_IDENT CommandParams ? OptBlock { newCommandWithBlock } ;
58
58
  CommandParams -> OPEN_PAREN ParamList ? CLOSE_PAREN { $2 } ;
59
+ OptBlock -> Block
60
+ | { nullBlock }
61
+ ;
62
+ Block -> BlockStart Elements CLOSE_BRACE { endBlock } ;
63
+ BlockStart -> OPEN_BRACE { beginBlock } ;
59
64
 
60
65
  ParamList -> ParamList COMMA Param { concatParamList } ;
61
66
  ParamList -> Param { newParamList };
@@ -108,5 +113,5 @@
108
113
 
109
114
  Duration -> Fraction | NUMBER;
110
115
  Fraction -> NUMBER SLASH NUMBER { newFraction } ;
111
- `,{allowLeftRecursion:!0,debug:"",type:"lalr",tokenHandlers:{toEmbelishment:(t,e,r)=>{const[n,i]=r.parseEmbelishment(t.value);return null==n?(console.log("Skipping Embelishment: ",t.value),r.errors.push(new Pn(`Invalid embelishment: ${t.value}`,t.start,1+t.end-t.start,"InvalidEmbelishment",t.value)),null):(t.value=n,t.tag=i?"PRE_EMB":"POST_EMB",t)},toCommandName:(t,e,r)=>(t.value=t.value.substring(1),t),toBoolean:(t,e,r)=>(t.value="true"==t.value,t),toNumber:(t,e,r)=>(t.value=parseInt(t.value),t),toString:(t,e,r)=>(t.value=t.value.substring(1,t.value.length-1),t),toMarker:(t,e,r)=>{if("PRE_MARKER"!=t.tag&&"POST_MARKER"!=t.tag)throw new Error("Invalid token for converting to note: "+t.tag);const n="PRE_MARKER"==t.tag,i=n?t.value.substring(1,t.value.length-3):t.value.substring(3,t.value.length-1);return t.value=new S(i,n),t},toOctavedNote:(t,e,r)=>{if("DOTS_IDENT"==t.tag){const e=t.positions[1][1]-t.positions[1][0],r=t.value.substring(e);t.value=new D(r,di,-e)}else{if("IDENT_DOTS"!=t.tag)throw new Error("Invalid token for converting to note: "+t.tag);{const e=t.positions[2][1]-t.positions[2][0],r=t.value.substring(0,t.value.length-e);t.value=new D(r,di,e)}}return t},toRoleSelector:(t,e,r)=>(t.value=t.value.substring(0,t.value.length-1),t),toLineAnnotation:(t,e,r)=>(t.value=t.value.substring(1),t),toSingleLineRawString:(t,e,r)=>(t.value=t.value.substring(1),t),toMultiLineRawString:(t,e,r)=>{const n='"'+e.substring(t.positions[1][0],t.positions[1][1]),i=e.index,o=Jn.advanceAfter(e,n)-n.length;if(o<0)throw new Error("EOF expected while finding end of Raw String Literal: '"+n+"'");return t.value=e.substring(i,o),t},toFrontMatter:(t,e,r)=>{const n=e.index,i=Jn.advanceAfter(e,"\n---")-4;if(i<0)throw new Error("EOF expected while finding end of front matter");return t.value=e.substring(n,i),t}}}))})(),__webpack_exports__=__webpack_exports__.default,__webpack_exports__})());
116
+ `,{allowLeftRecursion:!0,debug:"",type:"lalr",tokenHandlers:{toEmbelishment:(t,e,r)=>{const[n,i]=r.parseEmbelishment(t.value);return null==n?(console.log("Skipping Embelishment: ",t.value),r.errors.push(new ue(`Invalid embelishment: ${t.value}`,t.start,1+t.end-t.start,"InvalidEmbelishment",t.value)),null):(t.value=n,t.tag=i?"PRE_EMB":"POST_EMB",t)},toCommandName:(t,e,r)=>(t.value=t.value.substring(1),t),toBoolean:(t,e,r)=>(t.value="true"==t.value,t),toNumber:(t,e,r)=>(t.value=parseInt(t.value),t),toString:(t,e,r)=>(t.value=t.value.substring(1,t.value.length-1),t),toMarker:(t,e,r)=>{if("PRE_MARKER"!=t.tag&&"POST_MARKER"!=t.tag)throw new Error("Invalid token for converting to note: "+t.tag);const n="PRE_MARKER"==t.tag,i=n?t.value.substring(1,t.value.length-3):t.value.substring(3,t.value.length-1);return t.value=new x(i,n),t},toOctavedNote:(t,e,r)=>{if("DOTS_IDENT"==t.tag){const e=t.positions[1][1]-t.positions[1][0],r=t.value.substring(e);t.value=new T(r,Zi,-e)}else{if("IDENT_DOTS"!=t.tag)throw new Error("Invalid token for converting to note: "+t.tag);{const e=t.positions[2][1]-t.positions[2][0],r=t.value.substring(0,t.value.length-e);t.value=new T(r,Zi,e)}}return t},toRoleSelector:(t,e,r)=>(t.value=t.value.substring(0,t.value.length-1),t),toLineAnnotation:(t,e,r)=>(t.value=t.value.substring(1),t),toSingleLineRawString:(t,e,r)=>(t.value=t.value.substring(1),t),toMultiLineRawString:(t,e,r)=>{const n='"'+e.substring(t.positions[1][0],t.positions[1][1]),i=e.index,o=de.advanceAfter(e,n)-n.length;if(o<0)throw new Error("EOF expected while finding end of Raw String Literal: '"+n+"'");return t.value=e.substring(i,o),t},toFrontMatter:(t,e,r)=>{const n=e.index,i=de.advanceAfter(e,"\n---")-4;if(i<0)throw new Error("EOF expected while finding end of front matter");return t.value=e.substring(n,i),t}}}))})(),n.default})());
112
117
  //# sourceMappingURL=notations.umd.min.js.map